So, I'm trying to change the blockstate of a composter. I got that working, but have no idea how to consume an item from the inventory. Also, I can't seem to get the arm to swing upon using the item on the composter.
BlockEvents.rightClicked('minecraft:composter', event => {
const {player,item} = event
if (item == 'test_thingy' && event.player.inventory.count('minecraft:redstone')) {
event.block.set("minecraft:composter", {level: '7'})
}
event.player.swingArm(event.hand)
})```
I'm sorry in advance. I'm new to literally anything beyond adding an item or block to the game.