From 562e9330eb700f130f70538c76d1c9f34ee0b4b1 Mon Sep 17 00:00:00 2001 From: CJCutrone Date: Wed, 9 Apr 2014 11:43:06 -0500 Subject: [PATCH] Not consume Item while in Creative Changes the condition of making the item null on use so that player's in creative don't loose the item upon right click. Similar to how vanilla handles armor. --- src/main/java/baubles/common/items/ItemRing.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/baubles/common/items/ItemRing.java b/src/main/java/baubles/common/items/ItemRing.java index bb289f8..e40b0e2 100644 --- a/src/main/java/baubles/common/items/ItemRing.java +++ b/src/main/java/baubles/common/items/ItemRing.java @@ -62,7 +62,9 @@ public class ItemRing extends Item implements IBauble for(int i = 0; i < baubles.getSizeInventory(); i++) if(baubles.getStackInSlot(i) == null && baubles.isItemValidForSlot(i, par1ItemStack)) { baubles.setInventorySlotContents(i, par1ItemStack.copy()); - par3EntityPlayer.inventory.setInventorySlotContents(par3EntityPlayer.inventory.currentItem, null); + if(!par3EntityPlayer.capabilities.isCreativeMode){ + par3EntityPlayer.inventory.setInventorySlotContents(par3EntityPlayer.inventory.currentItem, null); + } onEquipped(par1ItemStack, par3EntityPlayer); break; }