KubeJS-Mods / KubeJS

https://kubejs.com
GNU Lesser General Public License v3.0
297 stars 87 forks source link

Items in cooling down do not work for 'BlockEvents.rightClicked' #833

Open FlappiBakuse opened 2 months ago

FlappiBakuse commented 2 months ago

Minecraft Version

1.20.1

KubeJS Version

2001.6.5-build.7

Rhino Version

2001.2.2-build.18

Architectury Version

9.2.14

Forge/Fabric Version

Forge 47.2.32

Describe your issue

BlockEvents.rightClicked('minecraft:chest', event => { event.cancel() })

With this code, right-clicking while using any item (or empty-handed) will cancel the opening of the chest, but the chest will still open normally when the item is on cooldown.

The problem can also be reproduced in the fabric loader.

example

Crash report/logs

No response