Prevent saving the iris level stems

This commit is contained in:
Julian Krings 2025-04-06 16:31:35 +02:00
parent 407e51378c
commit 74e2576ca2
No known key found for this signature in database
GPG Key ID: 208C6E08C3B718D2
10 changed files with 43 additions and 0 deletions

View File

@ -135,4 +135,6 @@ public interface INMSBinding {
Pair<Integer, AutoClosing> injectUncached(boolean overworld, boolean nether, boolean end);
boolean missingDimensionTypes(boolean overworld, boolean nether, boolean end);
void removeCustomDimensions(World world);
}

View File

@ -135,6 +135,11 @@ public class NMSBinding1X implements INMSBinding {
return false;
}
@Override
public void removeCustomDimensions(World world) {
}
@Override
public CompoundTag serializeEntity(Entity location) {
return null;

View File

@ -127,6 +127,7 @@ public class BukkitChunkGenerator extends ChunkGenerator implements PlatformChun
try {
if (initialized || !world.name().equals(event.getWorld().getName()))
return;
INMS.get().removeCustomDimensions(event.getWorld());
world.setRawWorldSeed(event.getWorld().getSeed());
Engine engine = getEngine(event.getWorld());
if (engine == null) {

View File

@ -687,6 +687,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().K.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),

View File

@ -688,6 +688,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().K.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),

View File

@ -689,6 +689,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().K.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),

View File

@ -714,6 +714,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().K.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),

View File

@ -718,6 +718,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().K.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),

View File

@ -708,6 +708,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().L.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),

View File

@ -707,6 +707,11 @@ public class NMSBinding implements INMSBinding {
return overworld || nether || end;
}
@Override
public void removeCustomDimensions(World world) {
((CraftWorld) world).getHandle().L.customDimensions = null;
}
private WorldLoader.DataLoadContext supplier(WorldLoader.DataLoadContext old) {
return dataLoadContext.aquire(() -> new WorldLoader.DataLoadContext(
old.resources(),