diff options
author | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-06-17 12:55:11 +0800 |
---|---|---|
committer | Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> | 2023-06-22 11:33:39 +0800 |
commit | 8dbfca923398ce1c5c279fcdd07371d4624b2f5e (patch) | |
tree | 04d43652e159e48e110c4bb9c1c6f416fdc5af03 /src/main/java/me/xmrvizzy | |
parent | 3f7d97daa8b531c6bbb2019106947575cbe0b89a (diff) | |
download | Skyblocker-8dbfca923398ce1c5c279fcdd07371d4624b2f5e.tar.gz Skyblocker-8dbfca923398ce1c5c279fcdd07371d4624b2f5e.tar.bz2 Skyblocker-8dbfca923398ce1c5c279fcdd07371d4624b2f5e.zip |
Refactor rendering checks
Diffstat (limited to 'src/main/java/me/xmrvizzy')
-rw-r--r-- | src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java b/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java index 838b2a55..ccffdcca 100644 --- a/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java +++ b/src/main/java/me/xmrvizzy/skyblocker/skyblock/FairySouls.java @@ -113,19 +113,11 @@ public class FairySouls { } public static void render(WorldRenderContext context) { - if (!SkyblockerConfig.get().general.fairySouls.enableFairySoulsHelper) { - return; - } - if (!fairySoulsLoaded.isDone()) { - LOGGER.warn("Fairy souls are not loaded yet."); - return; - } - if (!fairySouls.containsKey(Utils.getLocationRaw())) { - return; - } - for (BlockPos fairySoul : fairySouls.get(Utils.getLocationRaw())) { - float[] colorComponents = isFairySoulNotFound(fairySoul) ? DyeColor.GREEN.getColorComponents() : DyeColor.RED.getColorComponents(); - RenderHelper.renderFilledThroughWallsWithBeaconBeam(context, fairySoul, colorComponents, 0.5F); + if (SkyblockerConfig.get().general.fairySouls.enableFairySoulsHelper && fairySoulsLoaded.isDone() && fairySouls.containsKey(Utils.getLocationRaw())) { + for (BlockPos fairySoul : fairySouls.get(Utils.getLocationRaw())) { + float[] colorComponents = isFairySoulNotFound(fairySoul) ? DyeColor.GREEN.getColorComponents() : DyeColor.RED.getColorComponents(); + RenderHelper.renderFilledThroughWallsWithBeaconBeam(context, fairySoul, colorComponents, 0.5F); + } } } |