--- ../src-base/minecraft/net/minecraft/network/handshake/client/C00Handshake.java
+++ ../src-work/minecraft/net/minecraft/network/handshake/client/C00Handshake.java
@@ -16,6 +16,7 @@
     private int field_149599_c;
     private EnumConnectionState field_149597_d;
     private static final String __OBFID = "CL_00001372";
+    private boolean hasFMLMarker = false;
 
     public C00Handshake() {}
 
@@ -28,18 +29,26 @@
         this.field_149597_d = p_i45266_4_;
     }
 
+    public C00Handshake(int protocol, String address, int port, EnumConnectionState state, boolean addFMLMarker)
+    {
+        this(protocol, address, port, state);
+        this.hasFMLMarker = addFMLMarker;
+    }
+
     public void func_148837_a(PacketBuffer p_148837_1_) throws IOException
     {
         this.field_149600_a = p_148837_1_.func_150792_a();
         this.field_149598_b = p_148837_1_.func_150789_c(255);
         this.field_149599_c = p_148837_1_.readUnsignedShort();
         this.field_149597_d = EnumConnectionState.func_150760_a(p_148837_1_.func_150792_a());
+        this.hasFMLMarker = this.field_149598_b.contains("\0FML\0");
+        this.field_149598_b = this.field_149598_b.split("\0")[0];
     }
 
     public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
     {
         p_148840_1_.func_150787_b(this.field_149600_a);
-        p_148840_1_.func_180714_a(this.field_149598_b);
+        p_148840_1_.func_180714_a(this.field_149598_b + "\0FML\0");
         p_148840_1_.writeShort(this.field_149599_c);
         p_148840_1_.func_150787_b(this.field_149597_d.func_150759_c());
     }
@@ -63,4 +72,9 @@
     {
         this.func_180770_a((INetHandlerHandshakeServer)p_148833_1_);
     }
+
+    public boolean hasFMLMarker()
+    {
+        return this.hasFMLMarker;
+    }
 }
