diff options
Diffstat (limited to 'patches/server/0699-Add-missing-structure-set-seed-configs.patch')
-rw-r--r-- | patches/server/0699-Add-missing-structure-set-seed-configs.patch | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/patches/server/0699-Add-missing-structure-set-seed-configs.patch b/patches/server/0699-Add-missing-structure-set-seed-configs.patch index b6627026af..8800cb45e7 100644 --- a/patches/server/0699-Add-missing-structure-set-seed-configs.patch +++ b/patches/server/0699-Add-missing-structure-set-seed-configs.patch @@ -148,10 +148,10 @@ index a310bfbf0d08187375ea17f4b04b276a0b7d0b9f..798e22fb4d685b5845ebf687e8004e94 } } diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java b/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java -index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..02e58161a0f5915084230831ee03050d762b67d2 100644 +index bd8c0c15246059c235036cbe71e2b7ae8dab5797..3ae784b02231555a1bc416668fc5bdb11ba15fc8 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/placement/StructurePlacement.java -@@ -59,10 +59,24 @@ public abstract class StructurePlacement { +@@ -79,9 +79,23 @@ public abstract class StructurePlacement { return this.exclusionZone; } @@ -170,14 +170,13 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..02e58161a0f5915084230831ee03050d + } + } + // Paper end - Add missing structure set seed configs - if (!this.isPlacementChunk(calculator, chunkX, chunkZ)) { - return false; -- } else if (this.frequency < 1.0F && !this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency)) { -+ } else if (this.frequency < 1.0F && !this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency, saltOverride)) { // Paper - Add missing structure set seed configs - return false; - } else { - return !this.exclusionZone.isPresent() || !this.exclusionZone.get().isPlacementForbidden(calculator, chunkX, chunkZ); -@@ -77,25 +91,31 @@ public abstract class StructurePlacement { + return this.isPlacementChunk(calculator, chunkX, chunkZ) +- && (!(this.frequency < 1.0F) || this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency)) ++ && (!(this.frequency < 1.0F) || this.frequencyReductionMethod.shouldGenerate(calculator.getLevelSeed(), this.salt, chunkX, chunkZ, this.frequency, saltOverride)) // Paper - Add missing structure set seed configs + && (!this.exclusionZone.isPresent() || !this.exclusionZone.get().isPlacementForbidden(calculator, chunkX, chunkZ)); + } + +@@ -93,25 +107,31 @@ public abstract class StructurePlacement { public abstract StructurePlacementType<?> type(); @@ -198,7 +197,7 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..02e58161a0f5915084230831ee03050d + worldgenRandom.setLargeFeatureWithSalt(seed, chunkX, chunkZ, saltOverride); + } + // Paper end - Add missing structure set seed configs - return worldgenRandom.nextDouble() < (double)frequency; + return worldgenRandom.nextDouble() < frequency; } - private static boolean legacyArbitrarySaltProbabilityReducer(long seed, int salt, int chunkX, int chunkZ, float frequency) { @@ -214,7 +213,7 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..02e58161a0f5915084230831ee03050d int i = chunkX >> 4; int j = chunkZ >> 4; WorldgenRandom worldgenRandom = new WorldgenRandom(new LegacyRandomSource(0L)); -@@ -118,7 +138,7 @@ public abstract class StructurePlacement { +@@ -139,7 +159,7 @@ public abstract class StructurePlacement { @FunctionalInterface public interface FrequencyReducer { @@ -223,7 +222,7 @@ index 65dcb14241baadb2c9f8f16919d7b562198ad9c3..02e58161a0f5915084230831ee03050d } public static enum FrequencyReductionMethod implements StringRepresentable { -@@ -136,8 +156,8 @@ public abstract class StructurePlacement { +@@ -159,8 +179,8 @@ public abstract class StructurePlacement { this.reducer = generationPredicate; } |