[1.80pr0] Pocket computers cannot be used in the off-hand
SquidDev opened this issue ยท 1 comments
Version
1.80pr0 on Minecraft 1.10.2. Can also be reproduced with Unborked on 1.10.2 and 1.11.2.
Steps to reproduce
- Place a pocket computer in your shield slot (by pressing "f" when on the hotbar or moving it in the GUI).
- Right click with an empty main hand.
- Observe that the pocket computer GUI does not open.
I believe this is because ContainerHeldItem
uses InventoryPlayer.currentItem
instead of determining whether to use the main hand or the off hand slot. Consequently the stack is null, so the container is not opened.
Another thing to note is that both ItemPocketComputer
and ItemPrintout
will return EnumActionResult.PASS
when on the client. However, you should generally return the same value on both server and client otherwise behaviour can be a little odd. For instance, if you hold torches in your off hand, interacting with a pocket computer will also place a torch.