Started by
Rikurob
on
Topic category: Help with Minecraft modding (Java Edition)
I could use some help getting the player's armor toughness value. I tried:
double armorToughness = (entity.getAttribute(Attributes.ARMOR_TOUGHNESS).getBaseValue());
And a few other things, but can't seem to get the value to call anything but 0. Is there a reason for this?
I'm pretty sure there's a code block in the latest version to detect armor toughness. You could also just manually create a procedure that returns a value based on the specific armor items the player is wearing, (though it wouldn't be compatible with other mods.) Not sure if you can actually edit armor toughness though.
I am not trying to edit it I am trying to get the value in code, and you acually could modify it but its tricky. Thank you I will look into the new update.
Don't see it. I mostly meant if anyone knows the actual java code as there isn't a procedure for that and the plugin for it doesn't work with armor toughness
For anyone else that needs this use this instead and it works, simple change.