This commit is contained in:
D3ATHBRINGER13 2020-11-17 19:43:27 +00:00
parent ea3d99d0f9
commit 5993241c70
3 changed files with 28 additions and 23 deletions

View file

@ -5,7 +5,7 @@
<groupId>com.github.steveice10</groupId>
<artifactId>mcprotocollib</artifactId>
<version>20w45a-SNAPSHOT</version>
<version>20w46a-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MCProtocolLib</name>

View file

@ -12,12 +12,12 @@ public final class MinecraftConstants {
/**
* Current supported game version.
*/
public static final String GAME_VERSION = "20w45a";
public static final String GAME_VERSION = "20w46a";
/**
* Current supported protocol version.
*/
public static final int PROTOCOL_VERSION = (1 << 30) | 5;
public static final int PROTOCOL_VERSION = (1 << 30) | 6;
// General Key Constants

View file

@ -55,6 +55,7 @@ public class ServerMapDataPacket implements Packet {
this.icons[index] = new MapIcon(x, z, MagicValues.key(MapIconType.class, type), rotation, displayName);
}
if(trackingPosition) {
int columns = in.readUnsignedByte();
if(columns > 0) {
int rows = in.readUnsignedByte();
@ -66,12 +67,15 @@ public class ServerMapDataPacket implements Packet {
}
}
}
@Override
public void write(NetOutput out) throws IOException {
out.writeVarInt(this.mapId);
out.writeByte(this.scale);
out.writeBoolean(this.trackingPosition);
out.writeBoolean(this.locked);
if(this.trackingPosition) {
out.writeVarInt(this.icons.length);
for(int index = 0; index < this.icons.length; index++) {
MapIcon icon = this.icons[index];
@ -87,6 +91,7 @@ public class ServerMapDataPacket implements Packet {
out.writeBoolean(true);
}
}
}
if(this.data != null && this.data.getColumns() != 0) {
out.writeByte(this.data.getColumns());