How to detect when player eats an item

Started by BlaBlaSillySheep on

Topic category: Help with Minecraft modding (Java Edition)

Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to detect when player eats an item
Wed, 09/02/2020 - 23:47 (edited)

Hey there! I'm trying to make it so that if the player has an NBT tag they wont be able to eat normal food (porkchops, steak etc) without getting potion effects. At first i thought global variables would work, but i need it to detect if the player has eaten the food so i can add the effects.

I could make it so that when the player right clicks on food, it dissapears and adds potion effects but thats kinda stopped the eating animation all together. 

Any ideas? (Wether its custom code or procedure i dont mind, just some ideas would be nice)

Stay Safe!

 

Edit: its been 2 days with no response, please, i need it for my mod, i even credit the people who i get ideas and tips from on my github.

Edited by BlaBlaSillySheep on Wed, 09/02/2020 - 23:47
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am not seeing the "When…
Thu, 09/03/2020 - 14:25

I am not seeing the "When player finishes using item" is this a plugin?

Joined Jan 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Such a helpful community…
Tue, 11/03/2020 - 23:54

Such a helpful community... Giving you answers that don't work, and don't tell you what you need for it to work.
What's the plugin?