#Remove hoe tilling sound from right click

8 messages · Page 1 of 1 (latest)

modest cairn
#

Hello! I've successfully removed tilling with right-click with a hoe. However, the sound effect still plays if it's a valid block, even after the event is cancelled.

I want it so trying to till it doesn't do anything, no farmland, no damage, no sound. How would I achieve that?

This is how I've disabled tilling:

BlockEvents.rightClicked(event => {
    const item = event.item;
    if (!item) return;
    if (item.hasTag('forge:tools/hoes')) {
        event.cancel();
    }
});
void drumBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

hearty wave
#

You would need to cancel it client side as well, done in a client script

modest cairn
#

by using BlockEvents.rightClicked(lda), lda doesn't seem to run??

(There is no log, and no kubejs errors)

#

(Just for clarification, I'm also cancelling the event server-side)

#

Oh I see why, it's something within the script, which prevented it from loading

#

This worked, thanks!