Fix Smeltery eating invalid items, only attack mobs if fluid is inside Smeltery

This commit is contained in:
mDiyo committed 2013-09-21 04:32:46 -07:00
1 parent e57da5ad4e
commit e07bd5312f
1 file changed
+3 -3
@@ -357,7 +357,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
item.age = 0;
ItemStack istack = item.getEntityItem();
if (istack.stackSize <= 0)
if (istack == null || istack.stackSize <= 0)
return;
int maxSlot = this.getSizeInventory();
@@ -369,8 +369,8 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci
ItemStack stack = this.getStackInSlot(i);
if (stack == null && istack.stackSize > 0)
{
this.setInventorySlotContents(i, new ItemStack(istack.getItem(), 1));
istack.stackSize -= 1;
ItemStack copy = istack.splitStack(1);
this.setInventorySlotContents(i, copy);
itemAdded = true;
if (istack.stackSize <= 0)
{