diff options
author | Kevin <92656833+kevinthegreat1@users.noreply.github.com> | 2024-07-05 17:50:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-05 17:50:18 +0800 |
commit | fbf7f62b5049d0a5bce3a490e08bbfd3c7e1a8a9 (patch) | |
tree | 7a67c8c550dee69a719f520799f0ad12fa5837ca /src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | |
parent | 1a74c70663c80b991f938cda62ccfe173ea0b057 (diff) | |
parent | 4f2c5699c278f5f7a9b29aebbab4052f2b9c59e5 (diff) | |
download | Skyblocker-fbf7f62b5049d0a5bce3a490e08bbfd3c7e1a8a9.tar.gz Skyblocker-fbf7f62b5049d0a5bce3a490e08bbfd3c7e1a8a9.tar.bz2 Skyblocker-fbf7f62b5049d0a5bce3a490e08bbfd3c7e1a8a9.zip |
Merge pull request #747 from olim88/Dojo-helper
Dojo helper
Diffstat (limited to 'src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java')
-rw-r--r-- | src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | 23 |
1 files changed, 23 insertions, 0 deletions
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 d6f9410b..81e328ca 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -1,6 +1,7 @@ package de.hysky.skyblocker.skyblock.entity; import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.skyblock.crimson.dojo.DojoManager; import de.hysky.skyblocker.skyblock.dungeon.LividColor; import de.hysky.skyblocker.skyblock.end.TheEnd; import de.hysky.skyblocker.utils.ItemUtils; @@ -10,6 +11,7 @@ import de.hysky.skyblocker.utils.render.culling.OcclusionCulling; import net.minecraft.entity.Entity; import net.minecraft.entity.decoration.ArmorStandEntity; import net.minecraft.entity.mob.EndermanEntity; +import net.minecraft.entity.mob.ZombieEntity; import net.minecraft.entity.passive.BatEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; @@ -28,6 +30,7 @@ public class MobGlow { if (OcclusionCulling.getReducedCuller().isVisible(box.minX, box.minY, box.minZ, box.maxX, box.maxY, box.maxZ)) { String name = entity.getName().getString(); + // Dungeons if (Utils.isInDungeons() && !entity.isInvisible()) { return switch (entity) { @@ -46,6 +49,7 @@ public class MobGlow { }; } + return switch (entity) { // Rift case PlayerEntity p when Utils.isInTheRift() && !entity.isInvisible() && name.equals("Blobbercyst ") -> SkyblockerConfigManager.get().otherLocations.rift.blobbercystGlow; @@ -57,6 +61,9 @@ public class MobGlow { // Special Zelot case EndermanEntity enderman when Utils.isInTheEnd() && !entity.isInvisible() -> TheEnd.isSpecialZealot(enderman); + //dojo + case ZombieEntity zombie when Utils.isInCrimson() && DojoManager.inArena -> DojoManager.shouldGlow(getArmorStandName(zombie)); + default -> false; }; } @@ -66,6 +73,7 @@ public class MobGlow { /** * Checks if an entity is starred by checking if its armor stand contains a star in its name. + * * @param entity the entity to check. * @return true if the entity is starred, false otherwise */ @@ -74,6 +82,20 @@ public class MobGlow { return !armorStands.isEmpty() && armorStands.getFirst().getName().getString().contains("✯"); } + /** + * Returns name of entity by finding closed armor stand and getting name of that + * + * @param entity the entity to check + * @return the name string of the entities label + */ + public static String getArmorStandName(Entity entity) { + List<ArmorStandEntity> armorStands = getArmorStands(entity); + if (armorStands.isEmpty()) { + return ""; + } + return armorStands.getFirst().getName().getString(); + } + public static List<ArmorStandEntity> getArmorStands(Entity entity) { return getArmorStands(entity.getWorld(), entity.getBoundingBox()); } @@ -94,6 +116,7 @@ public class MobGlow { case EndermanEntity enderman when TheEnd.isSpecialZealot(enderman) -> Formatting.RED.getColorValue(); case ArmorStandEntity armorStand when isNukekubiHead(armorStand) -> 0x990099; + case ZombieEntity zombie when Utils.isInCrimson() && DojoManager.inArena -> DojoManager.getColor(); default -> 0xf57738; }; |