-
-
Notifications
You must be signed in to change notification settings - Fork 285
Description
Minecraft Version: 1.21.1
NeoForge Version: 21.1.169
Steps to Reproduce:
- have an item Override
IItemExtension#doesSneakBypassUse, and return true - put that item in the main hand
- put an item that doesn't do that in the offhand (e.g. an iron ingot)
- sneak + use on a block
BlockBehaviour#useItemOn doesn't get called, but Item#useOn does.
Description of issue:
The description of IItemExtension#doesSneakBypassUse implies that the use will be passed to the underlying block first.
Right now that is only the case if either one hand is empty, or the items in both hands Override IItemExtension#doesSneakBypassUse.
Expected Behaviour:
BlockBehaviour#useItemOn gets called if the item Overrides IItemExtension#doesSneakBypassUse before Item#useOn gets called for that item (tho with the hand that item is in).
In practice, this is noticeable with AE2's Memory Card, which doesn't work correctly if you have an item in the offhand, and instead of the sneak + use on block action, it triggers the sneak + use on air action (which clears the card instead).