Fixed some things!!
This commit is contained in:
parent
8d9ee35679
commit
b49defae88
4 changed files with 17 additions and 5 deletions
|
@ -58,6 +58,7 @@ public class PacketHandler implements IPacketHandler
|
|||
packetType.read(dataStream, entityplayer, entityplayer.worldObj);
|
||||
} catch(Exception e) {
|
||||
System.err.println("[Mekanism] Error while reading '" + packetType.getName() + "' packet.");
|
||||
e.printStackTrace();
|
||||
}
|
||||
} catch(Exception e) {
|
||||
System.err.println("[Mekanism] Error while handling packet.");
|
||||
|
|
|
@ -84,7 +84,7 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
if(inInventory != null && inInventory.itemStack != null)
|
||||
{
|
||||
if(TransporterUtils.insert((TileEntity)inventory, transporter, inInventory.itemStack, color))
|
||||
if(TransporterUtils.insert(this, transporter, inInventory.itemStack, color))
|
||||
{
|
||||
inventory.setInventorySlotContents(inInventory.slotID, null);
|
||||
setActive(true);
|
||||
|
@ -147,7 +147,9 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
|
||||
filters.clear();
|
||||
|
||||
for(int i = 0; i < dataStream.readInt(); i++)
|
||||
int amount = dataStream.readInt();
|
||||
|
||||
for(int i = 0; i < amount; i++)
|
||||
{
|
||||
filters.add(TransporterFilter.readFromPacket(dataStream));
|
||||
}
|
||||
|
@ -189,6 +191,13 @@ public class TileEntityLogisticalSorter extends TileEntityElectricBlock implemen
|
|||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int[] getAccessibleSlotsFromSide(int side)
|
||||
{
|
||||
return new int[] {0};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public RedstoneControl getControlType()
|
||||
|
|
|
@ -202,7 +202,6 @@ public class TileEntityLogisticalTransporter extends TileEntityTransmitter<Inven
|
|||
|
||||
public boolean insert(Object3D original, ItemStack itemStack, EnumColor color)
|
||||
{
|
||||
needsSync = true;
|
||||
TransporterStack stack = new TransporterStack();
|
||||
stack.itemStack = itemStack;
|
||||
stack.originalLocation = original;
|
||||
|
@ -215,6 +214,7 @@ public class TileEntityLogisticalTransporter extends TileEntityTransmitter<Inven
|
|||
|
||||
if(stack.recalculatePath(this))
|
||||
{
|
||||
needsSync = true;
|
||||
transit.add(stack);
|
||||
return true;
|
||||
}
|
||||
|
@ -341,7 +341,9 @@ public class TileEntityLogisticalTransporter extends TileEntityTransmitter<Inven
|
|||
|
||||
transit.clear();
|
||||
|
||||
for(int i = 0; i < dataStream.readInt(); i++)
|
||||
int amount = dataStream.readInt();
|
||||
|
||||
for(int i = 0; i < amount; i++)
|
||||
{
|
||||
transit.add(TransporterStack.readFromPacket(dataStream));
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ public class TransporterStack
|
|||
|
||||
public int progress;
|
||||
|
||||
public EnumColor color = EnumColor.AQUA;
|
||||
public EnumColor color = null;
|
||||
|
||||
public boolean initiatedPath = false;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue