Search in sources :

Example 16 with ModernPacket

use of logisticspipes.network.abstractpackets.ModernPacket in project LogisticsPipes by RS485.

the class PacketHandler method onPacketData.

//hacky callback to process packets coming from by the packetbufferhandler decompressors
//TODO replace with proper netty implementation
public static void onPacketData(final LPDataInput data, final EntityPlayer player) {
    if (player == null) {
        return;
    }
    final int packetID = data.readShort();
    final ModernPacket packet = PacketHandler.packetlist.get(packetID).template();
    packet.setDebugId(data.readInt());
    packet.readData(data);
    PacketHandler.onPacketData(packet, player);
}
Also used : ModernPacket(logisticspipes.network.abstractpackets.ModernPacket)

Aggregations

ModernPacket (logisticspipes.network.abstractpackets.ModernPacket)16 ArrayList (java.util.ArrayList)2 ItemSinkFuzzy (logisticspipes.network.packets.modules.ItemSinkFuzzy)2 SatPipeNext (logisticspipes.network.packets.satpipe.SatPipeNext)2 SatPipePrev (logisticspipes.network.packets.satpipe.SatPipePrev)2 ClassInfo (com.google.common.reflect.ClassPath.ClassInfo)1 ByteBuf (io.netty.buffer.ByteBuf)1 LogisticsModule (logisticspipes.modules.abstractmodules.LogisticsModule)1 IPipeSign (logisticspipes.pipes.signs.IPipeSign)1 SneakyThrows (lombok.SneakyThrows)1