aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java5
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt4
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/MobFinder.kt20
4 files changed, 38 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java
index c77e5f3f0..36ba986e2 100644
--- a/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java
+++ b/src/main/java/at/hannibal2/skyhanni/config/features/combat/damageindicator/DamageIndicatorConfig.java
@@ -63,11 +63,12 @@ public class DamageIndicatorConfig {
"§bArachne",
"§bThe Rift Bosses",
"§bRiftstalker Bloodfiend",
- "§6Reindrake"
+ "§6Reindrake",
+ "§aGarden Pests"
}
)
//TODO only show currently working and tested features
- public List<Integer> bossesToShow = new ArrayList<>(Arrays.asList(0, 1, 2, 5, 6, 7, 8, 9, 18, 19, 21, 22, 23, 24));
+ public List<Integer> bossesToShow = new ArrayList<>(Arrays.asList(0, 1, 2, 5, 6, 7, 8, 9, 18, 19, 21, 22, 23, 24, 25));
@Expose
@ConfigOption(name = "Hide Damage Splash", desc = "Hiding damage splashes near the damage indicator.")
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt
index 664aa63d4..c80ae6d3d 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/BossType.kt
@@ -90,6 +90,17 @@ enum class BossType(
WINTER_REINDRAKE("Reindrake", 24),//TODO fix totally
+ GARDEN_PEST_BEETLE("§cBeetle", 25),
+ GARDEN_PEST_CRICKET("§cCricket", 25),
+ GARDEN_PEST_FLY("§cFly", 25),
+ GARDEN_PEST_LOCUST("§cLocust", 25),
+ GARDEN_PEST_MITE("§cMite", 25),
+ GARDEN_PEST_MOSQUITO("§cMosquito", 25),
+ GARDEN_PEST_MOTH("§cMoth", 25),
+ GARDEN_PEST_RAT("§cRat", 25),
+ GARDEN_PEST_SLUG("§cSlug", 25),
+ GARDEN_PEST_EARTHWORM("§cEarthworm", 25),
+
//TODO arachne
//TODO corelone
@@ -108,4 +119,4 @@ enum class BossType(
*/
//TODO diana mythological creatures
-} \ No newline at end of file
+}
diff --git a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
index ebe6e9397..a196c41e3 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/combat/damageindicator/DamageIndicatorManager.kt
@@ -15,6 +15,7 @@ import at.hannibal2.skyhanni.features.slayer.blaze.HellionShield
import at.hannibal2.skyhanni.features.slayer.blaze.setHellionShield
import at.hannibal2.skyhanni.test.command.ErrorManager
import at.hannibal2.skyhanni.utils.EntityUtils
+import at.hannibal2.skyhanni.utils.EntityUtils.canBeSeen
import at.hannibal2.skyhanni.utils.EntityUtils.getNameTagWith
import at.hannibal2.skyhanni.utils.EntityUtils.hasNameTagWith
import at.hannibal2.skyhanni.utils.LocationUtils
@@ -157,7 +158,8 @@ class DamageIndicatorManager {
// data.ignoreBlocks =
// data.bossType == BossType.END_ENDSTONE_PROTECTOR && Minecraft.getMinecraft().thePlayer.isSneaking
- if (!data.ignoreBlocks && !player.canEntityBeSeen(data.entity)) continue
+
+ if (!data.ignoreBlocks && !data.entity.canBeSeen(50.0)) continue
if (!data.isConfigEnabled()) continue
val entity = data.entity
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 6cc9b4b85..9cbdb7d8e 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
@@ -3,6 +3,7 @@ package at.hannibal2.skyhanni.features.combat.damageindicator
import at.hannibal2.skyhanni.data.IslandType
import at.hannibal2.skyhanni.features.dungeon.DungeonAPI
import at.hannibal2.skyhanni.features.dungeon.DungeonLividFinder
+import at.hannibal2.skyhanni.features.garden.GardenAPI
import at.hannibal2.skyhanni.features.rift.RiftAPI
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.EntityUtils.hasBossHealth
@@ -30,6 +31,7 @@ import net.minecraft.entity.monster.EntityGuardian
import net.minecraft.entity.monster.EntityIronGolem
import net.minecraft.entity.monster.EntityMagmaCube
import net.minecraft.entity.monster.EntityPigZombie
+import net.minecraft.entity.monster.EntitySilverfish
import net.minecraft.entity.monster.EntitySkeleton
import net.minecraft.entity.monster.EntitySlime
import net.minecraft.entity.monster.EntitySpider
@@ -87,6 +89,7 @@ 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)
@@ -106,6 +109,23 @@ class MobFinder {
}
}
+ private fun tryAddEntitySilverfish(entity: EntitySilverfish): EntityResult? {
+ if (!GardenAPI.inGarden()) return null
+
+ if (entity.hasNameTagWith(3, "Beetle")) return EntityResult(bossType = BossType.GARDEN_PEST_BEETLE)
+ if (entity.hasNameTagWith(3, "Cricket")) return EntityResult(bossType = BossType.GARDEN_PEST_CRICKET)
+ if (entity.hasNameTagWith(3, "Fly")) return EntityResult(bossType = BossType.GARDEN_PEST_FLY)
+ if (entity.hasNameTagWith(3, "Locust")) return EntityResult(bossType = BossType.GARDEN_PEST_LOCUST)
+ if (entity.hasNameTagWith(3, "Mite")) return EntityResult(bossType = BossType.GARDEN_PEST_MITE)
+ if (entity.hasNameTagWith(3, "Mosquito")) return EntityResult(bossType = BossType.GARDEN_PEST_MOSQUITO)
+ if (entity.hasNameTagWith(3, "Moth")) return EntityResult(bossType = BossType.GARDEN_PEST_MOTH)
+ if (entity.hasNameTagWith(3, "Rat")) return EntityResult(bossType = BossType.GARDEN_PEST_RAT)
+ if (entity.hasNameTagWith(3, "Slug")) return EntityResult(bossType = BossType.GARDEN_PEST_SLUG)
+ if (entity.hasNameTagWith(3, "Earthworm")) return EntityResult(bossType = BossType.GARDEN_PEST_EARTHWORM)
+
+ return null
+ }
+
private fun tryAddDungeon(entity: EntityLivingBase) = when {
DungeonAPI.isOneOf("F1", "M1") -> tryAddDungeonF1(entity)
DungeonAPI.isOneOf("F2", "M2") -> tryAddDungeonF2(entity)