Trying to make a Tool use up all its durability and not break.

Started by Lord_MM on

Topic category: Help with Minecraft modding (Java Edition)

Active 2 years ago
Joined Oct 2015
Points:
718

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Trying to make a Tool use up all its durability and not break.

I've been trying the whole day to do this, trying every little thing possible and can't seem to figure it out.

I'm making a tool that makes you fly when you hold right click. I've basically made the whole flying thing, but now I want to implement fuel as the durability, and I want it to stop flying when it reaches durability 10/1000 so it doesn't break.

Active 2 years ago
Joined Nov 2019
Points:
854

User statistics:

  • Modifications: 0
  • Forum topics: 8
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 388
in "Item procedures" there's…
Tue, 06/16/2020 - 13:07

in "Item procedures" there's a "Get damage of provided item" and "Get max possible damage of provided item". max - damage = current durability.

Active 2 years ago
Joined Oct 2015
Points:
718

User statistics:

  • Modifications: 0
  • Forum topics: 2
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1
Yeah Just figured it out…
Tue, 06/16/2020 - 21:13

Yeah Just figured it out finally, so stupid, I was right there, but I just never understood exactly what those 2 procedures meant so :/

Active 1 year ago
Joined Mar 2020
Points:
871

User statistics:

  • Modifications: 3
  • Forum topics: 11
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 369
Yes,and i think it means…
Mon, 06/29/2020 - 04:29

Yes,and i think it means Average damage dealt when using the item and Max damage dealt(to other mobs) when using the item.Anyway,when item tick:if _get_durability_described_above_by_ahznb is 1 then turn it into the broken item(like elytra) which's durability is 1(nbt Damage means durability spent,set it) and there is NO WAY to break it more