diff options
author | Aaron <51387595+AzureAaron@users.noreply.github.com> | 2023-11-13 21:02:34 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-13 21:02:34 -0500 |
commit | f4ff9aad7b97230fd70dd70f067c0aac4d1e2682 (patch) | |
tree | b6347d4fc2c2acf82a3f098e0c2d716c2c286276 /src/main/java/de/hysky/skyblocker/skyblock/dungeon | |
parent | a9609fdb116c842cf9a48f81deec49863f58c3ee (diff) | |
parent | fb249dcac9581945d35a89c417bb54afe4ed7c32 (diff) | |
download | Skyblocker-f4ff9aad7b97230fd70dd70f067c0aac4d1e2682.tar.gz Skyblocker-f4ff9aad7b97230fd70dd70f067c0aac4d1e2682.tar.bz2 Skyblocker-f4ff9aad7b97230fd70dd70f067c0aac4d1e2682.zip |
Merge pull request #414 from AzureAaron/blobbercyst-highlight
Blobbercyst Glow
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/dungeon')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/dungeon/MobGlow.java | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/MobGlow.java b/src/main/java/de/hysky/skyblocker/skyblock/dungeon/MobGlow.java deleted file mode 100644 index 523b7a98..00000000 --- a/src/main/java/de/hysky/skyblocker/skyblock/dungeon/MobGlow.java +++ /dev/null @@ -1,66 +0,0 @@ -package de.hysky.skyblocker.skyblock.dungeon; - -import de.hysky.skyblocker.config.SkyblockerConfigManager; -import de.hysky.skyblocker.utils.Utils; -import de.hysky.skyblocker.utils.render.culling.OcclusionCulling; -import net.minecraft.entity.Entity; -import net.minecraft.entity.decoration.ArmorStandEntity; -import net.minecraft.entity.passive.BatEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.predicate.entity.EntityPredicates; -import net.minecraft.util.math.Box; -import net.minecraft.world.World; - -import java.util.List; - -public class MobGlow { - public static boolean shouldMobGlow(Entity entity) { - 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 (name) { - case "Lost Adventurer", "Shadow Assassin", "Diamond Guy": return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid": return LividColor.shouldGlow(name); - } - } - - // Regular Mobs - if (!(entity instanceof ArmorStandEntity)) { - List<ArmorStandEntity> armorStands = getArmorStands(entity.getWorld(), box); - - if (!armorStands.isEmpty() && armorStands.get(0).getName().getString().contains("✯")) return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow; - } - - // Bats - return SkyblockerConfigManager.get().locations.dungeons.starredMobGlow && entity instanceof BatEntity; - } - - return false; - } - - private static List<ArmorStandEntity> getArmorStands(World world, Box box) { - return world.getEntitiesByClass(ArmorStandEntity.class, box.expand(0, 2, 0), EntityPredicates.NOT_MOUNTED); - } - - public static int getGlowColor(Entity entity) { - String name = entity.getName().getString(); - - if (entity instanceof PlayerEntity) { - return switch (name) { - case "Lost Adventurer" -> 0xfee15c; - case "Shadow Assassin" -> 0x5b2cb2; - case "Diamond Guy" -> 0x57c2f7; - case "Arcade Livid", "Crossed Livid", "Doctor Livid", "Frog Livid", "Hockey Livid", - "Purple Livid", "Scream Livid", "Smile Livid", "Vendetta Livid" -> LividColor.getGlowColor(name); - default -> 0xf57738; - }; - } - - return 0xf57738; - } -} |