Minecraft 1.13.2 support

This commit is contained in:
md_5
2018-10-23 06:00:00 +11:00
parent bba5098ff1
commit 1c5bff7ed7
5 changed files with 13 additions and 5 deletions

View File

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

View File

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