How to make armor that convert damage to it durability

Started by Kaisoul_TV on

Topic category: Help with modding (Java Edition)

Last seen on 14:32, 11. Apr 2024
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make armor that convert damage to it durability

So, I need help with this thing, when player take damage -> the armor convert all the damage to decrease it durabilty to save the player.

Last seen on 22:15, 1. Mar 2024
Joined Jul 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
If I understand what you're…
Tue, 11/23/2021 - 00:31

If I understand what you're trying to say correctly, I think I have an idea...

Set the durability of the armor to whatever durability you want it to have, and make a procedure that keeps the health at the same amount. That way, the player is invincible until the armor breaks.

Hope this helps.

Last seen on 17:06, 2. Aug 2022
Joined Apr 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the "before entity takes…
Tue, 11/23/2021 - 13:40

Use the "before entity takes damage" event, check if the entity is player wearing the armor, cancel the event and THEN make it use the durabilty of the armor

if you cancel it after there might be a bug causing damage to be taken anyway