Sometimes the Hand swings twice
shartte opened this issue ยท 0 comments
I think our block-interaction code is using outdated semantics.
I've observed this with a little lag on Fabric, but I think the concept also holds on Forge.
We currently return SUCCESS in block activation callbacks on both sides, but SUCCESS will send out a hand-swing.
Vanilla follows this pattern:
- On the side that should trigger the hand-swing, return SUCCESS.
- On the other side, return CONSUME
There's a helper net.minecraft.util.ActionResultType#func_233537_a_
, sadly unnamed, that is used by vanilla in this way:
return ActionResultType.func_233537_a_(world.isRemote)
indicating it swings the hand on the client, but not again on the server.