Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
TileEntity te = ((EntityPlayer)player).worldObj.getBlockTileEntity((Integer)packetReadout[0], (Integer)packetReadout[1], (Integer)packetReadout[2]);
if (te instanceof TileEntityConveyor)
{
TileEntityConveyor tec = (TileEntityConveyor) te;
tec.setDyeColor((Integer)packetReadout[3]);
tec.setConveyorActive((Boolean)packetReadout[4]);
}
}
else if (packetType == Packets.AutoJukeboxPlay) // server -> client; server playing a record
{
Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
TileEntity te = ((EntityPlayer)player).worldObj.getBlockTileEntity((Integer)packetReadout[0], (Integer)packetReadout[1], (Integer)packetReadout[2]);
if(te instanceof TileEntityAutoJukebox)
{
Minecraft.getMinecraft().ingameGUI.setRecordPlayingMessage(((ItemRecord)Item.itemsList[(Integer)packetReadout[3]]).recordName);
}
}
else if (packetType == Packets.RoadBlockUpdate) // server -> client; road block light changed
{
Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class };
Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
((EntityPlayer)player).worldObj.setBlock((Integer)packetReadout[0], (Integer)packetReadout[1], (Integer)packetReadout[2], MineFactoryReloadedCore.factoryRoadBlock.blockID, (Integer)packetReadout[3], 6);
((EntityPlayer)player).worldObj.markBlockForRenderUpdate((Integer)packetReadout[0], (Integer)packetReadout[1], (Integer)packetReadout[2]);
}
else if (packetType == Packets.CableDescription) // server -> client; cable side colors
{
Class[] decodeAs = { Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Integer.class, Byte.class };
Object[] packetReadout = PacketWrapper.readPacketData(data, decodeAs);
TileEntity te = ((EntityPlayer)player).worldObj.getBlockTileEntity((Integer)packetReadout[0], (Integer)packetReadout[1], (Integer)packetReadout[2]);
if(te instanceof TileEntityRedNetCable)
{
TileEntityRedNetCable tec = (TileEntityRedNetCable) te;
tec.setSideColor(ForgeDirection.DOWN, (Integer)packetReadout[3]);
tec.setSideColor(ForgeDirection.UP, (Integer)packetReadout[4]);
tec.setSideColor(ForgeDirection.NORTH, (Integer)packetReadout[5]);
tec.setSideColor(ForgeDirection.SOUTH, (Integer)packetReadout[6]);
tec.setSideColor(ForgeDirection.WEST, (Integer)packetReadout[7]);
tec.setSideColor(ForgeDirection.EAST, (Integer)packetReadout[8]);
tec.setMode((Byte)packetReadout[9]);
}
}
else if(packetType == Packets.LogicCircuitDefinition) // server -> client: logic circuit (class and pins)
{
Class[] decodeAs = { Integer.class, Integer.class, Integer.class };