need help- Custom procedure to use durability as food

Started by Dandyroot on

Topic category: Help with MCreator software

Last seen on 07:52, 9. Aug 2022
Joined Mar 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
need help- Custom procedure to use durability as food
Fri, 07/29/2022 - 02:28 (edited)

I've recently opened up Mcreator for the first time, and am currently trying to puzzle out making an item (soup thermos) that refills hunger and saturation when used, but loses durability after using instead of vanishing, doesn't work with zero durability, doesn't break at zero durability, and can be repaired (refilled) at a custom block.

 

right now i know... seriously nothing about this software. below is a procedure for eating from the thermos that i put together off intuition, but no actual knowledge of how these classes work...
 

Event Trigger

     if get Damage Of(provided itemstack) > 0;

          set Food Level of (target entity) to (get food level of (target entity) + get food value of (itemstack))

          set saturation level of (target entity) to (get saturation level of (target entity) + get saturation value of (itemstack))

          deal 1 damage to (itemstack)

 

[i can't figure out how to put that in as an image]

 

i'm pretty convinced this is slapdash as all hell and would break many things, especially that bit about increase food level, but looking around i can't find any better way to make this work, and for that matter i don't know the proper way to "look around". could i get some input from someone that knows this software better?

Edited by Dandyroot on Fri, 07/29/2022 - 02:28