#There is a subject
17 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
I want to make sure that if a player clicks on the 'minecraft:note_block' block and has 'minecraft:stick' in his hands, then the event is canceled
i think its e.player.mainHandItem
Thanks
And I have one more question, if I want to do not so that it is impossible to click on the block 'minecraft:note_block', but I want it to be impossible to click on all the blocks with the tag '#neoforge:minecraft:music_blocks' , I tried but the error BlockEvents.rightClicked('#neoforge:minecraft:music_blocks', event => {event.cancel()})
you cant set the argument for the event to be a tag, only an id
BlockEvents.rightClicked(event => {
if(event.block.hasTag('neoforge:minecraft:music_blocks'))
event.cancel()
})
I checked this code and it does not work, the error does not come out, but the action is not canceled
Yes, it's really wrong '#neoforge:music_blocks'
But I checked with the corrected tag and even with other tags nothing works
You can find your KubeJS server log in /minecraft/logs/kubejs/server.log.
If you are on 1.18 or 1.16 it will be called server.txt.
Please send the file directly, without links or snippets.