Small fixes to Advanced workbench
This commit is contained in:
parent
49153e1df9
commit
39572b281d
1 changed files with 24 additions and 3 deletions
|
@ -3,6 +3,7 @@ package buildcraft.silicon;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import buildcraft.api.core.Orientations;
|
import buildcraft.api.core.Orientations;
|
||||||
|
import buildcraft.core.IMachine;
|
||||||
import buildcraft.core.network.PacketIds;
|
import buildcraft.core.network.PacketIds;
|
||||||
import buildcraft.core.network.PacketSlotChange;
|
import buildcraft.core.network.PacketSlotChange;
|
||||||
import buildcraft.core.proxy.CoreProxy;
|
import buildcraft.core.proxy.CoreProxy;
|
||||||
|
@ -18,7 +19,7 @@ import net.minecraft.src.NBTTagCompound;
|
||||||
import net.minecraft.src.NBTTagList;
|
import net.minecraft.src.NBTTagList;
|
||||||
import net.minecraft.src.TileEntity;
|
import net.minecraft.src.TileEntity;
|
||||||
|
|
||||||
public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInventory, ILaserTarget {
|
public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInventory, ILaserTarget, IMachine {
|
||||||
public TileAssemblyAdvancedWorkbench() {
|
public TileAssemblyAdvancedWorkbench() {
|
||||||
craftingSlots = new SimpleInventory(9, "CraftingSlots", 1);
|
craftingSlots = new SimpleInventory(9, "CraftingSlots", 1);
|
||||||
storageSlots = new ItemStack[27];
|
storageSlots = new ItemStack[27];
|
||||||
|
@ -33,7 +34,7 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getSizeInventory() {
|
public int getSizeInventory() {
|
||||||
return 27 + 9 + 1;
|
return 27;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -220,7 +221,7 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent
|
||||||
storageSlots = tempStorage;
|
storageSlots = tempStorage;
|
||||||
storedEnergy -= getRequiredEnergy();
|
storedEnergy -= getRequiredEnergy();
|
||||||
ItemStack output = outputSlot.copy();
|
ItemStack output = outputSlot.copy();
|
||||||
boolean putToPipe = Utils.addToRandomPipeEntry(this, Orientations.Unknown, output);
|
boolean putToPipe = Utils.addToRandomPipeEntry(this, Orientations.YPos, output);
|
||||||
if (!putToPipe)
|
if (!putToPipe)
|
||||||
{
|
{
|
||||||
for (int i = 0; i < storageSlots.length; i++)
|
for (int i = 0; i < storageSlots.length; i++)
|
||||||
|
@ -311,4 +312,24 @@ public class TileAssemblyAdvancedWorkbench extends TileEntity implements IInvent
|
||||||
return zCoord;
|
return zCoord;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isActive() {
|
||||||
|
return hasCurrentWork();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean manageLiquids() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean manageSolids() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean allowActions() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue