Package cpw.mods.fml.common.network

Examples of cpw.mods.fml.common.network.FMLEmbeddedChannel.pipeline()


        }

        FMLEmbeddedChannel serverChannel = channelPair.get(Side.SERVER);
        serverChannel.attr(FMLOutboundHandler.FML_MESSAGETARGET).set(OutboundTarget.NOWHERE);
        String handlerName = serverChannel.findChannelHandlerNameForType(ForgeRuntimeCodec.class);
        serverChannel.pipeline().addAfter(handlerName, "ServerToClientConnection", new ServerToClientConnectionEstablishedHandler());
    }

    @SideOnly(Side.CLIENT)
    private static void addClientHandlers()
    {
View Full Code Here


    @SideOnly(Side.CLIENT)
    private static void addClientHandlers()
    {
        FMLEmbeddedChannel clientChannel = channelPair.get(Side.CLIENT);
        String handlerName = clientChannel.findChannelHandlerNameForType(ForgeRuntimeCodec.class);
        clientChannel.pipeline().addAfter(handlerName, "DimensionHandler", new DimensionMessageHandler());
        clientChannel.pipeline().addAfter(handlerName, "FluidIdRegistryHandler", new FluidIdRegistryMessageHandler());
    }
}
View Full Code Here

    private static void addClientHandlers()
    {
        FMLEmbeddedChannel clientChannel = channelPair.get(Side.CLIENT);
        String handlerName = clientChannel.findChannelHandlerNameForType(ForgeRuntimeCodec.class);
        clientChannel.pipeline().addAfter(handlerName, "DimensionHandler", new DimensionMessageHandler());
        clientChannel.pipeline().addAfter(handlerName, "FluidIdRegistryHandler", new FluidIdRegistryMessageHandler());
    }
}
View Full Code Here

  public static void createChannels() {
    channels = NetworkRegistry.INSTANCE.newChannel(networkChannelName, new PacketHandler());
    for(Side side:Side.values()) {
      FMLEmbeddedChannel channel = channels.get(side);
      String type = channel.findChannelHandlerNameForType(PacketHandler.class);
      channel.pipeline().addAfter(type, PacketInboundHandler.class.getName(), new PacketInboundHandler());
    }
  }

  public static void sendPacketToServer(ModernPacket packet) {
    if(MainProxy.isServer()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.