diff --git a/patches/server/Configurable-feature-seeds.patch b/patches/server/Configurable-feature-seeds.patch index 9008b43694..610fd655f7 100644 --- a/patches/server/Configurable-feature-seeds.patch +++ b/patches/server/Configurable-feature-seeds.patch @@ -83,28 +83,28 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 --- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java +++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java @@ -0,0 +0,0 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource { + int j = list.size(); try { - Registry iregistry = generatoraccessseed.registryAccess().registryOrThrow(Registry.PLACED_FEATURE_REGISTRY); -- Registry> iregistry1 = generatoraccessseed.registryAccess().registryOrThrow(Registry.STRUCTURE_FEATURE_REGISTRY); -+ Registry> iregistry1 = generatoraccessseed.registryAccess().registryOrThrow(Registry.STRUCTURE_FEATURE_REGISTRY); // Paper - diff on change +- Registry iregistry = generatoraccessseed.registryAccess().registryOrThrow(Registry.PLACED_FEATURE_REGISTRY); ++ Registry iregistry = generatoraccessseed.registryAccess().registryOrThrow(Registry.PLACED_FEATURE_REGISTRY); // Paper - diff on change + Registry> iregistry1 = generatoraccessseed.registryAccess().registryOrThrow(Registry.STRUCTURE_FEATURE_REGISTRY); int k = Math.max(GenerationStep.Decoration.values().length, j); - for (int l = 0; l < k; ++l) { @@ -0,0 +0,0 @@ public abstract class ChunkGenerator implements BiomeManager.NoiseBiomeSource { - for (iterator = list1.iterator(); iterator.hasNext(); ++i1) { - StructureFeature structuregenerator = (StructureFeature) iterator.next(); + return (String) optional.orElseGet(placedfeature::toString); + }; -- seededrandom.setFeatureSeed(i, i1, l); +- seededrandom.setFeatureSeed(i, l1, l); + // Paper start - change populationSeed used in random + long featurePopulationSeed = i; -+ final net.minecraft.resources.ResourceLocation location = iregistry1.getKey(structuregenerator); ++ final net.minecraft.resources.ResourceLocation location = iregistry.getKey(placedfeature); + final long configFeatureSeed = generatoraccessseed.getMinecraftWorld().paperConfig.featureSeeds.getLong(location); + if (configFeatureSeed != -1) { + featurePopulationSeed = seededrandom.setDecorationSeed(configFeatureSeed, blockposition.getX(), blockposition.getZ()); // See seededrandom.setDecorationSeed from above + } -+ seededrandom.setFeatureSeed(featurePopulationSeed, i1, l);; ++ seededrandom.setFeatureSeed(featurePopulationSeed, l1, l); + // Paper end - Supplier supplier = () -> { // CraftBukkit - decompile error - Optional optional = iregistry1.getResourceKey(structuregenerator).map(Object::toString); + try { + generatoraccessseed.setCurrentlyGenerating(supplier1);