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)

Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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.

Joined Oct 2015
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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 :/

Joined Mar 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
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