Minecraft 1.13.2 support
This commit is contained in:
parent
bba5098ff1
commit
1c5bff7ed7
@ -22,7 +22,7 @@
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.21</version>
|
||||
<version>1.23</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -377,7 +377,8 @@ public enum Protocol
|
||||
ProtocolConstants.MINECRAFT_1_12_2
|
||||
) );
|
||||
linkedProtocols.put( ProtocolConstants.MINECRAFT_1_13, Arrays.asList(
|
||||
ProtocolConstants.MINECRAFT_1_13_1
|
||||
ProtocolConstants.MINECRAFT_1_13_1,
|
||||
ProtocolConstants.MINECRAFT_1_13_2
|
||||
) );
|
||||
}
|
||||
|
||||
|
@ -19,6 +19,7 @@ public class ProtocolConstants
|
||||
public static final int MINECRAFT_1_12_2 = 340;
|
||||
public static final int MINECRAFT_1_13 = 393;
|
||||
public static final int MINECRAFT_1_13_1 = 401;
|
||||
public static final int MINECRAFT_1_13_2 = 404;
|
||||
public static final List<String> SUPPORTED_VERSIONS = Arrays.asList(
|
||||
"1.8.x",
|
||||
"1.9.x",
|
||||
@ -39,7 +40,8 @@ public class ProtocolConstants
|
||||
ProtocolConstants.MINECRAFT_1_12_1,
|
||||
ProtocolConstants.MINECRAFT_1_12_2,
|
||||
ProtocolConstants.MINECRAFT_1_13,
|
||||
ProtocolConstants.MINECRAFT_1_13_1
|
||||
ProtocolConstants.MINECRAFT_1_13_1,
|
||||
ProtocolConstants.MINECRAFT_1_13_2
|
||||
);
|
||||
|
||||
public enum Direction
|
||||
|
@ -87,7 +87,7 @@
|
||||
<dependency>
|
||||
<groupId>mysql</groupId>
|
||||
<artifactId>mysql-connector-java</artifactId>
|
||||
<version>5.1.46</version>
|
||||
<version>5.1.47</version>
|
||||
<scope>runtime</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -49,6 +49,7 @@ public abstract class EntityMap
|
||||
return EntityMap_1_12_1.INSTANCE;
|
||||
case ProtocolConstants.MINECRAFT_1_13:
|
||||
case ProtocolConstants.MINECRAFT_1_13_1:
|
||||
case ProtocolConstants.MINECRAFT_1_13_2:
|
||||
return EntityMap_1_13.INSTANCE;
|
||||
}
|
||||
throw new RuntimeException( "Version " + version + " has no entity map" );
|
||||
@ -241,8 +242,12 @@ public abstract class EntityMap
|
||||
|
||||
private static void readSkipSlot(ByteBuf packet, int protocolVersion)
|
||||
{
|
||||
if ( packet.readShort() != -1 )
|
||||
if ( (protocolVersion >= ProtocolConstants.MINECRAFT_1_13_2) ? packet.readBoolean() : packet.readShort() != -1 )
|
||||
{
|
||||
if ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13_2 )
|
||||
{
|
||||
DefinedPacket.readVarInt( packet );
|
||||
}
|
||||
packet.skipBytes( ( protocolVersion >= ProtocolConstants.MINECRAFT_1_13 ) ? 1 : 3 ); // byte vs byte, short
|
||||
|
||||
int position = packet.readerIndex();
|
||||
|
Loading…
Reference in New Issue
Block a user