Allow using arrays and tags in BlockEvents.rightClicked target
lonevox opened this issue ยท 3 comments
Describe the feature
Currently only single non-tag resource IDs work. The following would work in this proposal:
BlockEvents.rightClicked(['#minecraft:doors', '#minecraft:trapdoors'], (event) => {
const { player } = event;
player.displayClientMessage(Text.of('Right clicked a door/trapdoor'), true);
});Additional info
This is a nice QoL change. The alternative is filtering for tags manually in the event.
Not gonna happen, sorry; the event system just isn't built for that.
You can however use the listener without an extra id and then just return from the callback if the filter doesn't match