Magic

Magic

190k Downloads

eating trigger?

zacharyki102 opened this issue ยท 3 comments

commented

Is there a spell trigger (in this case passive spells) for when a player/entity eats?

  • in my case, I'm trying to make a specific passive spell not allow the player to eat normally (it would give hunger upon casting).
commented

There is not, but I could add one. You won't be able to cancel the eating, but yeah you could give hunger. I'll call it consume.

commented

good to hear! btw while I'm thinking of it is there a possibility to blacklist what items count? specifically, if I wanted potions to still be usable?

commented

Hm- yes I think the trigger will fire before the item is consumed, so you could use the CheckInventory action with slot: mainhand .. though i guess if you drink from offhand it might get a little complicated, but I think maybe doable for the most part.

Unfortunately triggers can't really accept parameters so I can't tell you specifically what item was consumed.