Hello i'am new and i want to make a mod of food but i need help with one thing

Started by Zanxuz on

Topic category: Help with modding (Java Edition)

Last seen on 14:42, 31. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hello i'am new and i want to make a mod of food but i need help with one thing

Hello I want to make a food mod but I want to detect the hunger value of the food automatically in a block, something like "get the food value of apple", but i don't know how, you can even?

Last seen on 13:40, 1. Sep 2023
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Something like variable will…
Fri, 07/30/2021 - 05:50

Something like variable will help you.

What do you mean, detect it then what?
Hunger? Healed? or what?

Last seen on 14:42, 31. Jul 2021
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i mean how to get the amount…
Fri, 07/30/2021 - 17:55

i mean how to get the amount of hunger what a food restores when is eaten, but i want to get with a procedure or in code because i want to get  the value even of other mod without need of add recipes for compability, something like "this food restores 5 point of hunger so the machine will return 5 items"

Last seen on 13:40, 1. Sep 2023
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh, please wait. Go to your…
Sat, 07/31/2021 - 08:33

Oh, please wait.

Go to your food element, go to properties

Do you see nutritional value?

If you change it to 1, it's 1/2 of hunger bar

If you change it to 2, it's 1 hunger bar

If you change it to 4, it's 4 hunger bar

If you change it to 20, it's full

 

Hope this help :)