gui procedure to check items durability not working for me

Started by Kinyoshi on

Topic category: Help with modding (Java Edition)

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
gui procedure to check items durability not working for me
Fri, 07/24/2020 - 08:25 (edited)

I have a block I'm working on to repair stuff, everything works fine except the part where it checks for the items durability.. I had to working fine yesterday but I played around with the procedure without saving a backup of it and now I can't get it to work..

I'm not putting the whole procedure in the pic, only the part I'm having trouble with..

What it's supposed to do is if durability is less than max durability then repair, else not repair and say it has already been done.

What's happening is it's repairing each time and I don't remember how I had it when it was working, I swear it is the same way, and it was working last night.

Now I can't get it to work.. :(

Anyone see what I'm missing?

Working with MC 1.15.2 and Mcreator 2020.3..

https://ibb.co/vVv46D9

:(

Edited by Kinyoshi on Fri, 07/24/2020 - 08:25
Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
damage is always less than…
Fri, 07/24/2020 - 12:00

damage is always less than the max damage unless your max damage is 0. durability = max_damage - damage

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Any idea how to do this then…
Sat, 07/25/2020 - 00:14

Any idea how to do this then? I can't remember how I had it to get it to work.

Last seen on 05:29, 31. Jan 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if damage > 0 do whatever
Sat, 07/25/2020 - 01:15

if damage > 0 do whatever

Last seen on 21:24, 26. Dec 2022
Joined Dec 2017
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I am so stupid :( I shouldn…
Sat, 07/25/2020 - 05:47

I am so stupid :( I shouldn't have had to ask for help, I should have known this by now..

Thank you much ahznb :), it is much appreciated!!.