diff options
author | syeyoung <cyoung06@naver.com> | 2023-02-27 02:12:48 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-02-27 02:12:48 +0900 |
commit | 14f1de38f3aa13e9d11b8347851ef4828ba5e2e9 (patch) | |
tree | 55b04a99af50575d3a32a66e59a6681fe11830e5 | |
parent | 1090e0039d041ea932c7716fc572eb86cbc47d86 (diff) | |
download | Skyblock-Dungeons-Guide-14f1de38f3aa13e9d11b8347851ef4828ba5e2e9.tar.gz Skyblock-Dungeons-Guide-14f1de38f3aa13e9d11b8347851ef4828ba5e2e9.tar.bz2 Skyblock-Dungeons-Guide-14f1de38f3aa13e9d11b8347851ef4828ba5e2e9.zip |
- Check if dungeonroominfo is instantiated (because it might not be)
Signed-off-by: syeyoung <cyoung06@naver.com>
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/secret/mechanicbrowser/FeatureMechanicBrowse.java | 3 |
1 files changed, 2 insertions, 1 deletions
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)) { |