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; + } + }