#How can I make it to where hoes of all types cannot right click dirt blocks?
17 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
BlockEvents.rightClicked('minecraft:dirt', e => {
if (event.player.mainHandItem.tag == 'minecraft:hoes'()) {
e.cancel()
}
})
This doesn't seem to do what I need it to
you have an extra () for some reason, but thats also not how you check tags
BlockEvents.rightClicked('minecraft:dirt', e => {
if (event.player.mainHandItem.hasTag('minecraft:hoes'))
e.cancel()
})
Thank you so much!
I was struggling with the documentation, can I ask what the identifier is for the offhand? I appreciate it so much!
i think its just .offHandItem
thank you so so much, I appreciate it!
Ah it doesn't seem to work - I realize on closer inspection this was one of the variations I tried before.
Edit: Sorry, to clarify, the code above does not work
Would this be better as an item right click event? I'm lost in the sauce 😭
No that won’t work, I’m not sure why this didn’t work, and I’m not at the pc cuz holidays and stuff so I can’t be of too much help rn

Try to just cancel any block right click event and see if that works, if not then you might not be able to
It looks like that much works at least
Specifically:
BlockEvents.rightClicked('minecraft:dirt', e => {
{
e.cancel()
}
})
oh wait
i just copied the code you had and changed it, but you used event instead of e
BlockEvents.rightClicked('minecraft:dirt', e => {
if (e.player.mainHandItem.hasTag('minecraft:hoes'))
e.cancel()
})
It worked, thank you so much!! 😭