Trying to make eating a specific food too much give someone an effect

Started by RabiTheCheetah on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Trying to make eating a specific food too much give someone an effect

I still have a lot to learn about the mcreator block code system. I am so confused by the attribute system. I looked for tutorials and forum posts and anything but I could not find anything. I spent a day googling and looking for answers to see if I can solve it myself, but I just can't figure out what I have done wrong.

This is my attempt https://imgur.com/a/Xf70MHN
I don't know what exactly is wrong with it, so if anyone can help tell me where I went wrong, I would really appreciate it.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
what does it currently do in…
Fri, 09/19/2025 - 10:39

what does it currently do in game and what do you want it to do that it doesn't?

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Right now, it just does not…
Fri, 09/19/2025 - 10:49

Right now, it just does not do anything. I am trying to make it so that every time they eat the food item, it lowers the attribute by one. Then when the attribute level gets below a specific point, it gives them the potion effect at a level based on how low the attribute gets.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What triggers the first…
Fri, 09/19/2025 - 10:57

What triggers the first procedure?

Try using these blocks,

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Is there an easier way to do…
Fri, 09/19/2025 - 11:30

Is there an easier way to do this without attributes? Such as just using a variable? The Attributes are really complicated and just not working.

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I just found out, I forgot…
Fri, 09/19/2025 - 11:34

I just found out, I forgot to give the custom attribute a max an a minimum. I will now try it after changing that and see if that one thing was the entire issue.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You can use a global…
Fri, 09/19/2025 - 11:39

You can use a global variable,

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I made the global Variable,…
Fri, 09/19/2025 - 11:47

I made the global Variable, but I am not sure how to get it to show up in the procedure.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you have to save and reopen…
Fri, 09/19/2025 - 11:49

you have to save and reopen it for some reason

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is now half working,…
Fri, 09/19/2025 - 12:01

It is now half working, which is better than not working.

Joined Sep 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
It is now working, thank you…
Fri, 09/19/2025 - 12:16

It is now working, thank you so much.