Fixed processor output

Forgot to copy the stack when using receipe output stack.
This commit is contained in:
DarkGuardsman 2013-09-16 08:46:02 -04:00
parent 6f48a50674
commit a2dea095b1

View file

@ -10,6 +10,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.common.ForgeDirection; import net.minecraftforge.common.ForgeDirection;
import dark.api.ProcessorRecipes; import dark.api.ProcessorRecipes;
import dark.api.ProcessorRecipes.ProcessorType; import dark.api.ProcessorRecipes.ProcessorType;
import dark.core.interfaces.IInvBox;
import dark.core.network.PacketHandler; import dark.core.network.PacketHandler;
import dark.core.prefab.TileEntityMachine; import dark.core.prefab.TileEntityMachine;
import dark.core.prefab.invgui.InvChest; import dark.core.prefab.invgui.InvChest;
@ -145,7 +146,7 @@ public class TileEntityProcessor extends TileEntityMachine
if (receipeResult != null && (outputSlotStack == null || outputSlotStack.isItemEqual(receipeResult))) if (receipeResult != null && (outputSlotStack == null || outputSlotStack.isItemEqual(receipeResult)))
{ {
ItemStack outputStack = outputSlotStack == null ? receipeResult : outputSlotStack.copy(); ItemStack outputStack = outputSlotStack == null ? receipeResult.copy() : outputSlotStack.copy();
if (outputSlotStack != null) if (outputSlotStack != null)
{ {
outputStack.stackSize += receipeResult.stackSize; outputStack.stackSize += receipeResult.stackSize;
@ -157,13 +158,13 @@ public class TileEntityProcessor extends TileEntityMachine
} }
@Override @Override
public InvChest getInventory() public IInvBox getInventory()
{ {
if (inventory == null) if (inventory == null)
{ {
inventory = new InvChest(this, 4); inventory = new InvChest(this, 4);
} }
return (InvChest) inventory; return inventory;
} }
@Override @Override