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