Support Minecraft 1.9.2

This commit is contained in:
Thinkofname 2016-03-30 16:57:54 +01:00
parent 6b4e285186
commit d1a1e87ab5
3 changed files with 7 additions and 3 deletions

View File

@ -109,7 +109,8 @@ public enum Protocol
public static List<Integer> supportedVersions = Arrays.asList(
ProtocolConstants.MINECRAFT_1_8,
ProtocolConstants.MINECRAFT_1_9,
ProtocolConstants.MINECRAFT_1_9_1
ProtocolConstants.MINECRAFT_1_9_1,
ProtocolConstants.MINECRAFT_1_9_2
);
/*========================================================================*/
public final DirectionData TO_SERVER = new DirectionData( ProtocolConstants.Direction.TO_SERVER );
@ -136,6 +137,8 @@ public enum Protocol
packetRemapInv.put( ProtocolConstants.MINECRAFT_1_9, new TIntIntHashMap() );
packetRemap.put( ProtocolConstants.MINECRAFT_1_9_1, packetRemap.get( ProtocolConstants.MINECRAFT_1_9 ) );
packetRemapInv.put( ProtocolConstants.MINECRAFT_1_9_1, packetRemapInv.get( ProtocolConstants.MINECRAFT_1_9 ) );
packetRemap.put( ProtocolConstants.MINECRAFT_1_9_2, packetRemap.get( ProtocolConstants.MINECRAFT_1_9 ) );
packetRemapInv.put( ProtocolConstants.MINECRAFT_1_9_2, packetRemapInv.get( ProtocolConstants.MINECRAFT_1_9 ) );
}
public final DefinedPacket createPacket(int id, int protocol)

View File

@ -9,10 +9,10 @@ public class ProtocolConstants
public static final int MINECRAFT_1_8 = 47;
public static final int MINECRAFT_1_9 = 107;
public static final int MINECRAFT_1_9_1 = 108;
public static final int MINECRAFT_1_9_2 = 109;
public static final List<String> SUPPORTED_VERSIONS = Arrays.asList(
"1.8.x",
"1.9",
"1.9.1"
"1.9.x"
);
public enum Direction

View File

@ -29,6 +29,7 @@ public abstract class EntityMap
return EntityMap_1_8.INSTANCE;
case ProtocolConstants.MINECRAFT_1_9:
case ProtocolConstants.MINECRAFT_1_9_1:
case ProtocolConstants.MINECRAFT_1_9_2:
return EntityMap_1_9.INSTANCE;
}
throw new RuntimeException( "Version " + version + " has no entity map" );