diff --git a/src/main/java/me/cortex/voxy/client/config/VoxyConfigScreenPages.java b/src/main/java/me/cortex/voxy/client/config/VoxyConfigScreenPages.java index 54f3b68e..197ad12e 100644 --- a/src/main/java/me/cortex/voxy/client/config/VoxyConfigScreenPages.java +++ b/src/main/java/me/cortex/voxy/client/config/VoxyConfigScreenPages.java @@ -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")) diff --git a/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java b/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java index 58fb8f63..97423603 100644 --- a/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java +++ b/src/main/java/me/cortex/voxy/commonImpl/WorldIdentifier.java @@ -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 boolean equal(RegistryKey a, RegistryKey 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();