Add a discriminator for fluididspacket. remove extraneous channel handler.

This commit is contained in:
Christian 2014-02-02 12:19:37 -05:00
parent 978bfd6eb1
commit 67d9dac16d
2 changed files with 2 additions and 2 deletions

View file

@ -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();

View file

@ -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