mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
Add configuration setting to re-add End void rings (#1656)
Co-authored-by: granny <granny@purpurmc.org>
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
--- a/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||||
|
+++ b/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||||
|
@@ -528,7 +_,7 @@
|
||||||
|
int i1 = z / 2;
|
||||||
|
int i2 = x % 2;
|
||||||
|
int i3 = z % 2;
|
||||||
|
- float f = 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow
|
||||||
|
+ float f = 100.0F - Mth.sqrt(org.purpurmc.purpur.PurpurConfig.generateEndVoidRings ? x * x + z * z : (long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow // Purpur - Setting to reintroduce end void rings
|
||||||
|
f = Mth.clamp(f, -100.0F, 80.0F);
|
||||||
|
|
||||||
|
NoiseCache cache = noiseCache.get().computeIfAbsent(noise, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation
|
||||||
@@ -610,4 +610,9 @@ public class PurpurConfig {
|
|||||||
startupCommands.add(command);
|
startupCommands.add(command);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean generateEndVoidRings = false;
|
||||||
|
private static void generateEndVoidRings() {
|
||||||
|
generateEndVoidRings = getBoolean("settings.generate-end-void-rings", generateEndVoidRings);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user