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)
{
TileEntityAutoJukebox j = ((TileEntityAutoJukebox)te);
int button = (Integer)packetReadout[3];
if(button == 1) j.playRecord();
else if(button == 2) j.stopRecord();
else if(button == 3) j.copyRecord();
}
}
else if(packetType == Packets.AutoSpawnerButton) // client -> server: toggle autospawner
{
Class[] decodeAs = { Integer.class, Integer.class, Integer.class };