Making a tool that does not break on reaching 0 durability?

Started by 1ZKCARTI3 on

Topic category: Help with modding (Java Edition)

Last seen on 22:13, 31. Jan 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making a tool that does not break on reaching 0 durability?
Mon, 01/31/2022 - 02:14 (edited)

So, I'm a bit new to Mcreator and I've scoured the forums for about 3-4 hours and looking into some possible ways but no luck on my part.

The item/tool I have is a Drill with 512 "charge/durability". I want it to be able to not instantly break upon reaching 0 durability but instead be "repaired/charged" using fuel cells. The only problem I have is finding out how to keep it from breaking. 

I saw something about "get max possible damage of" and "get damage of" unfortunately the post ended there without much clarification on how to make it work.

Thanks.

Edited by 1ZKCARTI3 on Mon, 01/31/2022 - 02:14
Last seen on 01:38, 5. Feb 2022
Joined Jan 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could use a number tag…
Mon, 01/31/2022 - 03:22

You could use a number tag that is set to 512 by default and decreases by 1 each time the item is used. Then you could just make the item non-functional when the number reaches 0

Last seen on 07:01, 30. May 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i also need help with smth…
Tue, 04/26/2022 - 03:00

i also need help with smth like this i have a item called a void staff i also want it to not break at 0 durability i also want to repair it somehow

Last seen on 07:01, 30. May 2022
Joined Apr 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
or it can use xp
Tue, 04/26/2022 - 03:08

or it can use xp