From bc9a97a7a3232823cc52158ae92c315b4dfda5ca Mon Sep 17 00:00:00 2001 From: Byteflux Date: Fri, 3 Jul 2015 12:38:43 -0700 Subject: [PATCH] Fix liquids stuck in fast drain loop --- Spigot-Server-Patches/Fast-draining.patch | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/Spigot-Server-Patches/Fast-draining.patch b/Spigot-Server-Patches/Fast-draining.patch index 145bfd3b4..640fa5e84 100644 --- a/Spigot-Server-Patches/Fast-draining.patch +++ b/Spigot-Server-Patches/Fast-draining.patch @@ -44,34 +44,34 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + */ + public boolean canFastDrain(World world, BlockPosition position) { + boolean result = false; ++ int data = getData(world, position); + if (this.material == Material.WATER) { + if (world.paperSpigotConfig.fastDrainWater) { + result = true; + if (getData(world, position.down()) < 0) { + result = false; -+ } else if (world.getType(position.north()).getBlock().getMaterial() == Material.WATER && getData(world, position.north()) < 1) { ++ } else if (world.getType(position.north()).getBlock().getMaterial() == Material.WATER && getData(world, position.north()) < data) { + result = false; -+ } else if (world.getType(position.south()).getBlock().getMaterial() == Material.WATER && getData(world, position.south()) < 1) { ++ } else if (world.getType(position.south()).getBlock().getMaterial() == Material.WATER && getData(world, position.south()) < data) { + result = false; -+ } else if (world.getType(position.west()).getBlock().getMaterial() == Material.WATER && getData(world, position.west()) < 1) { ++ } else if (world.getType(position.west()).getBlock().getMaterial() == Material.WATER && getData(world, position.west()) < data) { + result = false; -+ } else if (world.getType(position.east()).getBlock().getMaterial() == Material.WATER && getData(world, position.east()) < 1) { ++ } else if (world.getType(position.east()).getBlock().getMaterial() == Material.WATER && getData(world, position.east()) < data) { + result = false; + } + } + } else if (this.material == Material.LAVA) { + if (world.paperSpigotConfig.fastDrainLava) { -+ Material m; + result = true; -+ if (getData(world, position.down()) < 0) { ++ if (getData(world, position.down()) < 0 || world.getType(position.up()).getBlock().getMaterial() != Material.AIR) { + result = false; -+ } else if ((m = world.getType(position.north()).getBlock().getMaterial()) == Material.WATER || (m == Material.LAVA && getData(world, position.north()) < 1)) { ++ } else if (world.getType(position.north()).getBlock().getMaterial() == Material.LAVA && getData(world, position.north()) < data) { + result = false; -+ } else if ((m = world.getType(position.south()).getBlock().getMaterial()) == Material.WATER || (m == Material.LAVA && getData(world, position.south()) < 1)) { ++ } else if (world.getType(position.south()).getBlock().getMaterial() == Material.LAVA && getData(world, position.south()) < data) { + result = false; -+ } else if ((m = world.getType(position.west()).getBlock().getMaterial()) == Material.WATER || (m == Material.LAVA && getData(world, position.west()) < 1)) { ++ } else if (world.getType(position.west()).getBlock().getMaterial() == Material.LAVA && getData(world, position.west()) < data) { + result = false; -+ } else if ((m = world.getType(position.east()).getBlock().getMaterial()) == Material.WATER || (m == Material.LAVA && getData(world, position.east()) < 1)) { ++ } else if (world.getType(position.east()).getBlock().getMaterial() == Material.LAVA && getData(world, position.east()) < data) { + result = false; + } + }