mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-26 15:16:45 +01:00
Minor ImpactEventHandler cleanup
This commit is contained in:
parent
761fb3b811
commit
048a979375
@ -37,8 +37,11 @@ public class ImpactEventHandler {
|
|||||||
|
|
||||||
for (ItemStack itemStack : entityEquipment.getArmorContents()) {
|
for (ItemStack itemStack : entityEquipment.getArmorContents()) {
|
||||||
if (ItemChecks.isArmor(itemStack)) {
|
if (ItemChecks.isArmor(itemStack)) {
|
||||||
damageArmor(itemStack);
|
|
||||||
hasArmor = true;
|
hasArmor = true;
|
||||||
|
|
||||||
|
if (Misc.getRandom().nextInt(100) < 25) {
|
||||||
|
damageArmor(itemStack);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,10 +49,6 @@ public class ImpactEventHandler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void damageArmor(ItemStack armor) {
|
private void damageArmor(ItemStack armor) {
|
||||||
if (Misc.getRandom().nextInt(100) >= 25) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
float modifier = 1;
|
float modifier = 1;
|
||||||
|
|
||||||
if (armor.containsEnchantment(Enchantment.DURABILITY)) {
|
if (armor.containsEnchantment(Enchantment.DURABILITY)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user