mirror of
https://github.com/GTNewHorizons/Baubles-Expanded.git
synced 2026-11-22 12:59:46 +00:00
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.
This commit is contained in:
1 parent
ea2389f017
commit
562e9330eb
1 file changed
+3
-1
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user