Attempt to fix weirdness on thread change while importing
This commit is contained in:
@@ -70,13 +70,10 @@ public abstract class VoxyConfigScreenPages {
|
||||
|
||||
if (wasEnabled) {
|
||||
VoxyCommon.createInstance();
|
||||
|
||||
if (vrsh != null && s.enableRendering) {
|
||||
vrsh.createRenderer();
|
||||
}
|
||||
}
|
||||
}, s -> s.serviceThreads)
|
||||
.setImpact(OptionImpact.HIGH)
|
||||
.setFlags(OptionFlag.REQUIRES_RENDERER_RELOAD)
|
||||
.build()
|
||||
).add(OptionImpl.createBuilder(boolean.class, storage)
|
||||
.setName(Text.translatable("voxy.config.general.ingest"))
|
||||
|
||||
@@ -40,13 +40,19 @@ public class WorldIdentifier {
|
||||
if (obj instanceof WorldIdentifier other) {
|
||||
return other.hashCode == this.hashCode &&
|
||||
other.biomeSeed == this.biomeSeed &&
|
||||
other.key == this.key &&//other.key.equals(this.key) &&
|
||||
other.dimension == this.dimension//other.dimension.equals(this.dimension)
|
||||
equal(other.key, this.key) &&//other.key.equals(this.key) &&
|
||||
equal(other.dimension, this.dimension)//other.dimension.equals(this.dimension)
|
||||
;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static <T> boolean equal(RegistryKey<T> a, RegistryKey<T> b) {
|
||||
if (a == b) return true;
|
||||
if (a == null || b == null) return false;
|
||||
return a.getRegistry().equals(b.getRegistry()) && a.getValue().equals(b.getValue());
|
||||
}
|
||||
|
||||
//Quick access utility method to get or create a world object in the current instance
|
||||
public WorldEngine getOrCreateEngine() {
|
||||
var instance = VoxyCommon.getInstance();
|
||||
|
||||
Reference in New Issue
Block a user