diff options
Diffstat (limited to 'src/main/java')
6 files changed, 94 insertions, 119 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/TeleportOverlay.java b/src/main/java/de/hysky/skyblocker/skyblock/TeleportOverlay.java index c290e5b8..e572d9dc 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/TeleportOverlay.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/TeleportOverlay.java @@ -102,7 +102,7 @@ public class TeleportOverlay { @SuppressWarnings("DataFlowIssue") BlockState state = client.world.getBlockState(pos); if (!state.isAir() && client.world.getBlockState(pos.up()).isAir() && client.world.getBlockState(pos.up(2)).isAir()) { - RenderHelper.renderFilledIfVisible(wrc, pos, COLOR_COMPONENTS, 0.5f); + RenderHelper.renderFilled(wrc, pos, COLOR_COMPONENTS, 0.5f, false); } } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java b/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java index 7ebf44b0..95e08c80 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/rift/EffigyWaypoints.java @@ -58,11 +58,11 @@ public class EffigyWaypoints { for (BlockPos effigy : UNBROKEN_EFFIGIES) { float[] colorComponents = DyeColor.RED.getColorComponents(); if (SkyblockerConfigManager.get().slayer.vampireSlayer.compactEffigyWaypoints) { - RenderHelper.renderFilledThroughWallsWithBeaconBeam(context, effigy.down(6), colorComponents, 0.5F); + RenderHelper.renderFilledWithBeaconBeam(context, effigy.down(6), colorComponents, 0.5F, true); } else { - RenderHelper.renderFilledThroughWallsWithBeaconBeam(context, effigy, colorComponents, 0.5F); + RenderHelper.renderFilledWithBeaconBeam(context, effigy, colorComponents, 0.5F, true); for (int i = 1; i < 6; i++) { - RenderHelper.renderFilledThroughWalls(context, effigy.down(i), colorComponents, 0.5F - (0.075F * i)); + RenderHelper.renderFilled(context, effigy.down(i), colorComponents, 0.5F - (0.075F * i), true); } } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java b/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java index 744edd4c..aa55a4e3 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/rift/EnigmaSouls.java @@ -1,38 +1,19 @@ package de.hysky.skyblocker.skyblock.rift; -import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal; - -import java.io.BufferedReader; -import java.io.BufferedWriter; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.NoSuchFileException; -import java.nio.file.Path; -import java.util.Arrays; -import java.util.Comparator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.CompletableFuture; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import com.mojang.brigadier.Command; import com.mojang.brigadier.CommandDispatcher; - import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.utils.Constants; import de.hysky.skyblocker.utils.PosUtils; import de.hysky.skyblocker.utils.Utils; -import de.hysky.skyblocker.utils.render.RenderHelper; -import it.unimi.dsi.fastutil.objects.Object2ObjectOpenHashMap; -import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; +import de.hysky.skyblocker.utils.waypoint.ProfileAwareWaypoint; +import de.hysky.skyblocker.utils.waypoint.Waypoint; import net.fabricmc.fabric.api.client.command.v2.FabricClientCommandSource; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; import net.minecraft.client.MinecraftClient; @@ -43,13 +24,27 @@ import net.minecraft.util.DyeColor; import net.minecraft.util.Formatting; import net.minecraft.util.Identifier; import net.minecraft.util.math.BlockPos; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.NoSuchFileException; +import java.nio.file.Path; +import java.util.*; +import java.util.concurrent.CompletableFuture; +import java.util.function.Supplier; + +import static net.fabricmc.fabric.api.client.command.v2.ClientCommandManager.literal; public class EnigmaSouls { private static final Logger LOGGER = LoggerFactory.getLogger(EnigmaSouls.class); + private static final Supplier<Waypoint.Type> TYPE_SUPPLIER = () -> SkyblockerConfigManager.get().general.waypoints.waypointType; private static final Identifier WAYPOINTS_JSON = new Identifier(SkyblockerMod.NAMESPACE, "rift/enigma_soul_waypoints.json"); - private static final BlockPos[] SOUL_WAYPOINTS = new BlockPos[42]; + private static final Map<BlockPos, ProfileAwareWaypoint> SOUL_WAYPOINTS = new HashMap<>(42); private static final Path FOUND_SOULS_FILE = SkyblockerMod.CONFIG_DIR.resolve("found_enigma_souls.json"); - private static final Object2ObjectOpenHashMap<String, ObjectOpenHashSet<BlockPos>> FOUND_SOULS = new Object2ObjectOpenHashMap<>(); private static final float[] GREEN = DyeColor.GREEN.getColorComponents(); private static final float[] RED = DyeColor.RED.getColorComponents(); @@ -64,7 +59,8 @@ public class EnigmaSouls { for (int i = 0; i < waypoints.size(); i++) { JsonObject waypoint = waypoints.get(i).getAsJsonObject(); - SOUL_WAYPOINTS[i] = new BlockPos(waypoint.get("x").getAsInt(), waypoint.get("y").getAsInt(), waypoint.get("z").getAsInt()); + BlockPos pos = new BlockPos(waypoint.get("x").getAsInt(), waypoint.get("y").getAsInt(), waypoint.get("z").getAsInt()); + SOUL_WAYPOINTS.put(pos, new ProfileAwareWaypoint(pos, TYPE_SUPPLIER, GREEN, RED)); } } catch (IOException e) { @@ -74,13 +70,9 @@ public class EnigmaSouls { //Load found souls try (BufferedReader reader = Files.newBufferedReader(FOUND_SOULS_FILE)) { for (Map.Entry<String, JsonElement> profile : JsonParser.parseReader(reader).getAsJsonObject().asMap().entrySet()) { - ObjectOpenHashSet<BlockPos> foundSoulsOnProfile = new ObjectOpenHashSet<>(); - for (JsonElement foundSoul : profile.getValue().getAsJsonArray().asList()) { - foundSoulsOnProfile.add(PosUtils.parsePosString(foundSoul.getAsString())); + SOUL_WAYPOINTS.get(PosUtils.parsePosString(foundSoul.getAsString())).setFound(); } - - FOUND_SOULS.put(profile.getKey(), foundSoulsOnProfile); } } catch (NoSuchFileException ignored) { } catch (IOException e) { @@ -90,9 +82,16 @@ public class EnigmaSouls { } static void save(MinecraftClient client) { - JsonObject json = new JsonObject(); + Map<String, Set<BlockPos>> foundSouls = new HashMap<>(); + for (ProfileAwareWaypoint soul : SOUL_WAYPOINTS.values()) { + for (String profile : soul.foundProfiles) { + foundSouls.computeIfAbsent(profile, profile_ -> new HashSet<>()); + foundSouls.get(profile).add(soul.pos); + } + } - for (Map.Entry<String, ObjectOpenHashSet<BlockPos>> foundSoulsForProfile : FOUND_SOULS.entrySet()) { + JsonObject json = new JsonObject(); + for (Map.Entry<String, Set<BlockPos>> foundSoulsForProfile : foundSouls.entrySet()) { JsonArray foundSoulsJson = new JsonArray(); for (BlockPos foundSoul : foundSoulsForProfile.getValue()) { @@ -109,15 +108,15 @@ public class EnigmaSouls { } } - static void render(WorldRenderContext wrc) { + static void render(WorldRenderContext context) { SkyblockerConfig.Rift config = SkyblockerConfigManager.get().locations.rift; if (Utils.isInTheRift() && config.enigmaSoulWaypoints && soulsLoaded.isDone()) { - for (BlockPos pos : SOUL_WAYPOINTS) { - if (isSoulMissing(pos)) { - RenderHelper.renderFilledThroughWallsWithBeaconBeam(wrc, pos, GREEN, 0.5f); + for (Waypoint soul : SOUL_WAYPOINTS.values()) { + if (soul.shouldRender()) { + soul.render(context); } else if (config.highlightFoundEnigmaSouls) { - RenderHelper.renderFilledThroughWallsWithBeaconBeam(wrc, pos, RED, 0.5f); + soul.render(context); } } } @@ -127,7 +126,8 @@ public class EnigmaSouls { if (Utils.isInTheRift() && !overlay) { String message = text.getString(); - if (message.equals("You have already found that Enigma Soul!") || Formatting.strip(message).equals("SOUL! You unlocked an Enigma Soul!")) markClosestSoulAsFound(); + if (message.equals("You have already found that Enigma Soul!") || Formatting.strip(message).equals("SOUL! You unlocked an Enigma Soul!")) + markClosestSoulAsFound(); } } @@ -136,13 +136,13 @@ public class EnigmaSouls { .then(literal("rift") .then(literal("enigmaSouls") .then(literal("markAllFound").executes(context -> { - markAllFound(); + SOUL_WAYPOINTS.values().forEach(Waypoint::setFound); context.getSource().sendFeedback(Constants.PREFIX.get().append(Text.translatable("skyblocker.rift.enigmaSouls.markAllFound"))); return Command.SINGLE_SUCCESS; })) .then(literal("markAllMissing").executes(context -> { - markAllMissing(); + SOUL_WAYPOINTS.values().forEach(Waypoint::setMissing); context.getSource().sendFeedback(Constants.PREFIX.get().append(Text.translatable("skyblocker.rift.enigmaSouls.markAllMissing"))); return Command.SINGLE_SUCCESS; @@ -154,30 +154,10 @@ public class EnigmaSouls { if (!soulsLoaded.isDone() || player == null) return; - Arrays.stream(SOUL_WAYPOINTS) - .filter(EnigmaSouls::isSoulMissing) - .min(Comparator.comparingDouble(soulPos -> soulPos.getSquaredDistance(player.getPos()))) - .filter(soulPos -> soulPos.getSquaredDistance(player.getPos()) <= 16) - .ifPresent(soulPos -> { - FOUND_SOULS.computeIfAbsent(Utils.getProfile(), profile -> new ObjectOpenHashSet<>()); - FOUND_SOULS.get(Utils.getProfile()).add(soulPos); - }); - } - - private static boolean isSoulMissing(BlockPos soulPos) { - ObjectOpenHashSet<BlockPos> foundSoulsOnProfile = FOUND_SOULS.get(Utils.getProfile()); - - return foundSoulsOnProfile == null || !foundSoulsOnProfile.contains(soulPos); - } - - private static void markAllFound() { - FOUND_SOULS.computeIfAbsent(Utils.getProfile(), profile -> new ObjectOpenHashSet<>()); - FOUND_SOULS.get(Utils.getProfile()).addAll(List.of(SOUL_WAYPOINTS)); - } - - private static void markAllMissing() { - ObjectOpenHashSet<BlockPos> foundSoulsOnProfile = FOUND_SOULS.get(Utils.getProfile()); - - if (foundSoulsOnProfile != null) foundSoulsOnProfile.clear(); + SOUL_WAYPOINTS.values().stream() + .filter(Waypoint::shouldRender) + .min(Comparator.comparingDouble(soul -> soul.pos.getSquaredDistance(player.getPos()))) + .filter(soul -> soul.pos.getSquaredDistance(player.getPos()) <= 16) + .ifPresent(Waypoint::setFound); } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/rift/MirrorverseWaypoints.java b/src/main/java/de/hysky/skyblocker/skyblock/rift/MirrorverseWaypoints.java index 7dda741f..83199e99 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/rift/MirrorverseWaypoints.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/rift/MirrorverseWaypoints.java @@ -6,7 +6,7 @@ import com.google.gson.JsonParser; import de.hysky.skyblocker.SkyblockerMod; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.utils.Utils; -import de.hysky.skyblocker.utils.render.RenderHelper; +import de.hysky.skyblocker.utils.waypoint.Waypoint; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; import net.minecraft.client.MinecraftClient; import net.minecraft.util.DyeColor; @@ -18,13 +18,15 @@ import org.slf4j.LoggerFactory; import java.io.BufferedReader; import java.io.IOException; import java.util.concurrent.CompletableFuture; +import java.util.function.Supplier; public class MirrorverseWaypoints { private static final Logger LOGGER = LoggerFactory.getLogger("skyblocker"); + private static final Supplier<Waypoint.Type> WAYPOINT_TYPE = () -> Waypoint.Type.HIGHLIGHT; private static final Identifier WAYPOINTS_JSON = new Identifier(SkyblockerMod.NAMESPACE, "rift/mirrorverse_waypoints.json"); - private static final BlockPos[] LAVA_PATH_WAYPOINTS = new BlockPos[107]; - private static final BlockPos[] UPSIDE_DOWN_WAYPOINTS = new BlockPos[66]; - private static final BlockPos[] TURBULATOR_WAYPOINTS = new BlockPos[27]; + private static Waypoint[] LAVA_PATH_WAYPOINTS; + private static Waypoint[] UPSIDE_DOWN_WAYPOINTS; + private static Waypoint[] TURBULATOR_WAYPOINTS; private static final float[] COLOR_COMPONENTS = DyeColor.RED.getColorComponents(); private static CompletableFuture<Void> waypointsLoaded; @@ -35,51 +37,44 @@ public class MirrorverseWaypoints { static void load(MinecraftClient client) { waypointsLoaded = CompletableFuture.runAsync(() -> { try (BufferedReader reader = client.getResourceManager().openAsReader(WAYPOINTS_JSON)) { - JsonObject file = JsonParser.parseReader(reader).getAsJsonObject(); - JsonArray sections = file.get("sections").getAsJsonArray(); + JsonArray sections = JsonParser.parseReader(reader).getAsJsonObject().get("sections").getAsJsonArray(); /// Lava Path - JsonArray lavaPathWaypoints = sections.get(0).getAsJsonObject().get("waypoints").getAsJsonArray(); - - for (int i = 0; i < lavaPathWaypoints.size(); i++) { - JsonObject point = lavaPathWaypoints.get(i).getAsJsonObject(); - LAVA_PATH_WAYPOINTS[i] = new BlockPos(point.get("x").getAsInt(), point.get("y").getAsInt(), point.get("z").getAsInt()); - } + LAVA_PATH_WAYPOINTS = loadWaypoints(sections.get(0).getAsJsonObject().get("waypoints").getAsJsonArray()); /// Upside Down Parkour - JsonArray upsideDownParkourWaypoints = sections.get(1).getAsJsonObject().get("waypoints").getAsJsonArray(); - - for (int i = 0; i < upsideDownParkourWaypoints.size(); i++) { - JsonObject point = upsideDownParkourWaypoints.get(i).getAsJsonObject(); - UPSIDE_DOWN_WAYPOINTS[i] = new BlockPos(point.get("x").getAsInt(), point.get("y").getAsInt(), point.get("z").getAsInt()); - } + UPSIDE_DOWN_WAYPOINTS = loadWaypoints(sections.get(1).getAsJsonObject().get("waypoints").getAsJsonArray()); /// Turbulator Parkour - JsonArray turbulatorParkourWaypoints = sections.get(2).getAsJsonObject().get("waypoints").getAsJsonArray(); - - for (int i = 0; i < turbulatorParkourWaypoints.size(); i++) { - JsonObject point = turbulatorParkourWaypoints.get(i).getAsJsonObject(); - TURBULATOR_WAYPOINTS[i] = new BlockPos(point.get("x").getAsInt(), point.get("y").getAsInt(), point.get("z").getAsInt()); - } + TURBULATOR_WAYPOINTS = loadWaypoints(sections.get(2).getAsJsonObject().get("waypoints").getAsJsonArray()); } catch (IOException e) { LOGGER.error("[Skyblocker] Mirrorverse Waypoints failed to load ;(", e); } }); } + private static Waypoint[] loadWaypoints(JsonArray waypointsJson) { + Waypoint[] waypoints = new Waypoint[waypointsJson.size()]; + for (int i = 0; i < waypointsJson.size(); i++) { + JsonObject point = waypointsJson.get(i).getAsJsonObject(); + waypoints[i] = new Waypoint(new BlockPos(point.get("x").getAsInt(), point.get("y").getAsInt(), point.get("z").getAsInt()), WAYPOINT_TYPE, COLOR_COMPONENTS, false); + } + return waypoints; + } + protected static void render(WorldRenderContext wrc) { //I would also check for the mirrorverse location but the scoreboard stuff is not performant at all... if (Utils.isInTheRift() && SkyblockerConfigManager.get().locations.rift.mirrorverseWaypoints && waypointsLoaded.isDone()) { - for (BlockPos pos : LAVA_PATH_WAYPOINTS) { - RenderHelper.renderFilledIfVisible(wrc, pos, COLOR_COMPONENTS, 0.5f); + for (Waypoint waypoint : LAVA_PATH_WAYPOINTS) { + waypoint.render(wrc); } - for (BlockPos pos : UPSIDE_DOWN_WAYPOINTS) { - RenderHelper.renderFilledIfVisible(wrc, pos, COLOR_COMPONENTS, 0.5f); + for (Waypoint waypoint : UPSIDE_DOWN_WAYPOINTS) { + waypoint.render(wrc); } - for (BlockPos pos : TURBULATOR_WAYPOINTS) { - RenderHelper.renderFilledIfVisible(wrc, pos, COLOR_COMPONENTS, 0.5f); + for (Waypoint waypoint : TURBULATOR_WAYPOINTS) { + waypoint.render(wrc); } } } diff --git a/src/main/java/de/hysky/skyblocker/utils/render/RenderHelper.java b/src/main/java/de/hysky/skyblocker/utils/render/RenderHelper.java index 3d8213fe..43d595a5 100644 --- a/src/main/java/de/hysky/skyblocker/utils/render/RenderHelper.java +++ b/src/main/java/de/hysky/skyblocker/utils/render/RenderHelper.java @@ -46,20 +46,20 @@ public class RenderHelper { WorldRenderEvents.AFTER_TRANSLUCENT.register(TRANSLUCENT_DRAW, RenderHelper::drawTranslucents); } - public static void renderFilledThroughWallsWithBeaconBeam(WorldRenderContext context, BlockPos pos, float[] colorComponents, float alpha) { - renderFilledThroughWalls(context, pos, colorComponents, alpha); + public static void renderFilledWithBeaconBeam(WorldRenderContext context, BlockPos pos, float[] colorComponents, float alpha, boolean throughWalls) { + renderFilled(context, pos, colorComponents, alpha, throughWalls); renderBeaconBeam(context, pos, colorComponents); } - public static void renderFilledThroughWalls(WorldRenderContext context, BlockPos pos, float[] colorComponents, float alpha) { - if (FrustumUtils.isVisible(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1)) { - renderFilled(context, Vec3d.of(pos), ONE, colorComponents, alpha, true); - } - } - - public static void renderFilledIfVisible(WorldRenderContext context, BlockPos pos, float[] colorComponents, float alpha) { - if (OcclusionCulling.isVisible(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1)) { - renderFilled(context, Vec3d.of(pos), ONE, colorComponents, alpha, false); + public static void renderFilled(WorldRenderContext context, BlockPos pos, float[] colorComponents, float alpha, boolean throughWalls) { + if (throughWalls) { + if (FrustumUtils.isVisible(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1)) { + renderFilled(context, Vec3d.of(pos), ONE, colorComponents, alpha, true); + } + } else { + if (OcclusionCulling.isVisible(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1)) { + renderFilled(context, Vec3d.of(pos), ONE, colorComponents, alpha, false); + } } } diff --git a/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java b/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java index f65e20f7..eb30cf8d 100644 --- a/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java +++ b/src/main/java/de/hysky/skyblocker/utils/waypoint/Waypoint.java @@ -20,21 +20,21 @@ public class Waypoint { private boolean shouldRender; protected Waypoint(BlockPos pos, Supplier<Type> typeSupplier, float[] colorComponents) { - this(pos, typeSupplier, colorComponents, DEFAULT_HIGHLIGHT_ALPHA); + this(pos, typeSupplier, colorComponents, DEFAULT_HIGHLIGHT_ALPHA, DEFAULT_LINE_WIDTH); } protected Waypoint(BlockPos pos, Type type, float[] colorComponents, float alpha) { - this(pos, () -> type, colorComponents, alpha); - } - - protected Waypoint(BlockPos pos, Supplier<Type> typeSupplier, float[] colorComponents, float alpha) { - this(pos, typeSupplier, colorComponents, alpha, DEFAULT_LINE_WIDTH); + this(pos, () -> type, colorComponents, alpha, DEFAULT_LINE_WIDTH); } protected Waypoint(BlockPos pos, Supplier<Type> typeSupplier, float[] colorComponents, float alpha, float lineWidth) { this(pos, typeSupplier, colorComponents, alpha, lineWidth, true); } + public Waypoint(BlockPos pos, Supplier<Type> typeSupplier, float[] colorComponents, boolean throughWalls) { + this(pos, typeSupplier, colorComponents, DEFAULT_HIGHLIGHT_ALPHA, DEFAULT_LINE_WIDTH, throughWalls); + } + protected Waypoint(BlockPos pos, Supplier<Type> typeSupplier, float[] colorComponents, float alpha, float lineWidth, boolean throughWalls) { this(pos, typeSupplier, colorComponents, alpha, lineWidth, throughWalls, true); } @@ -68,16 +68,16 @@ public class Waypoint { public void render(WorldRenderContext context) { switch (typeSupplier.get()) { - case WAYPOINT -> RenderHelper.renderFilledThroughWallsWithBeaconBeam(context, pos, getColorComponents(), alpha); + case WAYPOINT -> RenderHelper.renderFilledWithBeaconBeam(context, pos, getColorComponents(), alpha, throughWalls); case OUTLINED_WAYPOINT -> { float[] colorComponents = getColorComponents(); - RenderHelper.renderFilledThroughWallsWithBeaconBeam(context, pos, colorComponents, alpha); + RenderHelper.renderFilledWithBeaconBeam(context, pos, colorComponents, alpha, throughWalls); RenderHelper.renderOutline(context, box, colorComponents, lineWidth, throughWalls); } - case HIGHLIGHT -> RenderHelper.renderFilledThroughWalls(context, pos, getColorComponents(), alpha); + case HIGHLIGHT -> RenderHelper.renderFilled(context, pos, getColorComponents(), alpha, throughWalls); case OUTLINED_HIGHLIGHT -> { float[] colorComponents = getColorComponents(); - RenderHelper.renderFilledThroughWalls(context, pos, colorComponents, alpha); + RenderHelper.renderFilled(context, pos, colorComponents, alpha, throughWalls); RenderHelper.renderOutline(context, box, colorComponents, lineWidth, throughWalls); } case OUTLINE -> RenderHelper.renderOutline(context, box, getColorComponents(), lineWidth, throughWalls); |