I'm trying to do this thing :
When i right click with a cactus renamed "ciao" it spawn a stone block under me
ItemEvents.rightClicked(event => {
const player = event.entity;
const item = event.item;
if (item.id === 'minecraft:cactus' && item.hoverName === 'ciao') {
player.block.down.set('minecraft:stone');
player.displayClientMessage('Il blocco sotto di te è stato cambiato in pietra!', true);
return 1;
};
}
);
it don't work