From edaa30955925f49d7b608ddc6540c86b3da129cc Mon Sep 17 00:00:00 2001 From: BruceChen Date: Tue, 4 Oct 2022 12:00:10 +0800 Subject: [PATCH] Fix Map bot --- MinecraftClient/ChatBots/Map.cs | 3 +++ MinecraftClient/Protocol/Handlers/Protocol18.cs | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/MinecraftClient/ChatBots/Map.cs b/MinecraftClient/ChatBots/Map.cs index 631cee4e..a03b3a72 100644 --- a/MinecraftClient/ChatBots/Map.cs +++ b/MinecraftClient/ChatBots/Map.cs @@ -102,6 +102,9 @@ namespace MinecraftClient.ChatBots if (columnsUpdated == 0 && cachedMaps.ContainsKey(mapid)) return; + if (rowsUpdated <= 0 && columnsUpdated <= 0) + return; + McMap map = new() { MapId = mapid, diff --git a/MinecraftClient/Protocol/Handlers/Protocol18.cs b/MinecraftClient/Protocol/Handlers/Protocol18.cs index 76fd55ab..75c4ed47 100644 --- a/MinecraftClient/Protocol/Handlers/Protocol18.cs +++ b/MinecraftClient/Protocol/Handlers/Protocol18.cs @@ -816,7 +816,7 @@ namespace MinecraftClient.Protocol.Handlers List icons = new(); // 1,9 + = needs tracking position to be true to get the icons - if (protocolVersion <= MC_1_9_Version || trackingPosition) + if (protocolVersion <= MC_1_16_5_Version || trackingPosition) { iconcount = dataTypes.ReadNextVarInt(packetData);