diff --git a/pom.xml b/pom.xml
index c8476c29..a27d94a9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.github.steveice10
mcprotocollib
- 20w45a-SNAPSHOT
+ 20w46a-SNAPSHOT
jar
MCProtocolLib
diff --git a/src/main/java/com/github/steveice10/mc/protocol/MinecraftConstants.java b/src/main/java/com/github/steveice10/mc/protocol/MinecraftConstants.java
index d70cdf44..3103ceac 100644
--- a/src/main/java/com/github/steveice10/mc/protocol/MinecraftConstants.java
+++ b/src/main/java/com/github/steveice10/mc/protocol/MinecraftConstants.java
@@ -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
diff --git a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerMapDataPacket.java b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerMapDataPacket.java
index 742e7967..00f173e3 100644
--- a/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerMapDataPacket.java
+++ b/src/main/java/com/github/steveice10/mc/protocol/packet/ingame/server/world/ServerMapDataPacket.java
@@ -55,15 +55,18 @@ public class ServerMapDataPacket implements Packet {
this.icons[index] = new MapIcon(x, z, MagicValues.key(MapIconType.class, type), rotation, displayName);
}
- int columns = in.readUnsignedByte();
- if(columns > 0) {
- int rows = in.readUnsignedByte();
- int x = in.readUnsignedByte();
- int y = in.readUnsignedByte();
- byte[] data = in.readBytes(in.readVarInt());
+ if(trackingPosition) {
+ int columns = in.readUnsignedByte();
+ if(columns > 0) {
+ int rows = in.readUnsignedByte();
+ int x = in.readUnsignedByte();
+ int y = in.readUnsignedByte();
+ byte[] data = in.readBytes(in.readVarInt());
- this.data = new MapData(columns, rows, x, y, data);
+ this.data = new MapData(columns, rows, x, y, data);
+ }
}
+
}
@Override
@@ -72,19 +75,21 @@ public class ServerMapDataPacket implements Packet {
out.writeByte(this.scale);
out.writeBoolean(this.trackingPosition);
out.writeBoolean(this.locked);
- out.writeVarInt(this.icons.length);
- for(int index = 0; index < this.icons.length; index++) {
- MapIcon icon = this.icons[index];
- int type = MagicValues.value(Integer.class, icon.getIconType());
- out.writeVarInt(type);
- out.writeByte(icon.getCenterX());
- out.writeByte(icon.getCenterZ());
- out.writeByte(icon.getIconRotation());
- if (icon.getDisplayName() != null) {
- out.writeBoolean(false);
- out.writeString(MessageSerializer.toJsonString(icon.getDisplayName()));
- } else {
- out.writeBoolean(true);
+ if(this.trackingPosition) {
+ out.writeVarInt(this.icons.length);
+ for(int index = 0; index < this.icons.length; index++) {
+ MapIcon icon = this.icons[index];
+ int type = MagicValues.value(Integer.class, icon.getIconType());
+ out.writeVarInt(type);
+ out.writeByte(icon.getCenterX());
+ out.writeByte(icon.getCenterZ());
+ out.writeByte(icon.getIconRotation());
+ if (icon.getDisplayName() != null) {
+ out.writeBoolean(false);
+ out.writeString(MessageSerializer.toJsonString(icon.getDisplayName()));
+ } else {
+ out.writeBoolean(true);
+ }
}
}