Forgot you need to apply the effects too

This commit is contained in:
Sollace 2019-02-19 12:49:38 +02:00
parent 373a2c64cd
commit 5cfe5a63d6

View file

@ -26,6 +26,16 @@ public class BaubleAlicornAmulet extends ItemAlicornAmulet implements IBauble {
return BaubleType.AMULET; return BaubleType.AMULET;
} }
@Override
public void onEquipped(ItemStack itemstack, EntityLivingBase player) {
player.getAttributeMap().applyAttributeModifiers(itemstack.getAttributeModifiers(getEquipmentSlot(itemstack)));
}
@Override
public void onUnequipped(ItemStack itemstack, EntityLivingBase player) {
player.getAttributeMap().removeAttributeModifiers(itemstack.getAttributeModifiers(getEquipmentSlot(itemstack)));
}
@Override @Override
public void onWornTick(ItemStack itemstack, EntityLivingBase player) { public void onWornTick(ItemStack itemstack, EntityLivingBase player) {
if (player instanceof EntityPlayer) { if (player instanceof EntityPlayer) {