Only allow the bauble version to go into the bauble slot (breaks shift-clicking)

This commit is contained in:
Sollace 2019-02-19 13:12:03 +02:00
parent 5cfe5a63d6
commit 33534ecea5

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.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.EntityEquipmentSlot;
@ -60,6 +61,11 @@ public class BaubleAlicornAmulet extends ItemAlicornAmulet implements IBauble {
return new ActionResult<ItemStack>(EnumActionResult.FAIL, itemstack);
}
@Override
public boolean isValidArmor(ItemStack stack, EntityEquipmentSlot armorType, Entity entity) {
return false;
}
@Override
public EntityEquipmentSlot getEquipmentSlot() {
return EntityEquipmentSlot.MAINHAND;