mirror of
https://github.com/LeavesMC/Leaves.git
synced 2025-12-19 14:59:32 +00:00
Modify end void rings generation (#722)
* Modify end void rings generation * move to fix * fix up --------- Co-authored-by: MC_XiaoHei <xor7xiaohei@gmail.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Helvetica Volubi <suisuroru@blue-millennium.fun>
|
||||
Date: Tue, 26 Aug 2025 03:14:04 +0800
|
||||
Subject: [PATCH] Modify end void rings generation
|
||||
|
||||
|
||||
diff --git a/net/minecraft/world/level/levelgen/DensityFunctions.java b/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||
index 04527a5c65ad630f794fed9071d485aedd02257a..0298ba0c68447c5d0d555431b3118552b3d90a34 100644
|
||||
--- a/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||
+++ b/net/minecraft/world/level/levelgen/DensityFunctions.java
|
||||
@@ -528,7 +528,7 @@ public final class DensityFunctions {
|
||||
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 = org.leavesmc.leaves.LeavesConfig.fix.vanillaEndVoidRings ? 100.0F - Mth.sqrt(x * x + z * z) * 8.0F : 100.0F - Mth.sqrt((long)x * (long)x + (long)z * (long)z) * 8.0F; // Paper - cast ints to long to avoid integer overflow // Leaves - customize end void rings generation
|
||||
f = Mth.clamp(f, -100.0F, 80.0F);
|
||||
|
||||
NoiseCache cache = noiseCache.get().computeIfAbsent(noise, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation
|
||||
@@ -1237,5 +1237,8 @@ public final class LeavesConfig {
|
||||
public enum CollisionBehavior {
|
||||
VANILLA, BLOCK_SHAPE_VANILLA, PAPER
|
||||
}
|
||||
|
||||
@GlobalConfig("vanilla-end-void-rings")
|
||||
public boolean vanillaEndVoidRings = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user