Fixed Water and Lava sigils placing two sources in special scenarios.
This commit is contained in:
parent
794ac6a7a2
commit
029091852d
|
@ -93,25 +93,11 @@ public class ItemSigilLava extends ItemSigilBase
|
||||||
if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
|
if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
|
||||||
{
|
{
|
||||||
((IFluidHandler) tile).fill(side, fluid, true);
|
((IFluidHandler) tile).fill(side, fluid, true);
|
||||||
|
return EnumActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return EnumActionResult.FAIL;
|
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;
|
return EnumActionResult.FAIL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,11 @@ public class ItemSigilWater extends ItemSigilBase
|
||||||
int amount = ((IFluidHandler) tile).fill(side, fluid, false);
|
int amount = ((IFluidHandler) tile).fill(side, fluid, false);
|
||||||
|
|
||||||
if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
|
if (amount > 0 && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()))
|
||||||
|
{
|
||||||
((IFluidHandler) tile).fill(side, fluid, true);
|
((IFluidHandler) tile).fill(side, fluid, true);
|
||||||
|
return EnumActionResult.SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
return EnumActionResult.FAIL;
|
return EnumActionResult.FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -93,8 +97,7 @@ public class ItemSigilWater extends ItemSigilBase
|
||||||
return EnumActionResult.SUCCESS;
|
return EnumActionResult.SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
BlockPos newPos = blockPos.offset(side);
|
return EnumActionResult.FAIL;
|
||||||
return (player.canPlayerEdit(newPos, side, stack) && this.canPlaceWater(world, newPos) && NetworkHelper.getSoulNetwork(player).syphonAndDamage(player, getLpUsed()) && this.tryPlaceWater(world, newPos)) ? EnumActionResult.SUCCESS : EnumActionResult.FAIL;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canPlaceWater(World world, BlockPos blockPos)
|
public boolean canPlaceWater(World world, BlockPos blockPos)
|
||||||
|
|
Loading…
Reference in a new issue