aboutsummaryrefslogtreecommitdiff
path: root/mod/src/main/java/kr
diff options
context:
space:
mode:
authorsyeyoung <cyoung06@naver.com>2023-02-27 02:17:53 +0900
committersyeyoung <cyoung06@naver.com>2023-02-27 02:17:53 +0900
commitf9f694a19c3c9bdeb1e55361a7b3a86d5b98b054 (patch)
tree6f9076130b2990abf7b1103c23dd74f94107718e /mod/src/main/java/kr
parent2113a4c7ffe9ff395c3460371beafb2ada24ec5e (diff)
downloadSkyblock-Dungeons-Guide-f9f694a19c3c9bdeb1e55361a7b3a86d5b98b054.tar.gz
Skyblock-Dungeons-Guide-f9f694a19c3c9bdeb1e55361a7b3a86d5b98b054.tar.bz2
Skyblock-Dungeons-Guide-f9f694a19c3c9bdeb1e55361a7b3a86d5b98b054.zip
- ignore exceptions on isBlocked call on DungeonListener, due to dungeonroom not being fully instantiated
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main/java/kr')
-rwxr-xr-xmod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
index 2fcdb159..818efb1a 100755
--- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
+++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/events/listener/DungeonListener.java
@@ -344,16 +344,18 @@ public class DungeonListener {
Vec3 player = Minecraft.getMinecraft().thePlayer.getPositionVector();
BlockPos real = new BlockPos(player.xCoord * 2, player.yCoord * 2, player.zCoord * 2);
- for (BlockPos allInBox : BlockPos.getAllInBox(real.add(-1, -1, -1), real.add(1, 1, 1))) {
- boolean blocked = dungeonRoom.isBlocked(allInBox.getX(), allInBox.getY(), allInBox.getZ());
+ try {
+ for (BlockPos allInBox : BlockPos.getAllInBox(real.add(-1, -1, -1), real.add(1, 1, 1))) {
+ boolean blocked = dungeonRoom.isBlocked(allInBox.getX(), allInBox.getY(), allInBox.getZ());
- RenderUtils.highlightBox(
- AxisAlignedBB.fromBounds(
- allInBox.getX() / 2.0 - 0.1, allInBox.getY() / 2.0 - 0.1, allInBox.getZ() / 2.0 - 0.1,
- allInBox.getX() / 2.0 + 0.1, allInBox.getY() / 2.0 + 0.1, allInBox.getZ() / 2.0 + 0.1
- ), blocked ? new Color(0x55FF0000, true) : new Color(0x3300FF00, true), renderWorldLastEvent.partialTicks, false);
+ RenderUtils.highlightBox(
+ AxisAlignedBB.fromBounds(
+ allInBox.getX() / 2.0 - 0.1, allInBox.getY() / 2.0 - 0.1, allInBox.getZ() / 2.0 - 0.1,
+ allInBox.getX() / 2.0 + 0.1, allInBox.getY() / 2.0 + 0.1, allInBox.getZ() / 2.0 + 0.1
+ ), blocked ? new Color(0x55FF0000, true) : new Color(0x3300FF00, true), renderWorldLastEvent.partialTicks, false);
- }
+ }
+ } catch (Exception ignored) {}
}
}