Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
int i2 = x % 2;
int i3 = z % 2;
- float f = 100.0F - Mth.sqrt(x * x + z * z) * 8.0F;
+ 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 - (io.papermc.paper.configuration.GlobalConfiguration.get().misc.fixFarEndTerrainGeneration ? Mth.sqrt((long)x * (long)x + (long)z * (long)z) : Mth.sqrt(x * x + z * z)) * 8.0F; // Paper - cast ints to long when MC-159283 fix enabled
f = Mth.clamp(f, -100.0F, 80.0F);

+ NoiseCache cache = noiseCache.get().computeIfAbsent(noise, noiseKey -> new NoiseCache()); // Paper - Perf: Optimize end generation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ private void postProcess() {
public boolean preventNegativeVillagerDemand = false;
@Comment("Whether the nether dimension is enabled and will be loaded.")
public boolean enableNether = true;
@Comment("Keeps Paper's fix for MC-159283 enabled. Disable to use vanilla End ring terrain.")
public boolean fixFarEndTerrainGeneration = true;
}

public BlockUpdates blockUpdates;
Expand Down
Loading