From dc5283d8c3b0ecabd0334487b4e73dfb3ebc28b8 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Fri, 10 Feb 2023 16:05:45 +0900 Subject: - Fix hypixel sending bad map Signed-off-by: syeyoung --- .../kr/syeyoung/dungeonsguide/mod/events/listener/PacketListener.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'mod/src/main/java/kr/syeyoung/dungeonsguide') diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketListener.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketListener.java index f84da51f..03ce249d 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketListener.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/PacketListener.java @@ -85,7 +85,9 @@ public class PacketListener { MinecraftForge.EVENT_BUS.post(new PlayerListItemPacketEvent((S38PacketPlayerListItem) packet)); }else if (packet instanceof S34PacketMaps) { MapData mapData = MapDataManager.INSTANCE.createMapData(((S34PacketMaps) packet).getMapId()); - ((S34PacketMaps) packet).setMapdataTo(mapData); + try { + ((S34PacketMaps) packet).setMapdataTo(mapData); + } catch (Exception ignored) {} // hypixel seem to be sending bad map datas. MinecraftForge.EVENT_BUS.post(new MapUpdateEvent(((S34PacketMaps) packet).getMapId(), mapData)); } } -- cgit