Tank Dupe bug
MuteTiefling opened this issue ยท 2 comments
Minecraft Version
1.15.2
Forge Version
forge-31.1.74
Mod Version
pneumaticcraft-repressurized-1.15.2-1.1.1-11
Describe your problem, including steps to reproduce it
Right clicking a Cooking for Blockheads sink with a tank simultaneously fills the tank and places an empty one in the world, effectively duplicating it.
Any other comments?
I'm going to blame Cooking For Blockheads for this one, specifically because of this line:
return !heldItem.isEmpty() && !(heldItem.getItem() instanceof BlockItem) ? ActionResultType.SUCCESS : ActionResultType.FAIL;
The sink checks to see if the held item (in this case the tank) is a BlockItem
, and if so returns ActionResultType.FAIL
- and the tank is indeed a BlockItem
. So it's both filled the tank, and returned a value that indicates the tank could not be filled.
PNC:R (actually, Minecraft itself) on seeing the FAIL value, assumes the right-click operation on the sink failed, and therefore proceeds to place the tank as a block.
I presume blay09 has a reason for the !(heldItem.getItem() instanceof BlockItem)
test but it's wrong in this case...