From 9da4c6e8889d6238793aba52596ccc6560dedf32 Mon Sep 17 00:00:00 2001 From: Erymanthus Date: Mon, 13 Jun 2022 13:52:47 -0400 Subject: that one crash i had is now in a try catch statement because duct tape is sometimes the best way to fix things (kidding! but i srsly dont know how i got a NPE out of this, so until then this commit will have to do.) --- .../com/thatgravyboat/skyblockhud/overlay/OverlayHud.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java index 70cb153..4efef81 100644 --- a/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java +++ b/src/main/java/com/thatgravyboat/skyblockhud/overlay/OverlayHud.java @@ -66,11 +66,13 @@ public class OverlayHud extends Gui { } else if (LocationHandler.getCurrentLocation().getCategory().equals(LocationCategory.MUSHROOMDESERT)) { drawTrapperOrPelts(width, offset, mc); } else if (LocationHandler.getCurrentLocation().getCategory().isMiningCategory()) { - if (MinesHandler.currentEvent.display) { - drawDwarvenEvent(width, offset, mc); - } else { - drawMiningPowders(width, offset, mc); - } + try { + if (MinesHandler.currentEvent.display) { + drawDwarvenEvent(width, offset, mc); + } else { + drawMiningPowders(width, offset, mc); + } + } catch (Exception ignored) {} } else if (LocationHandler.getCurrentLocation().getCategory().equals(LocationCategory.PARK) && ParkIslandHandler.isRaining()) { if (LocationHandler.getCurrentLocation().equals(Locations.HOWLINGCAVE)) { drawSlayer(width, offset, mc); -- cgit