From c8e6c05c0cde2931ccacf5aceca55ac3a83d9dd5 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Fri, 27 Sep 2019 20:53:20 -0500 Subject: [PATCH] Use local variable for bedrock generation Fixes GH-2596. --- Spigot-Server-Patches/Generator-Settings.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spigot-Server-Patches/Generator-Settings.patch b/Spigot-Server-Patches/Generator-Settings.patch index d5e55f3372..e9cbdb8f35 100644 --- a/Spigot-Server-Patches/Generator-Settings.patch +++ b/Spigot-Server-Patches/Generator-Settings.patch @@ -19,7 +19,7 @@ index 246bb4b01..29fd49968 100644 + } } diff --git a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java -index 096866b2b..0e104c8c1 100644 +index 096866b2b..338b67c3c 100644 --- a/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java +++ b/src/main/java/net/minecraft/server/ChunkGeneratorAbstract.java @@ -0,0 +0,0 @@ public abstract class ChunkGeneratorAbstract @@ -47,7 +47,7 @@ index 096866b2b..0e104c8c1 100644 if (k < 256) { for (i1 = k + 4; i1 >= k; --i1) { - if (i1 <= k + random.nextInt(5)) { -+ if (i1 <= (getWorld().paperConfig.generateFlatBedrock ? floorHeight : this.k + random.nextInt(5))) { // Paper - Configurable flat bedrock floor ++ if (i1 <= (getWorld().paperConfig.generateFlatBedrock ? floorHeight : k + random.nextInt(5))) { // Paper - Configurable flat bedrock floor ichunkaccess.setType(blockposition_mutableblockposition.d(blockposition.getX(), i1, blockposition.getZ()), Blocks.BEDROCK.getBlockData(), false); } }