From 029091852d70c35aa4a72d47df43b7565e215b43 Mon Sep 17 00:00:00 2001 From: WayofTime Date: Tue, 5 Apr 2016 16:13:49 -0400 Subject: [PATCH] Fixed Water and Lava sigils placing two sources in special scenarios. --- .../bloodmagic/item/sigil/ItemSigilLava.java | 16 +--------------- .../bloodmagic/item/sigil/ItemSigilWater.java | 7 +++++-- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java index 1ebd9b8c..dff6853d 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilLava.java @@ -93,25 +93,11 @@ public class ItemSigilLava extends ItemSigilBase if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) { ((IFluidHandler) tile).fill(side, fluid, true); + return EnumActionResult.SUCCESS; } return EnumActionResult.FAIL; } - // else if (tile instanceof TESocket) { - // return false; - // } - - BlockPos newPos = blockPos.offset(side); - - if (!player.canPlayerEdit(newPos, side, stack)) - { - return EnumActionResult.FAIL; - } - - if (this.canPlaceLava(world, newPos) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) - { - return this.tryPlaceLava(world, newPos) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; - } return EnumActionResult.FAIL; } diff --git a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java index 0218fe03..ca1b5166 100644 --- a/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java +++ b/src/main/java/WayofTime/bloodmagic/item/sigil/ItemSigilWater.java @@ -83,7 +83,11 @@ public class ItemSigilWater extends ItemSigilBase int amount = ((IFluidHandler) tile).fill(side, fluid, false); if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed())) + { ((IFluidHandler) tile).fill(side, fluid, true); + return EnumActionResult.SUCCESS; + } + return EnumActionResult.FAIL; } @@ -93,8 +97,7 @@ public class ItemSigilWater extends ItemSigilBase return EnumActionResult.SUCCESS; } - BlockPos newPos = blockPos.offset(side); - return (player.canPlayerEdit(newPos, side, stack) && this.canPlaceWater(world, newPos) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && this.tryPlaceWater(world, newPos)) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL; + return EnumActionResult.FAIL; } public boolean canPlaceWater(World world, BlockPos blockPos)