Commits
DerFrZocker authored 08ec344ad11
229 229 | public void applyCarvers(RegionLimitedWorldAccess regionlimitedworldaccess, long seed, RandomState randomstate, BiomeManager biomemanager, StructureManager structuremanager, IChunkAccess ichunkaccess, WorldGenStage.Features worldgenstage_features) { |
230 230 | SeededRandom random = getSeededRandom(); |
231 231 | int x = ichunkaccess.getPos().x; |
232 232 | int z = ichunkaccess.getPos().z; |
233 233 | |
234 234 | random.setSeed(MathHelper.getSeed(x, "should-caves".hashCode(), z) ^ regionlimitedworldaccess.getSeed()); |
235 235 | if (generator.shouldGenerateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) { |
236 236 | delegate.applyCarvers(regionlimitedworldaccess, seed, randomstate, biomemanager, structuremanager, ichunkaccess, worldgenstage_features); |
237 237 | } |
238 238 | |
239 - | if (worldgenstage_features == WorldGenStage.Features.LIQUID) { // stage check ensures that the method is only called once |
240 - | CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess); |
241 - | random.setDecorationSeed(seed, 0, 0); |
239 + | // Minecraft removed the LIQUID_CARVERS stage from world generation, without removing the LIQUID Carving enum. |
240 + | // Meaning this method is only called once for each chunk, so no check is required. |
241 + | CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess); |
242 + | random.setDecorationSeed(seed, 0, 0); |
242 243 | |
243 - | generator.generateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData); |
244 - | chunkData.breakLink(); |
245 - | } |
244 + | generator.generateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData); |
245 + | chunkData.breakLink(); |
246 246 | } |
247 247 | |
248 248 | |
249 249 | public CompletableFuture<IChunkAccess> fillFromNoise(Executor executor, Blender blender, RandomState randomstate, StructureManager structuremanager, IChunkAccess ichunkaccess) { |
250 250 | CompletableFuture<IChunkAccess> future = null; |
251 251 | SeededRandom random = getSeededRandom(); |
252 252 | int x = ichunkaccess.getPos().x; |
253 253 | int z = ichunkaccess.getPos().z; |
254 254 | |
255 255 | random.setSeed(MathHelper.getSeed(x, "should-noise".hashCode(), z) ^ this.world.getSeed()); |