Search in sources :

Example 1 with PacketHandler

use of logisticspipes.network.PacketHandler in project LogisticsPipes by RS485.

the class MainProxy method createChannels.

public static void createChannels() {
    MainProxy.channels = NetworkRegistry.INSTANCE.newChannel(MainProxy.networkChannelName, new PacketHandler());
    for (Side side : Side.values()) {
        FMLEmbeddedChannel channel = MainProxy.channels.get(side);
        String type = channel.findChannelHandlerNameForType(PacketHandler.class);
        channel.pipeline().addAfter(type, PacketInboundHandler.class.getName(), new PacketInboundHandler());
    }
}
Also used : Side(net.minecraftforge.fml.relauncher.Side) PacketHandler(logisticspipes.network.PacketHandler) PacketInboundHandler(logisticspipes.network.PacketInboundHandler) FMLEmbeddedChannel(net.minecraftforge.fml.common.network.FMLEmbeddedChannel)

Aggregations

PacketHandler (logisticspipes.network.PacketHandler)1 PacketInboundHandler (logisticspipes.network.PacketInboundHandler)1 FMLEmbeddedChannel (net.minecraftforge.fml.common.network.FMLEmbeddedChannel)1 Side (net.minecraftforge.fml.relauncher.Side)1