From 517641573bd99df54170eb2f6cfddbd94cb1d0b9 Mon Sep 17 00:00:00 2001 From: copygirl Date: Mon, 7 Apr 2014 18:35:18 +0200 Subject: [PATCH] Fix isItemValidForSlot not checking canEquip --- src/main/java/baubles/common/container/InventoryBaubles.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/baubles/common/container/InventoryBaubles.java b/src/main/java/baubles/common/container/InventoryBaubles.java index 37be973..222b95c 100644 --- a/src/main/java/baubles/common/container/InventoryBaubles.java +++ b/src/main/java/baubles/common/container/InventoryBaubles.java @@ -172,7 +172,8 @@ public class InventoryBaubles implements IInventory { */ @Override public boolean isItemValidForSlot(int i, ItemStack stack) { - if (stack == null || !(stack.getItem() instanceof IBauble)) + if (stack == null || !(stack.getItem() instanceof IBauble) + || !((IBauble) stack.getItem()).canEquip(stack, player.get())) return false; if (i == 0 && ((IBauble) stack.getItem()).getBaubleType(stack) == BaubleType.AMULET) @@ -222,4 +223,4 @@ public class InventoryBaubles implements IInventory { } } } -} \ No newline at end of file +}