mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-18 11:19:19 +00:00
Fix #2590 baubles disappearing
This commit is contained in:
1 parent
e3e4522339
commit
34afbd45ab
1 file changed
+4
@@ -103,6 +103,10 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
|
||||
if(baubles.isItemValidForSlot(i, toEquip, player)) {
|
||||
ItemStack stackInSlot = baubles.getStackInSlot(i);
|
||||
if(stackInSlot.isEmpty() || ((IBauble) stackInSlot.getItem()).canUnequip(stackInSlot, player)) {
|
||||
// If toEquip and stackInSlot are stacks with equal value but not identity, ItemStackHandler.setStackInSlot actually does nothing >.>
|
||||
// Prevent it from trying to be overly smart by going through empty first
|
||||
baubles.setStackInSlot(i, ItemStack.EMPTY);
|
||||
|
||||
baubles.setStackInSlot(i, toEquip);
|
||||
((IBauble) toEquip.getItem()).onEquipped(toEquip, player);
|
||||
|
||||
|
||||
Reference in new issue
Block a user