Merge branch 'bungeecord' of github.com:bloodmc/FML

This commit is contained in:
cpw 2014-08-29 21:37:48 -04:00
commit 67ebda9ace
3 changed files with 9 additions and 0 deletions

View file

@ -125,6 +125,11 @@ enum FMLHandshakeClientState implements IHandshakeState<FMLHandshakeClientState>
@Override @Override
public FMLHandshakeClientState accept(ChannelHandlerContext ctx, FMLHandshakeMessage msg) public FMLHandshakeClientState accept(ChannelHandlerContext ctx, FMLHandshakeMessage msg)
{ {
if (msg instanceof FMLHandshakeMessage.HandshakeReset)
{
GameData.revertToFrozen();
return HELLO;
}
return this; return this;
} }
}, },

View file

@ -12,6 +12,7 @@ public class FMLHandshakeCodec extends FMLIndexedMessageToMessageCodec<FMLHandsh
addDiscriminator((byte)2, FMLHandshakeMessage.ModList.class); addDiscriminator((byte)2, FMLHandshakeMessage.ModList.class);
addDiscriminator((byte)3, FMLHandshakeMessage.ModIdData.class); addDiscriminator((byte)3, FMLHandshakeMessage.ModIdData.class);
addDiscriminator((byte)-1, FMLHandshakeMessage.HandshakeAck.class); addDiscriminator((byte)-1, FMLHandshakeMessage.HandshakeAck.class);
addDiscriminator((byte)-2, FMLHandshakeMessage.HandshakeReset.class);
} }
@Override @Override
public void encodeInto(ChannelHandlerContext ctx, FMLHandshakeMessage msg, ByteBuf target) throws Exception public void encodeInto(ChannelHandlerContext ctx, FMLHandshakeMessage msg, ByteBuf target) throws Exception

View file

@ -235,6 +235,9 @@ public abstract class FMLHandshakeMessage {
return super.toString(side) + ":{"+phase+"}"; return super.toString(side) + ":{"+phase+"}";
} }
} }
public static class HandshakeReset extends FMLHandshakeMessage {
public HandshakeReset() {}
}
public void fromBytes(ByteBuf buffer) public void fromBytes(ByteBuf buffer)
{ {
} }