aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/de/hysky/skyblocker
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/hysky/skyblocker')
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dungeon/LividColor.java21
-rw-r--r--src/main/java/de/hysky/skyblocker/skyblock/dungeon/StarredMobGlow.java16
2 files changed, 19 insertions, 18 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/LividColor.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/LividColor.java
index 10959ef3..0c774fac 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/LividColor.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/LividColor.java
@@ -7,14 +7,10 @@ import net.fabricmc.fabric.api.client.message.v1.ClientReceiveMessageEvents;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.client.MinecraftClient;
-import net.minecraft.entity.Entity;
import net.minecraft.registry.Registries;
-import net.minecraft.text.Text;
-import net.minecraft.text.TextColor;
import net.minecraft.util.Formatting;
import net.minecraft.util.math.BlockPos;
-import java.util.List;
import java.util.Map;
public class LividColor {
@@ -67,9 +63,20 @@ public class LividColor {
tenTicks = 0;
}
- public static boolean shouldGlow(Entity armorStand) {
- List<Text> nameTexts = armorStand.getName().getSiblings();
- return !nameTexts.isEmpty() && nameTexts.get(0).getStyle().getColor() == TextColor.fromFormatting(color);
+ public static boolean shouldGlow(String name) {
+ return switch (name) {
+ case "Arcade Livid" -> color == Formatting.YELLOW;
+ case "Crossed Livid" -> color == Formatting.LIGHT_PURPLE;
+ case "Doctor Livid" -> color == Formatting.GRAY;
+ case "Frog Livid" -> color == Formatting.DARK_GREEN;
+ case "Hockey Livid" -> color == Formatting.RED;
+ case "Purple Livid" -> color == Formatting.DARK_PURPLE;
+ case "Scream Livid" -> color == Formatting.BLUE;
+ case "Smile Livid" -> color == Formatting.GREEN;
+ case "Vendetta Livid" -> color == Formatting.WHITE;
+
+ default -> false;
+ };
}
public static int getGlowColor(String name) {
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/StarredMobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/StarredMobGlow.java
index 4d159988..4529797c 100644
--- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/StarredMobGlow.java
+++ b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/StarredMobGlow.java
@@ -18,20 +18,14 @@ public class StarredMobGlow {
Box box = entity.getBoundingBox();
if (Utils.isInDungeons() && !entity.isInvisible() && OcclusionCulling.isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) {
+ String name = entity.getName().getString();
+
// Minibosses
if (entity instanceof PlayerEntity) {
- switch (entity.getName().getString()) {
- case "Lost Adventurer", "Shadow Assassin", "Diamond Guy" -> {
- return true;
- }
+ switch (name) {
+ case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": return true;
case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid",
- "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid" -> {
- List<ArmorStandEntity> armorStands = getArmorStands(entity.getWorld(), box);
-
- if (!armorStands.isEmpty() && LividColor.shouldGlow(armorStands.get(0))) {
- return true;
- }
- }
+ "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": return LividColor.shouldGlow(name);
}
}