Perhaps fixed a few bugs

This commit is contained in:
Aidan Brady 2013-11-11 23:19:51 -05:00
parent 80097e4d1b
commit 8cec8af952
3 changed files with 3 additions and 3 deletions

View file

@ -123,7 +123,7 @@ public class BinRecipe implements IRecipe, ICraftingHandler
bin.stackTagCompound.setInteger("newCount", inv.getItemCount()-item.stackSize);
}
else if(isBin(item) && !isBin(craftMatrix.getStackInSlot(i)))
else if(isBin(item) && craftMatrix.getStackInSlot(i) != null && !isBin(craftMatrix.getStackInSlot(i)))
{
ItemStack proxy = new ItemStack(Mekanism.ItemProxy);
((ItemProxy)proxy.getItem()).setSavedItem(proxy, craftMatrix.getStackInSlot(i));

View file

@ -112,7 +112,7 @@ public class ItemBlockBasic extends ItemBlock
}
ItemStack ret = stack.copy();
ret.stackSize = stack.stackTagCompound.getInteger("newCount");
ret.stackTagCompound.setInteger("itemCount", stack.stackTagCompound.getInteger("newCount"));
return ret;
}

View file

@ -45,7 +45,7 @@ public class ItemProxy extends Item
}
else {
stack.stackTagCompound.setBoolean("hasStack", true);
stack.stackTagCompound.setCompoundTag("savedItem", stack.writeToNBT(new NBTTagCompound()));
stack.stackTagCompound.setCompoundTag("savedItem", save.writeToNBT(new NBTTagCompound()));
}
}