Fixed Water and Lava sigils placing two sources in special scenarios.

This commit is contained in:
WayofTime 2016-04-05 16:13:49 -04:00
parent 794ac6a7a2
commit 029091852d
2 changed files with 6 additions and 17 deletions

View file

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

View file

@ -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)