C’est bon ça marche ! Merci à toi Robin
Voici le code
@Override
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage,
int slot) {
switch (slot) {
case 0:
return new ArmorProperties(0, ArmorMaterials.celestArmor.getDamageReductionAmount(slot) / 28.0D,
armor.getItem().getMaxDamage() + 1 - armor.getItemDamage());
case 1:
return new ArmorProperties(0, ArmorMaterials.celestArmor.getDamageReductionAmount(slot) / 28.0D,
armor.getItem().getMaxDamage() + 1 - armor.getItemDamage());
case 2:
return new ArmorProperties(0, ArmorMaterials.celestArmor.getDamageReductionAmount(slot) / 28.0D,
armor.getItem().getMaxDamage() + 1 - armor.getItemDamage());
case 3:
return new ArmorProperties(0, ArmorMaterials.celestArmor.getDamageReductionAmount(slot) / 28.0D,
armor.getItem().getMaxDamage() + 1 - armor.getItemDamage());
}
return null;
}
@Override
public int getArmorDisplay(EntityPlayer player, ItemStack armor, int slot) {
switch (slot) {
case 0:
return 4;
case 1:
return 7;
case 2:
return 5;
case 3:
return 4;
}
return slot;
}
@Override
public void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot) {
stack.damageItem(damage * 3, entity);
}}