From 14f1de38f3aa13e9d11b8347851ef4828ba5e2e9 Mon Sep 17 00:00:00 2001 From: syeyoung Date: Mon, 27 Feb 2023 02:12:48 +0900 Subject: - Check if dungeonroominfo is instantiated (because it might not be) Signed-off-by: syeyoung --- .../features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'mod/src/main/java/kr') diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java index 8c453b78..e607e938 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java @@ -194,7 +194,8 @@ public class FeatureMechanicBrowse extends RawRenderingGuiFeature { .map(DungeonContext::getScaffoldParser) .map(a->a.getDungeonMapLayout().worldPointToRoomPoint(Minecraft.getMinecraft().thePlayer.getPosition())) .map(a -> DungeonsGuide.getDungeonsGuide().getDungeonFacade().getContext().getScaffoldParser().getRoomMap().get(a)); - UUID currentUID = dungeonRoomOpt.map(a -> a.getDungeonRoomInfo().getUuid()).orElse(null); + UUID currentUID = dungeonRoomOpt.filter(a -> a.getDungeonRoomInfo() != null) + .map(a -> a.getDungeonRoomInfo().getUuid()).orElse(null); // Event-ify above this. if (!Objects.equals(lastRoomUid, currentUID)) { -- cgit