From 06818793c77e940f6b2c0770287df4cd100a4631 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Thu, 20 Jul 2023 09:45:09 +0200 Subject: [PATCH] Fix ChunkGenerator#generateCaves never being called By: DerFrZocker --- .../craftbukkit/generator/CustomChunkGenerator.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java index 332da6be3c..48f2e0f69e 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java @@ -236,13 +236,13 @@ public class CustomChunkGenerator extends InternalChunkGenerator { delegate.applyCarvers(regionlimitedworldaccess, seed, randomstate, biomemanager, structuremanager, ichunkaccess, worldgenstage_features); } - if (worldgenstage_features == WorldGenStage.Features.LIQUID) { // stage check ensures that the method is only called once - CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess); - random.setDecorationSeed(seed, 0, 0); + // Minecraft removed the LIQUID_CARVERS stage from world generation, without removing the LIQUID Carving enum. + // Meaning this method is only called once for each chunk, so no check is required. + CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess); + random.setDecorationSeed(seed, 0, 0); - generator.generateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData); - chunkData.breakLink(); - } + generator.generateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData); + chunkData.breakLink(); } @Override