Всем привет.Добавил наплечники,когда кладу в кастомный слот он не добавляет броню.Помогите пж
Java:
public class ItemBaubleArmor extends ItemBauble implements IProtectableBauble{
public ItemBaubleArmor(String itemName, EnumBaubleType baubleType, String... itemNames){
super(itemName, baubleType, itemNames);
}
public int getProtection(EntityPlayer player, ItemStack itemStack, DamageSource source, double damage){
return getBaubleProtection(itemStack);
}
public int getDisplayProtection(EntityPlayer player, ItemStack itemStack){
return getBaubleProtection(itemStack);
}
public int getBaubleProtection(ItemStack itemStack){
switch(itemStack.getItemDamage()){
case 0:
return 1;
case 1:
return 2;
case 2:
return 3;
case 3:
return 4;
default:
return 0;
}
}
}
Java:
public interface IProtectableBauble extends IBauble{
public int getProtection(EntityPlayer player, ItemStack itemStack, DamageSource source, double damage);
public int getDisplayProtection(EntityPlayer player, ItemStack itemStack);
}