diff --git a/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java b/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java index 1e35db1ef2..242bfd24d4 100644 --- a/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java +++ b/src/main/java/de/hysky/skyblocker/config/categories/CrimsonIsleCategory.java @@ -80,6 +80,22 @@ public static ConfigCategory create(SkyblockerConfig defaults, SkyblockerConfig newValue -> config.crimsonIsle.kuudra.arrowPoisonThreshold = newValue) .controller(IntegerFieldControllerBuilder::create) .build()) + .option(Option.createBuilder() + .name(Text.translatable("skyblocker.config.crimsonIsle.kuudra.kuudraGlow")) + .description(OptionDescription.of(Text.translatable("skyblocker.config.crimsonIsle.kuudra.kuudraGlow.@Tooltip"))) + .binding(defaults.crimsonIsle.kuudra.kuudraGlow, + () -> config.crimsonIsle.kuudra.kuudraGlow, + newValue -> config.crimsonIsle.kuudra.kuudraGlow = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) + .option(Option.createBuilder() + .name(Text.translatable("skyblocker.config.crimsonIsle.kuudra.dangerWarning")) + .description(OptionDescription.of(Text.translatable("skyblocker.config.crimsonIsle.kuudra.dangerWarning.@Tooltip"))) + .binding(defaults.crimsonIsle.kuudra.dangerWarning, + () -> config.crimsonIsle.kuudra.dangerWarning, + newValue -> config.crimsonIsle.kuudra.dangerWarning = newValue) + .controller(ConfigUtils::createBooleanController) + .build()) .build()) //dojo .group(OptionGroup.createBuilder() diff --git a/src/main/java/de/hysky/skyblocker/config/configs/CrimsonIsleConfig.java b/src/main/java/de/hysky/skyblocker/config/configs/CrimsonIsleConfig.java index 6645b88d27..9c087baf00 100644 --- a/src/main/java/de/hysky/skyblocker/config/configs/CrimsonIsleConfig.java +++ b/src/main/java/de/hysky/skyblocker/config/configs/CrimsonIsleConfig.java @@ -38,6 +38,12 @@ public static class Kuudra { @SerialEntry public int arrowPoisonThreshold = 32; + + @SerialEntry + public boolean kuudraGlow = true; + + @SerialEntry + public boolean dangerWarning = true; } public static class Dojo { diff --git a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/ArrowPoisonWarning.java b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/ArrowPoisonWarning.java index 7c3c634a0b..c0d371deb4 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/ArrowPoisonWarning.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/ArrowPoisonWarning.java @@ -2,7 +2,6 @@ import java.util.function.Supplier; -import de.hysky.skyblocker.config.SkyblockerConfig; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.config.configs.CrimsonIsleConfig; import de.hysky.skyblocker.skyblock.crimson.kuudra.Kuudra.KuudraPhase; diff --git a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/DangerWarning.java b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/DangerWarning.java new file mode 100644 index 0000000000..feaa1a111f --- /dev/null +++ b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/DangerWarning.java @@ -0,0 +1,69 @@ +package de.hysky.skyblocker.skyblock.crimson.kuudra; + +import java.util.function.Supplier; + +import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.utils.Utils; +import de.hysky.skyblocker.utils.render.RenderHelper; +import de.hysky.skyblocker.utils.render.title.Title; +import de.hysky.skyblocker.utils.render.title.TitleContainer; +import de.hysky.skyblocker.utils.scheduler.Scheduler; +import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents; +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.block.Blocks; +import net.minecraft.client.MinecraftClient; +import net.minecraft.text.MutableText; +import net.minecraft.text.Text; +import net.minecraft.util.DyeColor; +import net.minecraft.util.math.BlockPos; + +public class DangerWarning { + private static final MinecraftClient CLIENT = MinecraftClient.getInstance(); + private static final Supplier DANGER_TEXT = () -> Text.translatable("skyblocker.crimson.kuudra.danger"); + private static final Title TITLE = new Title(DANGER_TEXT.get()); + + static void init() { + Scheduler.INSTANCE.scheduleCyclic(DangerWarning::updateIndicator, 5); + ClientPlayConnectionEvents.JOIN.register((handler, sender, client) -> reset()); + } + + private static void updateIndicator() { + if (Utils.isInKuudra() && SkyblockerConfigManager.get().crimsonIsle.kuudra.dangerWarning && CLIENT.player != null && CLIENT.world != null) { + for (int i = 1; i <= 5; i++) { + BlockPos under = CLIENT.player.getBlockPos().down(i); + Title title = getDangerTitle(under); + + if (title != null) { + RenderHelper.displayInTitleContainerAndPlaySound(title); + + return; + } else if (i == 5) { //Prevent removing the title prematurely + TitleContainer.removeTitle(TITLE); + } + } + } + } + + private static Title getDangerTitle(BlockPos pos) { + BlockState state = CLIENT.world.getBlockState(pos); + Block block = state.getBlock(); + + int argb = switch (block) { + case Block b when b == Blocks.GREEN_TERRACOTTA -> DyeColor.GREEN.getEntityColor(); + case Block b when b == Blocks.LIME_TERRACOTTA -> DyeColor.LIME.getEntityColor(); + case Block b when b == Blocks.YELLOW_TERRACOTTA -> DyeColor.YELLOW.getEntityColor(); + case Block b when b == Blocks.ORANGE_TERRACOTTA -> DyeColor.ORANGE.getEntityColor(); + case Block b when b == Blocks.PINK_TERRACOTTA -> DyeColor.PINK.getEntityColor(); + case Block b when b == Blocks.RED_TERRACOTTA -> DyeColor.RED.getEntityColor(); + + default -> 0; + }; + + return argb != 0 ? TITLE.setText(DANGER_TEXT.get().withColor(argb & 0x00FFFFFF)) : null; + } + + private static void reset() { + TitleContainer.removeTitle(TITLE); + } +} diff --git a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/Kuudra.java b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/Kuudra.java index 5bc98894a7..626905a538 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/Kuudra.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/Kuudra.java @@ -1,23 +1,22 @@ package de.hysky.skyblocker.skyblock.crimson.kuudra; import de.hysky.skyblocker.utils.Utils; -import de.hysky.skyblocker.utils.scheduler.Scheduler; -import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents; import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents; import net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents; -import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; import net.minecraft.text.Text; import net.minecraft.util.Formatting; -public class Kuudra { +public class Kuudra { + public static final int KUUDRA_MAGMA_CUBE_SIZE = 30; + static KuudraPhase phase = KuudraPhase.OTHER; public static void init() { - WorldRenderEvents.AFTER_TRANSLUCENT.register(KuudraWaypoints::render); - ClientLifecycleEvents.CLIENT_STARTED.register(KuudraWaypoints::load); + KuudraWaypoints.init(); + DangerWarning.init(); + ClientPlayConnectionEvents.JOIN.register((_handler, _sender, _client) -> reset()); ClientReceiveMessageEvents.GAME.register(Kuudra::onMessage); - Scheduler.INSTANCE.scheduleCyclic(KuudraWaypoints::tick, 20); } private static void onMessage(Text text, boolean overlay) { @@ -35,6 +34,10 @@ private static void onMessage(Text text, boolean overlay) { if (message.equals("[NPC] Elle: POW! SURELY THAT'S IT! I don't think he has any more in him!")) { phase = KuudraPhase.OTHER; } + + if (message.equals("[NPC] Elle: What just happened!? Is this Kuudra's real lair?")) { + phase = KuudraPhase.KUUDRA_LAIR; + } } } @@ -45,6 +48,7 @@ private static void reset() { enum KuudraPhase { OTHER, RETRIEVE_SUPPLIES, - DPS; + DPS, + KUUDRA_LAIR; //Infernal Only } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/KuudraWaypoints.java b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/KuudraWaypoints.java index dbf7409a79..ba2e669526 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/KuudraWaypoints.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/crimson/kuudra/KuudraWaypoints.java @@ -20,10 +20,13 @@ import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.utils.PosUtils; import de.hysky.skyblocker.utils.Utils; +import de.hysky.skyblocker.utils.scheduler.Scheduler; import de.hysky.skyblocker.utils.waypoint.Waypoint; import de.hysky.skyblocker.utils.waypoint.Waypoint.Type; import it.unimi.dsi.fastutil.objects.ObjectArrayList; +import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents; import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderContext; +import net.fabricmc.fabric.api.client.rendering.v1.WorldRenderEvents; import net.minecraft.client.MinecraftClient; import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.mob.GiantEntity; @@ -33,130 +36,136 @@ import net.minecraft.util.math.MathHelper; public class KuudraWaypoints { - private static final Logger LOGGER = LogUtils.getLogger(); - private static final float[] SUPPLIES_COLOR = {255f / 255f, 0f, 0f}; - private static final float[] PEARL_COLOR = {57f / 255f, 117f / 255f, 125f / 255f}; - private static final float[] SAFE_SPOT_COLOR = {255f / 255f, 85f / 255f, 255f / 255f}; - private static final Supplier SUPPLIES_AND_FUEL_TYPE = () -> SkyblockerConfigManager.get().crimsonIsle.kuudra.suppliesAndFuelWaypointType; - private static final ObjectArrayList SAFE_SPOT_WAYPOINTS = new ObjectArrayList<>(); - private static final ObjectArrayList PEARL_WAYPOINTS = new ObjectArrayList<>(); - private static final Function>> CODEC = cc -> PosUtils.ALT_BLOCK_POS_CODEC.xmap( - pos -> new Waypoint(pos, () -> Waypoint.Type.HIGHLIGHT, cc, false), - waypoint -> waypoint.pos) - .listOf(); - - //Use non final lists and swap them out to avoid ConcurrentModificationExceptions - private static ObjectArrayList supplyWaypoints = ObjectArrayList.of(); - private static ObjectArrayList ballistaBuildWaypoints = ObjectArrayList.of(); - private static ObjectArrayList fuelWaypoints = ObjectArrayList.of(); - private static boolean loaded; - - static void load(MinecraftClient client) { - CompletableFuture safeSpots = loadWaypoints(client, Identifier.of(SkyblockerMod.NAMESPACE, "crimson/kuudra/safe_spot_waypoints.json"), SAFE_SPOT_WAYPOINTS, SAFE_SPOT_COLOR); - CompletableFuture pearls = loadWaypoints(client, Identifier.of(SkyblockerMod.NAMESPACE, "crimson/kuudra/pearl_waypoints.json"), PEARL_WAYPOINTS, PEARL_COLOR); - - CompletableFuture.allOf(safeSpots, pearls).whenComplete((_result, _throwable) -> loaded = true); - } - - private static CompletableFuture loadWaypoints(MinecraftClient client, Identifier file, ObjectArrayList list, float[] colorComponents) { - return CompletableFuture.supplyAsync(() -> { - try (BufferedReader reader = client.getResourceManager().openAsReader(file)) { - return CODEC.apply(colorComponents).parse(JsonOps.INSTANCE, getWaypoints(reader)).getOrThrow(); - } catch (Exception e) { - LOGGER.error("[Skyblocker Kuudra Waypoints] Failed to load kuudra waypoints from: {}", file, e); - - return List.of(); - } - }).thenAccept(list::addAll); - } - - private static JsonElement getWaypoints(BufferedReader reader) { - return JsonParser.parseReader(reader).getAsJsonObject().getAsJsonArray("waypoints"); - } - - static void tick() { - MinecraftClient client = MinecraftClient.getInstance(); - CrimsonIsleConfig.Kuudra config = SkyblockerConfigManager.get().crimsonIsle.kuudra; - - if (Utils.isInKuudra() && (config.supplyWaypoints || config.fuelWaypoints || config.ballistaBuildWaypoints) && client.player != null) { - Box searchBox = client.player.getBoundingBox().expand(500d); - ObjectArrayList supplies = new ObjectArrayList<>(); - ObjectArrayList fuelCells = new ObjectArrayList<>(); - - if ((config.supplyWaypoints || config.fuelWaypoints) && client.world != null) { - List giants = client.world.getEntitiesByClass(GiantEntity.class, searchBox, giant -> giant.getY() < 67); - - for (GiantEntity giant : giants) { - double yawOffset = giant.getYaw() + 115; - - double x = giant.getX() + 4.5 * Math.cos((yawOffset) * MathHelper.RADIANS_PER_DEGREE); - double y = 75; - double z = giant.getZ() + 4.5 * Math.sin((yawOffset) * MathHelper.RADIANS_PER_DEGREE); - - Waypoint waypoint = new Waypoint(BlockPos.ofFloored(x, y, z), SUPPLIES_AND_FUEL_TYPE, SUPPLIES_COLOR, false); - - if (Objects.requireNonNull(Kuudra.phase) == Kuudra.KuudraPhase.DPS) { - fuelCells.add(waypoint); - } else { - supplies.add(waypoint); - } - } - } - - ObjectArrayList ballistaBuildSpots = new ObjectArrayList<>(); - - if (config.ballistaBuildWaypoints && client.world != null) { - List armorStands = client.world.getEntitiesByClass(ArmorStandEntity.class, searchBox, ArmorStandEntity::hasCustomName); - - for (ArmorStandEntity armorStand : armorStands) { - String name = armorStand.getName().getString(); - - if (config.ballistaBuildWaypoints && name.contains("SNEAK + PUNCH")) { - ballistaBuildSpots.add(new Waypoint(armorStand.getBlockPos(), () -> Waypoint.Type.WAYPOINT, SUPPLIES_COLOR, false)); - } - } - } - - supplyWaypoints = supplies; - ballistaBuildWaypoints = ballistaBuildSpots; - fuelWaypoints = fuelCells; - } - } - - static void render(WorldRenderContext context) { - CrimsonIsleConfig.Kuudra config = SkyblockerConfigManager.get().crimsonIsle.kuudra; - - if (Utils.isInKuudra() && loaded) { - if (config.supplyWaypoints) { - for (Waypoint waypoint : supplyWaypoints) { - waypoint.render(context); - } - } - - if (config.ballistaBuildWaypoints) { - for (Waypoint waypoint : ballistaBuildWaypoints) { - waypoint.render(context); - } - } - - if (config.fuelWaypoints) { - for (Waypoint waypoint : fuelWaypoints) { - waypoint.render(context); - } - } - - if (config.safeSpotWaypoints) { - for (Waypoint waypoint : SAFE_SPOT_WAYPOINTS) { - waypoint.render(context); - } - } - - //TODO maybe have "dynamic" waypoints that draw a line to the actual spot - if (config.pearlWaypoints) { - for (Waypoint waypoint : PEARL_WAYPOINTS) { - waypoint.render(context); - } - } - } - } + private static final Logger LOGGER = LogUtils.getLogger(); + private static final float[] SUPPLIES_COLOR = {255f / 255f, 0f, 0f}; + private static final float[] PEARL_COLOR = {57f / 255f, 117f / 255f, 125f / 255f}; + private static final float[] SAFE_SPOT_COLOR = {255f / 255f, 85f / 255f, 255f / 255f}; + private static final Supplier SUPPLIES_AND_FUEL_TYPE = () -> SkyblockerConfigManager.get().crimsonIsle.kuudra.suppliesAndFuelWaypointType; + private static final ObjectArrayList SAFE_SPOT_WAYPOINTS = new ObjectArrayList<>(); + private static final ObjectArrayList PEARL_WAYPOINTS = new ObjectArrayList<>(); + private static final Function>> CODEC = cc -> PosUtils.ALT_BLOCK_POS_CODEC.xmap( + pos -> new Waypoint(pos, () -> Waypoint.Type.HIGHLIGHT, cc, false), + waypoint -> waypoint.pos) + .listOf(); + + //Use non final lists and swap them out to avoid ConcurrentModificationExceptions + private static ObjectArrayList supplyWaypoints = ObjectArrayList.of(); + private static ObjectArrayList ballistaBuildWaypoints = ObjectArrayList.of(); + private static ObjectArrayList fuelWaypoints = ObjectArrayList.of(); + private static boolean loaded; + + static void init() { + WorldRenderEvents.AFTER_TRANSLUCENT.register(KuudraWaypoints::render); + ClientLifecycleEvents.CLIENT_STARTED.register(KuudraWaypoints::load); + Scheduler.INSTANCE.scheduleCyclic(KuudraWaypoints::tick, 20); + } + + private static void load(MinecraftClient client) { + CompletableFuture safeSpots = loadWaypoints(client, Identifier.of(SkyblockerMod.NAMESPACE, "crimson/kuudra/safe_spot_waypoints.json"), SAFE_SPOT_WAYPOINTS, SAFE_SPOT_COLOR); + CompletableFuture pearls = loadWaypoints(client, Identifier.of(SkyblockerMod.NAMESPACE, "crimson/kuudra/pearl_waypoints.json"), PEARL_WAYPOINTS, PEARL_COLOR); + + CompletableFuture.allOf(safeSpots, pearls).whenComplete((_result, _throwable) -> loaded = true); + } + + private static CompletableFuture loadWaypoints(MinecraftClient client, Identifier file, ObjectArrayList list, float[] colorComponents) { + return CompletableFuture.supplyAsync(() -> { + try (BufferedReader reader = client.getResourceManager().openAsReader(file)) { + return CODEC.apply(colorComponents).parse(JsonOps.INSTANCE, getWaypoints(reader)).getOrThrow(); + } catch (Exception e) { + LOGGER.error("[Skyblocker Kuudra Waypoints] Failed to load kuudra waypoints from: {}", file, e); + + return List.of(); + } + }).thenAccept(list::addAll); + } + + private static JsonElement getWaypoints(BufferedReader reader) { + return JsonParser.parseReader(reader).getAsJsonObject().getAsJsonArray("waypoints"); + } + + private static void tick() { + MinecraftClient client = MinecraftClient.getInstance(); + CrimsonIsleConfig.Kuudra config = SkyblockerConfigManager.get().crimsonIsle.kuudra; + + if (Utils.isInKuudra() && (config.supplyWaypoints || config.fuelWaypoints || config.ballistaBuildWaypoints) && client.player != null) { + Box searchBox = client.player.getBoundingBox().expand(500d); + ObjectArrayList supplies = new ObjectArrayList<>(); + ObjectArrayList fuelCells = new ObjectArrayList<>(); + + if ((config.supplyWaypoints || config.fuelWaypoints) && client.world != null) { + List giants = client.world.getEntitiesByClass(GiantEntity.class, searchBox, giant -> giant.getY() < 67); + + for (GiantEntity giant : giants) { + double yawOffset = giant.getYaw() + 115; + + double x = giant.getX() + 4.5 * Math.cos((yawOffset) * MathHelper.RADIANS_PER_DEGREE); + double y = 75; + double z = giant.getZ() + 4.5 * Math.sin((yawOffset) * MathHelper.RADIANS_PER_DEGREE); + + Waypoint waypoint = new Waypoint(BlockPos.ofFloored(x, y, z), SUPPLIES_AND_FUEL_TYPE, SUPPLIES_COLOR, false); + + if (Objects.requireNonNull(Kuudra.phase) == Kuudra.KuudraPhase.DPS) { + fuelCells.add(waypoint); + } else { + supplies.add(waypoint); + } + } + } + + ObjectArrayList ballistaBuildSpots = new ObjectArrayList<>(); + + if (config.ballistaBuildWaypoints && client.world != null) { + List armorStands = client.world.getEntitiesByClass(ArmorStandEntity.class, searchBox, ArmorStandEntity::hasCustomName); + + for (ArmorStandEntity armorStand : armorStands) { + String name = armorStand.getName().getString(); + + if (config.ballistaBuildWaypoints && name.contains("SNEAK + PUNCH")) { + ballistaBuildSpots.add(new Waypoint(armorStand.getBlockPos(), () -> Waypoint.Type.WAYPOINT, SUPPLIES_COLOR, false)); + } + } + } + + supplyWaypoints = supplies; + ballistaBuildWaypoints = ballistaBuildSpots; + fuelWaypoints = fuelCells; + } + } + + private static void render(WorldRenderContext context) { + CrimsonIsleConfig.Kuudra config = SkyblockerConfigManager.get().crimsonIsle.kuudra; + + if (Utils.isInKuudra() && loaded) { + if (config.supplyWaypoints) { + for (Waypoint waypoint : supplyWaypoints) { + waypoint.render(context); + } + } + + if (config.ballistaBuildWaypoints) { + for (Waypoint waypoint : ballistaBuildWaypoints) { + waypoint.render(context); + } + } + + if (config.fuelWaypoints) { + for (Waypoint waypoint : fuelWaypoints) { + waypoint.render(context); + } + } + + if (config.safeSpotWaypoints) { + for (Waypoint waypoint : SAFE_SPOT_WAYPOINTS) { + waypoint.render(context); + } + } + + //TODO maybe have "dynamic" waypoints that draw a line to the actual spot + if (config.pearlWaypoints) { + for (Waypoint waypoint : PEARL_WAYPOINTS) { + waypoint.render(context); + } + } + } + } } diff --git a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java index 0438a8ce1e..22474cf8be 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -3,6 +3,7 @@ import com.google.common.collect.Streams; import de.hysky.skyblocker.config.SkyblockerConfigManager; import de.hysky.skyblocker.skyblock.crimson.dojo.DojoManager; +import de.hysky.skyblocker.skyblock.crimson.kuudra.Kuudra; import de.hysky.skyblocker.skyblock.dungeon.LividColor; import de.hysky.skyblocker.skyblock.end.TheEnd; import de.hysky.skyblocker.utils.ItemUtils; @@ -12,6 +13,7 @@ import net.minecraft.entity.Entity; import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.mob.EndermanEntity; +import net.minecraft.entity.mob.MagmaCubeEntity; import net.minecraft.entity.mob.ZombieEntity; import net.minecraft.entity.passive.BatEntity; import net.minecraft.entity.player.PlayerEntity; @@ -67,6 +69,9 @@ public static boolean shouldMobGlow(Entity entity) { //dojo case ZombieEntity zombie when Utils.isInCrimson() && DojoManager.inArena -> DojoManager.shouldGlow(getArmorStandName(zombie)); + //Kuudra + case MagmaCubeEntity magmaCube when Utils.isInKuudra() -> SkyblockerConfigManager.get().crimsonIsle.kuudra.kuudraGlow && magmaCube.getSize() == Kuudra.KUUDRA_MAGMA_CUBE_SIZE; + default -> false; }; } @@ -120,6 +125,7 @@ public static int getGlowColor(Entity entity) { case EndermanEntity enderman when TheEnd.isSpecialZealot(enderman) -> Formatting.RED.getColorValue(); case ArmorStandEntity armorStand when isNukekubiHead(armorStand) -> Formatting.GREEN.getColorValue(); case ZombieEntity zombie when Utils.isInCrimson() && DojoManager.inArena -> DojoManager.getColor(); + case MagmaCubeEntity magmaCube when Utils.isInKuudra() -> 0xf7510f; default -> 0xf57738; }; diff --git a/src/main/java/de/hysky/skyblocker/utils/render/title/Title.java b/src/main/java/de/hysky/skyblocker/utils/render/title/Title.java index 1e167afa01..890976aea4 100644 --- a/src/main/java/de/hysky/skyblocker/utils/render/title/Title.java +++ b/src/main/java/de/hysky/skyblocker/utils/render/title/Title.java @@ -38,8 +38,10 @@ public MutableText getText() { return text; } - public void setText(MutableText text) { + public Title setText(MutableText text) { this.text = text; + + return this; } protected boolean isDefaultPos() { diff --git a/src/main/resources/assets/skyblocker/lang/en_us.json b/src/main/resources/assets/skyblocker/lang/en_us.json index 77af4b7341..72b8946402 100644 --- a/src/main/resources/assets/skyblocker/lang/en_us.json +++ b/src/main/resources/assets/skyblocker/lang/en_us.json @@ -44,7 +44,11 @@ "skyblocker.config.crimsonIsle.kuudra.arrowPoisonThreshold": "Arrow Poison Warning Threshold", "skyblocker.config.crimsonIsle.kuudra.arrowPoisonThreshold.@Tooltip": "If the amount of Toxic Arrow Poison you have in your inventory is below the set threshold, then you will receive a warning.\n\n16 is the absolute minimum.\nYou want 32 for smooth 'DPS' phase with prefire.", "skyblocker.config.crimsonIsle.kuudra.ballistaBuildWaypoints": "Ballista Build Spot Waypoints", + "skyblocker.config.crimsonIsle.kuudra.dangerWarning": "Danger Warning", + "skyblocker.config.crimsonIsle.kuudra.dangerWarning.@Tooltip": "Displays a warning when you're in danger from a tentacle slam or from TNT. The color of the warning adapts to the danger level!", "skyblocker.config.crimsonIsle.kuudra.fuelWaypoints": "Fuel Waypoints", + "skyblocker.config.crimsonIsle.kuudra.kuudraGlow": "Kuudra Glow", + "skyblocker.config.crimsonIsle.kuudra.kuudraGlow.@Tooltip": "Outlines Kuudra in a deep orange.", "skyblocker.config.crimsonIsle.kuudra.noArrowPoisonWarning": "No Arrow Poison Warning", "skyblocker.config.crimsonIsle.kuudra.noArrowPoisonWarning.@Tooltip": "Warns you when you pull out a bow and have no Toxic Arrow Poison in your inventory. Only works during the DPS phase.", "skyblocker.config.crimsonIsle.kuudra.pearlWaypoints": "Pearl Waypoints", @@ -994,6 +998,7 @@ "skyblocker.crimson.kuudra.noArrowPoison": "No Arrow Poison!", "skyblocker.crimson.kuudra.lowArrowPoison": "Low on Arrow Poison!", + "skyblocker.crimson.kuudra.danger": "DANGER!", "skyblocker.waypoints.ordered.groupNonExistent": "§cThe waypoint group %s doesn't exist.", "skyblocker.waypoints.ordered.add.invalidHexColor": "§cInvalid HEX color code!",