From 2d2b4704dcf70c9847b5011bbc1b3d3479cc6a7d Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Mon, 6 Apr 2020 20:57:26 -0400 Subject: [PATCH 1/2] Potential error spam fix --- .../translators/java/world/JavaMapDataTranslator.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java index ccf3e2090..d38b881de 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java @@ -40,7 +40,10 @@ public class JavaMapDataTranslator extends PacketTranslator ClientboundMapItemDataPacket mapItemDataPacket = new ClientboundMapItemDataPacket(); mapItemDataPacket.setUniqueMapId(packet.getMapId()); - mapItemDataPacket.setDimensionId(session.getLastDimPacket().getDimension()); + if (session.getLastDimPacket() == null) { + System.out.println("Dimension is null"); + mapItemDataPacket.setDimensionId(0); + } else mapItemDataPacket.setDimensionId(session.getLastDimPacket().getDimension()); mapItemDataPacket.setLocked(packet.isLocked()); mapItemDataPacket.setScale(packet.getScale()); From 9c282d2cb80bcfc4c772337d1a13aafebb6d600a Mon Sep 17 00:00:00 2001 From: DoctorMacc Date: Tue, 7 Apr 2020 13:54:08 -0400 Subject: [PATCH 2/2] Quick map fix --- .../translators/java/world/JavaMapDataTranslator.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java index d38b881de..28022c16d 100644 --- a/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java +++ b/connector/src/main/java/org/geysermc/connector/network/translators/java/world/JavaMapDataTranslator.java @@ -40,10 +40,7 @@ public class JavaMapDataTranslator extends PacketTranslator ClientboundMapItemDataPacket mapItemDataPacket = new ClientboundMapItemDataPacket(); mapItemDataPacket.setUniqueMapId(packet.getMapId()); - if (session.getLastDimPacket() == null) { - System.out.println("Dimension is null"); - mapItemDataPacket.setDimensionId(0); - } else mapItemDataPacket.setDimensionId(session.getLastDimPacket().getDimension()); + mapItemDataPacket.setDimensionId(session.getPlayerEntity().getDimension()); mapItemDataPacket.setLocked(packet.isLocked()); mapItemDataPacket.setScale(packet.getScale());