From 038cde138a6bff9aba359d8a03dba46fda91bf69 Mon Sep 17 00:00:00 2001 From: Zach Brown <1254957+zachbr@users.noreply.github.com> Date: Wed, 21 Dec 2016 15:29:50 -0600 Subject: [PATCH] Fix missed diff causing lava to move too quickly Missed diff from old patch file was causing lava to always move at the faster 'nether' speed, ignoring the slower overworld speed entirely. This is why we use obfuscation helpers now. Fixes GH-521 --- .../Configurable-lava-flow-speed.patch | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Configurable-lava-flow-speed.patch b/Spigot-Server-Patches/Configurable-lava-flow-speed.patch index e524ed3bf4..7839247d7e 100644 --- a/Spigot-Server-Patches/Configurable-lava-flow-speed.patch +++ b/Spigot-Server-Patches/Configurable-lava-flow-speed.patch @@ -29,9 +29,21 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 */ public int getFlowSpeed(World world, BlockPosition blockposition) { + if (this.material == Material.LAVA) { -+ return world.worldProvider.m() ? world.paperConfig.lavaFlowSpeedNether : world.paperConfig.lavaFlowSpeedNormal; ++ return world.worldProvider.isSkyMissing() ? world.paperConfig.lavaFlowSpeedNether : world.paperConfig.lavaFlowSpeedNormal; + } if (this.material == Material.WATER && ( world.getType(blockposition.north(1)).getBlock().material == Material.LAVA || world.getType(blockposition.south(1)).getBlock().material == Material.LAVA || +diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java +index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/WorldProvider.java ++++ b/src/main/java/net/minecraft/server/WorldProvider.java +@@ -0,0 +0,0 @@ public abstract class WorldProvider { + return this.f; + } + ++ public final boolean isSkyMissing() { return this.n(); } // Paper - OBFHELPER + public boolean n() { + return this.e; + } -- \ No newline at end of file