diff options
author | olim <bobq4582@gmail.com> | 2024-04-29 21:50:44 +0100 |
---|---|---|
committer | olim <bobq4582@gmail.com> | 2024-07-01 14:26:13 +0100 |
commit | b700db32f2bccde3b6381d5d28136814c9fe9e37 (patch) | |
tree | ad087f5183710eacc06be91de4fb4122c000c8fa /src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java | |
parent | 9a59ee74d4e61aa2d31076a587fbf9ed2d6c6a64 (diff) | |
download | Skyblocker-b700db32f2bccde3b6381d5d28136814c9fe9e37.tar.gz Skyblocker-b700db32f2bccde3b6381d5d28136814c9fe9e37.tar.bz2 Skyblocker-b700db32f2bccde3b6381d5d28136814c9fe9e37.zip |
initial commit
detection of when the player is in the dojo and the helper for the discipline is implemented
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 | 16 |
1 files changed, 16 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..d373d2e1 100644 --- a/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java +++ b/src/main/java/de/hysky/skyblocker/skyblock/entity/MobGlow.java @@ -1,15 +1,18 @@ package de.hysky.skyblocker.skyblock.entity; import de.hysky.skyblocker.config.SkyblockerConfigManager; +import de.hysky.skyblocker.skyblock.crimson.dojo.DisciplineTestHelper; import de.hysky.skyblocker.skyblock.dungeon.LividColor; import de.hysky.skyblocker.skyblock.end.TheEnd; import de.hysky.skyblocker.utils.ItemUtils; +import de.hysky.skyblocker.utils.Location; import de.hysky.skyblocker.utils.SlayerUtils; 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.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 +31,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 +50,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 +62,9 @@ public class MobGlow { // Special Zelot case EndermanEntity enderman when Utils.isInTheEnd() && !entity.isInvisible() -> TheEnd.isSpecialZealot(enderman); + //dojo + case ZombieEntity zombie when Utils.getLocation() == Location.CRIMSON_ISLE -> DisciplineTestHelper.isCorrect(getArmourStandName(zombie)); + default -> false; }; } @@ -73,6 +81,13 @@ public class MobGlow { List<ArmorStandEntity> armorStands = getArmorStands(entity); return !armorStands.isEmpty() && armorStands.getFirst().getName().getString().contains("✯"); } + public static String getArmourStandName(Entity entity) { + List<ArmorStandEntity> armorStands = getArmorStands(entity); + if (armorStands.isEmpty()) { + return null; + } + return armorStands.getFirst().getName().getString(); + } public static List<ArmorStandEntity> getArmorStands(Entity entity) { return getArmorStands(entity.getWorld(), entity.getBoundingBox()); @@ -94,6 +109,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.getLocation() == Location.CRIMSON_ISLE -> DisciplineTestHelper.getColor(); default -> 0xf57738; }; |