Fixed alicorn amulet not updating when worn as a bauble.

This commit is contained in:
Sollace 2019-02-19 10:45:28 +02:00
parent 8d1a7ea400
commit 918dd852fd

View file

@ -6,6 +6,7 @@ import baubles.api.BaubleType;
import baubles.api.BaublesApi;
import baubles.api.IBauble;
import baubles.api.cap.IBaublesItemHandler;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemStack;
@ -25,6 +26,13 @@ public class BaubleAlicornAmulet extends ItemAlicornAmulet implements IBauble {
return BaubleType.AMULET;
}
@Override
public void onWornTick(ItemStack itemstack, EntityLivingBase player) {
if (player instanceof EntityPlayer) {
onArmorTick(player.world, (EntityPlayer)player, itemstack);
}
}
@Override
public ActionResult<ItemStack> onItemRightClick(World world, EntityPlayer player, EnumHand hand) {
ItemStack itemstack = player.getHeldItem(hand);