From 8dbfca923398ce1c5c279fcdd07371d4624b2f5e Mon Sep 17 00:00:00 2001 From: Kevinthegreat <92656833+kevinthegreat1@users.noreply.github.com> Date: Sat, 17 Jun 2023 12:55:11 +0800 Subject: Refactor rendering checks --- .../me/xmrvizzy/skyblocker/skyblock/FairySouls.java | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src') 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); + } } } -- cgit