Fix lens being consume in creative when attached to a prism

Closes #1164
This commit is contained in:
TheWhiteWolves committed 2015-07-19 10:10:38 +01:00
1 parent 32f762c01b
commit 5b37b6b246
1 file changed
+3 -1
@@ -97,7 +97,9 @@ public class BlockPrism extends BlockModContainer implements IManaTrigger, ILexi
int meta = par1World.getBlockMetadata(par2, par3, par4);
if(lens == null && isHeldItemLens) {
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);
if(!par5EntityPlayer.capabilities.isCreativeMode)
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);
prism.setInventorySlotContents(0, heldItem.copy());
prism.markDirty();
par1World.setBlockMetadataWithNotify(par2, par3, par4, meta | 1, 1 | 2);