Add a discriminator for fluididspacket. remove extraneous channel handler.
This commit is contained in:
parent
978bfd6eb1
commit
67d9dac16d
2 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,6 @@ import cpw.mods.fml.common.network.FMLEmbeddedChannel;
|
|||
import cpw.mods.fml.common.network.FMLOutboundHandler;
|
||||
import cpw.mods.fml.common.network.FMLOutboundHandler.OutboundTarget;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.network.internal.HandshakeCompletionHandler;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
@ -16,7 +15,7 @@ public class ForgeNetworkHandler
|
|||
|
||||
public static void registerChannel(ForgeModContainer forgeModContainer, Side side)
|
||||
{
|
||||
channelPair = NetworkRegistry.INSTANCE.newChannel(forgeModContainer, "FORGE", new ForgeRuntimeCodec(), new HandshakeCompletionHandler());
|
||||
channelPair = NetworkRegistry.INSTANCE.newChannel(forgeModContainer, "FORGE", new ForgeRuntimeCodec());
|
||||
if (side == Side.CLIENT)
|
||||
{
|
||||
addClientHandlers();
|
||||
|
|
|
@ -8,6 +8,7 @@ public class ForgeRuntimeCodec extends FMLIndexedMessageToMessageCodec<ForgeMess
|
|||
public ForgeRuntimeCodec()
|
||||
{
|
||||
addDiscriminator(1, ForgeMessage.DimensionRegisterMessage.class);
|
||||
addDiscriminator(2, ForgeMessage.FluidIdMapMessage.class);
|
||||
}
|
||||
@Override
|
||||
public void encodeInto(ChannelHandlerContext ctx, ForgeMessage msg, ByteBuf target) throws Exception
|
||||
|
|
Loading…
Reference in a new issue