mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-21 04:22:17 +00:00
Fix isItemValidForSlot not checking canEquip
This commit is contained in:
1 parent
bc1a910efd
commit
517641573b
1 file changed
+3
-2
@@ -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 {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user