aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2023-02-27 02:14:32 +0900
committersyeyoung <cyoung06@naver.com>2023-02-27 02:14:32 +0900
commit2113a4c7ffe9ff395c3460371beafb2ada24ec5e (patch)
treec37ca8645a953ad647f53185b438cff7341a37f7 /mod
parent8d6ab59ae120e40c16391132b20b7c0dc4eb0f07 (diff)
downloadSkyblock-Dungeons-Guide-2113a4c7ffe9ff395c3460371beafb2ada24ec5e.tar.gz
Skyblock-Dungeons-Guide-2113a4c7ffe9ff395c3460371beafb2ada24ec5e.tar.bz2
Skyblock-Dungeons-Guide-2113a4c7ffe9ff395c3460371beafb2ada24ec5e.zip
- Check if RoomMatcher is instantiated (because it might not be)
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod')
-rw-r--r--mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomCoordDisplay.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomCoordDisplay.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomCoordDisplay.java
index 9c66a960..1b9237af 100644
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomCoordDisplay.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/features/impl/advanced/FeatureRoomCoordDisplay.java
@@ -53,7 +53,7 @@ public class FeatureRoomCoordDisplay extends TextHUDFeature {
return new TextSpan(getStyle("coord"), "X: 0 Y: 3 Z: 5 Facing: Z+");
}
- private static final String[] facing = {"Z+", "X-", "Z-", "X+"};
+ private static final String[] facing = {"Z+", "X-", "Z-", "X+", "??"};
@Override
public boolean isHUDViewable() {
@@ -86,7 +86,8 @@ public class FeatureRoomCoordDisplay extends TextHUDFeature {
int facing = (int) (thePlayer.rotationYaw + 45) % 360;
if (facing < 0) facing += 360;
- int real = (facing / 90 + dungeonRoom.getRoomMatcher().getRotation()) % 4;
+ int real = dungeonRoom.getRoomMatcher() != null ?
+ (facing / 90 + dungeonRoom.getRoomMatcher().getRotation()) % 4 : 4;
OffsetPoint offsetPoint = new OffsetPoint(dungeonRoom, new BlockPos((int)thePlayer.posX, (int)thePlayer.posY, (int)thePlayer.posZ));