Hello, (I don't know if this is the right place to put it) If you didn't know there is a cap to armor which is 30 armor points. (The defense points from armor pieces) Would there be a way to get rid of this cap, as I am trying to create a new damage system with armor that gives armor points that exceed 30. Thanks.
@Rexe0 I made a little util class for getting the armor points from the material (because i couldn't find any other way), then i cancel the damage event and set the health using LivingEntity#setHealth(double). #setHealth() doesn't do anything about absorption so, you'll have to reduce that as well, if you want it to act like #damage(). EDIT: In case you didn't get my point, you can reduce the damage with a custom formula like this.
Yea i see. I already made the damage formula before (using what you described). So should i just calculate the defence gain from the armor and is there no way to remove the cap?
You can just get the armor when the entity is damaged. I didn't even know about a cap (other than the 20 from full diamond armor) before so, i'm not sure.
There is a cap, so getting the armor of the entity would not be helpful if it goes over 30. Try it, just give your self an armor piece that gives over 30 defense points then check your armor stat. What I'm asking if there is an option in a server to remove or change it, or a setting within the bukkit API to remove or change it.
I thought you'd be able to get the armor but, it just wasn't calculated into the damage reduction. Can you get the armor, or is that also 30?
If you’re talking about the player’s armor stat then your armor points are capped at 30. However if you mean the attribute modifiers on a select armor piece, it isn’t capped. Calculating the armor gain from each piece isn’t preffered, as armor won’t be the only thing that grants ‘defense points’ with what I am doing.
@Rexe0 Then try calculating everything that can give armor, or get it from something that collects the information.