Started by
Kaisoul_TV
on
Topic category: Help with Minecraft modding (Java Edition)
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.
Topic category: Help with Minecraft modding (Java Edition)
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.
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.
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