diff options
author | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-06 20:13:46 +0200 |
---|---|---|
committer | hannibal2 <24389977+hannibal00212@users.noreply.github.com> | 2023-08-06 20:13:46 +0200 |
commit | ce7e88eb84a98dd96069221d9d1188e98b145921 (patch) | |
tree | 86ee2a0c433d478d1a2d299aa70a63283171b09b /src/main/java/at/hannibal2/skyhanni/features/misc | |
parent | 15e7a41f0e97c880f16b94aae77c3e270dda8c06 (diff) | |
download | skyhanni-ce7e88eb84a98dd96069221d9d1188e98b145921.tar.gz skyhanni-ce7e88eb84a98dd96069221d9d1188e98b145921.tar.bz2 skyhanni-ce7e88eb84a98dd96069221d9d1188e98b145921.zip |
fixed chicken from raider of the sea get detected as trevor trapper mob
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/misc')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt index 6400348a8..6ba60604c 100644 --- a/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt +++ b/src/main/java/at/hannibal2/skyhanni/features/misc/trevor/TrevorSolver.kt @@ -2,6 +2,7 @@ package at.hannibal2.skyhanni.features.misc.trevor import at.hannibal2.skyhanni.data.TitleUtils import at.hannibal2.skyhanni.utils.EntityUtils +import at.hannibal2.skyhanni.utils.EntityUtils.hasMaxHealth import at.hannibal2.skyhanni.utils.LocationUtils import at.hannibal2.skyhanni.utils.LocationUtils.distanceToPlayer import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth @@ -11,6 +12,7 @@ import net.minecraft.client.Minecraft import net.minecraft.client.entity.EntityOtherPlayerMP import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.item.EntityArmorStand +import net.minecraft.entity.passive.EntityChicken object TrevorSolver { private val animalHealths = intArrayOf(100, 200, 400, 500, 1000, 2000, 5000, 10000, 20000) //future proofing for Derpy :) @@ -51,6 +53,14 @@ object TrevorSolver { val name = entity.name val entityHealth = if (entity is EntityLivingBase) entity.baseMaxHealth else 0 currentMob = TrevorMobs.values().firstOrNull { it.mobName.contains(name) } + if (currentMob == TrevorMobs.CHICKEN) { + if (entity is EntityChicken) { + if (entity.hasMaxHealth(20_000)) { + // raider of the sea + currentMob = null + } + } + } if (animalHealths.any { it == entityHealth }) { if (currentMob != null) { if (foundID == entity.entityId) { |