diff options
author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-08-02 12:18:37 +0800 |
---|---|---|
committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-08-18 18:16:52 +0800 |
commit | 953932e3f0803f78e745e202dc3e4e25bc444593 (patch) | |
tree | c835ba217636f2bd037750d451e095ebc85842d3 /src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon | |
parent | f703df1f93a7730e818730095df8f6e569f3d647 (diff) | |
download | Skyblocker-953932e3f0803f78e745e202dc3e4e25bc444593.tar.gz Skyblocker-953932e3f0803f78e745e202dc3e4e25bc444593.tar.bz2 Skyblocker-953932e3f0803f78e745e202dc3e4e25bc444593.zip |
Refactor RenderHelper
Diffstat (limited to 'src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java index c024e189..ef94d9ec 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/dungeon/DungeonBlaze.java @@ -48,8 +48,8 @@ public class DungeonBlaze { int health = Integer.parseInt(blazeName.substring(blazeName.indexOf("/") + 1, blazeName.length() - 1)); blazes.add(ObjectIntPair.of(entity, health)); - } catch (NumberFormatException ex) { - ex.printStackTrace(); + } catch (NumberFormatException e) { + LOGGER.error("[Skyblocker DungeonBlazeSolver] Failed to parse blaze health: " + blazeName, e); } } } @@ -79,11 +79,11 @@ public class DungeonBlaze { /* Outline */ if (highestBlaze.getY() < 69) { Box blaze = highestBlaze.getBoundingBox().expand(0.3, 0.9, 0.3).offset(0, -1.1, 0); - RenderHelper.renderBox(context, blaze, GREEN_COLOR_COMPONENTS); + RenderHelper.renderOutline(context, blaze, GREEN_COLOR_COMPONENTS, 5f); if (nextHighestBlaze != null && nextHighestBlaze.isAlive() && nextHighestBlaze != highestBlaze) { Box nextBlaze = nextHighestBlaze.getBoundingBox().expand(0.3, 0.9, 0.3).offset(0, -1.1, 0); - RenderHelper.renderBox(context, nextBlaze, WHITE_COLOR_COMPONENTS); + RenderHelper.renderOutline(context, nextBlaze, WHITE_COLOR_COMPONENTS, 5f); RenderHelper.renderLinesFromPoints(context, new Vec3d[] { blaze.getCenter(), nextBlaze.getCenter() }, WHITE_COLOR_COMPONENTS, 1f, 5f); } } @@ -91,18 +91,17 @@ public class DungeonBlaze { /* Outline */ if (lowestBlaze.getY() > 69) { Box blaze = lowestBlaze.getBoundingBox().expand(0.3, 0.9, 0.3).offset(0, -1.1, 0); - RenderHelper.renderBox(context, blaze, GREEN_COLOR_COMPONENTS); + RenderHelper.renderOutline(context, blaze, GREEN_COLOR_COMPONENTS, 5f); if (nextLowestBlaze != null && nextLowestBlaze.isAlive() && nextLowestBlaze != lowestBlaze) { Box nextBlaze = nextLowestBlaze.getBoundingBox().expand(0.3, 0.9, 0.3).offset(0, -1.1, 0); - RenderHelper.renderBox(context, nextBlaze, WHITE_COLOR_COMPONENTS); + RenderHelper.renderOutline(context, nextBlaze, WHITE_COLOR_COMPONENTS, 5f); RenderHelper.renderLinesFromPoints(context, new Vec3d[] { blaze.getCenter(), nextBlaze.getCenter() }, WHITE_COLOR_COMPONENTS, 1f, 5f); } } } } catch (Exception e) { - LOGGER.warn("[Skyblocker BlazeRenderer] " + e); - e.printStackTrace(); + LOGGER.warn("[Skyblocker DungeonBlazeRenderer] Failed to render blaze boxes", e); } } }
\ No newline at end of file |