Fixed a dupe with the Ring of Loki that allowed for seeds, and potentially other items of the sort, to be infinitely generated.

This commit is contained in:
Lizbeth Rika committed 2015-04-17 10:43:05 +01:00
1 parent 99d711ba57
commit 514e1dfb4b
1 file changed
+6 -1
@@ -102,8 +102,13 @@ public class ItemLokiRing extends ItemRelicBauble implements IWireframeCoordinat
int y = lookPos.blockY + cursor.posY;
int z = lookPos.blockZ + cursor.posZ;
Item item = heldItemStack.getItem();
if(!player.worldObj.isAirBlock(x, y, z))
if(!player.worldObj.isAirBlock(x, y, z)) {
item.onItemUse(player.capabilities.isCreativeMode ? heldItemStack.copy() : heldItemStack, player, player.worldObj, x, y, z, lookPos.sideHit, (float) lookPos.hitVec.xCoord - x, (float) lookPos.hitVec.yCoord - y, (float) lookPos.hitVec.zCoord - z);
if(heldItemStack.stackSize == 0) {
event.setCanceled(true);
return;
}
}
}
}
}