-
Bug
-
Resolution: Incomplete
-
None
-
1.20.12 Hotfix
-
Unconfirmed
-
Multiple
The event itemUseOn doesn't get called with empty hand anymore.
This event was usefull for preventing players from interacting with chest, buttons, etc.
But now players just need to empty their hands to interact with the block.
import {world} from "@minecraft/server"; world.beforeEvents.itemUseOn.subscribe((event)=> { if(event.block.typeId=="minecraft:chest"){ event.source.sendMessage("Hand is not empty"); event.cancel=true; } })
Tested with Windows 11 on server software for linux.
Steps to reproduce:
- Run a world with this script.
- Place a chest
- Interact with the chest with a full hand
- Interact with the chest with an empty hand
New events like handSlotChange, itemDrop or blockInteract could also solve the issue.