How to detect when player eats an item

Started by BlaBlaSillySheep on Wed, 09/02/2020 - 16:35

Topic category: Help with modding (Java Edition)

Last seen on 14:19, 31. May 2021
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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
Last seen on 14:19, 31. May 2021
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Thank you!
Thu, 09/03/2020 - 14:06

Thank you!

Last seen on 14:19, 31. May 2021
Joined Apr 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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?

Last seen on 00:22, 3. Sep 2021
Joined Feb 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
yes it is  
Fri, 10/02/2020 - 20:28

yes it is

 

Last seen on 22:52, 1. Dec 2020
Joined Jan 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • 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?