Hello! I'm trying to create a script for a spice that you hold on your offhand that gets consumed when eating an item. I use lore to detect these custom items. It only seems to work if there is only one of the item in my offhand. If it's stacked or renamed to anything else the script doesn't work. Please help!
Code:
on consume rotten flesh:
if player's offhand tool is cocoa beans with lore "Coriander":
remove 1 cocoa beans with lore "Coriander" from player's inventory
feed the player by 4 beefs
wait a tick
remove potion effect of hunger from player's active potion effects