How do I make an item not break upon reaching no duribility

Started by OfficialSqueaky on

Topic category: Help with Minecraft modding (Bedrock Edition)

Joined Jun 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do I make an item not break upon reaching no duribility

I want an item to have the same durability system as the elytra. I am making a mining hat that will turn on and off when the player right clicks and is shifting. Can someone help me figure out how to do this? please?

Joined Mar 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You cannot prevent the item…
Sun, 06/30/2024 - 11:48

You cannot prevent the item from being destroyed when its durability reaches 0.
Elytra will no longer allow flying when its durability reaches 1, that's why it won't be destroyed.

In your right click procedure, make such an if statement and then put the implementation of turning off and on inside the if block.
This if statement prevents the item's durability from being less than 1.