From 051fbcb34b411ba9b30308cf177ca2aa4c884d29 Mon Sep 17 00:00:00 2001 From: TheMode Date: Mon, 14 Jun 2021 22:01:12 +0200 Subject: [PATCH] Potentially fix map packet --- .../network/packet/server/play/MapDataPacket.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java b/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java index d14ec40df..5d1386e07 100644 --- a/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java +++ b/src/main/java/net/minestom/server/network/packet/server/play/MapDataPacket.java @@ -38,13 +38,15 @@ public class MapDataPacket implements ComponentHoldingServerPacket { writer.writeBoolean(locked); writer.writeBoolean(trackingPosition); - if (icons != null && icons.length > 0) { - writer.writeVarInt(icons.length); - for (Icon icon : icons) { - icon.write(writer); + if (trackingPosition) { + if (icons != null && icons.length > 0) { + writer.writeVarInt(icons.length); + for (Icon icon : icons) { + icon.write(writer); + } + } else { + writer.writeVarInt(0); } - } else { - writer.writeVarInt(0); } writer.writeByte((byte) columns);