diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-26 08:14:35 +0100 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-11-26 08:14:35 +0100 |
commit | 46e531ada4a3b4b324b892bfbebd86c82939c5d5 (patch) | |
tree | 59a0da6a1035c9cd05d397a9f07d4f058ca2ae92 /src/main/java | |
parent | ff879dadddbf7b910dcadcbe7819475d48df8eb6 (diff) | |
download | skyhanni-46e531ada4a3b4b324b892bfbebd86c82939c5d5.tar.gz skyhanni-46e531ada4a3b4b324b892bfbebd86c82939c5d5.tar.bz2 skyhanni-46e531ada4a3b4b324b892bfbebd86c82939c5d5.zip |
Fixed pest damage indicator not working for some pests.
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt index 9cbdb7d8e..2824676bf 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt @@ -36,6 +36,7 @@ import net.minecraft.entity.monster.EntitySkeleton import net.minecraft.entity.monster.EntitySlime import net.minecraft.entity.monster.EntitySpider import net.minecraft.entity.monster.EntityZombie +import net.minecraft.entity.passive.EntityBat import net.minecraft.entity.passive.EntityHorse import net.minecraft.entity.passive.EntityWolf import java.util.UUID @@ -80,6 +81,7 @@ class MobFinder { internal fun tryAdd(entity: EntityLivingBase) = when { LorenzUtils.inDungeons -> tryAddDungeon(entity) RiftAPI.inRift() -> tryAddRift(entity) + GardenAPI.inGarden() -> tryAddGarden(entity) else -> { when (entity) { /* @@ -89,7 +91,6 @@ class MobFinder { * Please take this into consideration if you are to modify this. */ is EntityOtherPlayerMP -> tryAddEntityOtherPlayerMP(entity) - is EntitySilverfish -> tryAddEntitySilverfish(entity) is EntityIronGolem -> tryAddEntityIronGolem(entity) is EntityPigZombie -> tryAddEntityPigZombie(entity) is EntityMagmaCube -> tryAddEntityMagmaCube(entity) @@ -109,7 +110,15 @@ class MobFinder { } } - private fun tryAddEntitySilverfish(entity: EntitySilverfish): EntityResult? { + private fun tryAddGarden(entity: EntityLivingBase): EntityResult? { + if (entity is EntitySilverfish || entity is EntityBat) { + return tryAddGardenPest(entity) + } + + return null + } + + private fun tryAddGardenPest(entity: EntityLivingBase): EntityResult? { if (!GardenAPI.inGarden()) return null if (entity.hasNameTagWith(3, "Beetle")) return EntityResult(bossType = BossType.GARDEN_PEST_BEETLE) |