aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/features/nether
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-01 19:16:44 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2022-10-01 19:16:44 +0200
commita14c06c06aef1668a7f132b232a0edc565ee687f (patch)
tree52bb239605241d6983dd16e6590cf62969526c0f /src/main/java/at/hannibal2/skyhanni/features/nether
parent7f68a52e3dcd71edbca363e01618a694839efa4e (diff)
downloadskyhanni-a14c06c06aef1668a7f132b232a0edc565ee687f.tar.gz
skyhanni-a14c06c06aef1668a7f132b232a0edc565ee687f.tar.bz2
skyhanni-a14c06c06aef1668a7f132b232a0edc565ee687f.zip
used hasSkullTexture more often
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/features/nether')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt13
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt7
2 files changed, 9 insertions, 11 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt
index c31733715..9dba408bc 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangBlazingSouls.kt
@@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.features.damageindicator.BossType
import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager
import at.hannibal2.skyhanni.test.GriffinUtils.drawWaypointFilled
-import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
+import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture
import at.hannibal2.skyhanni.utils.LocationUtils
import at.hannibal2.skyhanni.utils.LorenzUtils
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
@@ -20,18 +20,17 @@ import java.awt.Color
class AshfangBlazingSouls {
- private val texture = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI4N2IzOTdkYWY5NTE2YTBiZDc2ZjVmMWI3YmY5Nzk1MTVkZjNkNWQ4MzNlMDYzNWZhNjhiMzdlZTA4MjIxMiJ9fX0="
+ private val texture =
+ "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvODI4N2IzOTdkYWY5NTE2YTBiZDc2ZjVmMWI3YmY5Nzk1MTVkZjNkNWQ4MzNlMDYzNWZhNjhiMzdlZTA4MjIxMiJ9fX0="
private val souls = mutableListOf<EntityArmorStand>()
@SubscribeEvent
fun onTick(event: TickEvent.ClientTickEvent) {
if (!isEnabled()) return
- Minecraft.getMinecraft().theWorld.loadedEntityList
- .filter { it ->
- it is EntityArmorStand && it !in souls && it.inventory
- .any { it != null && it.getSkullTexture() == texture }
- }.forEach { souls.add(it as EntityArmorStand) }
+ Minecraft.getMinecraft().theWorld.loadedEntityList.filter {
+ it is EntityArmorStand && it !in souls && it.hasSkullTexture(texture)
+ }.forEach { souls.add(it as EntityArmorStand) }
}
@SubscribeEvent
diff --git a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
index c0dbe3108..4f54bbd5c 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/nether/ashfang/AshfangGravityOrbs.kt
@@ -4,7 +4,7 @@ import at.hannibal2.skyhanni.SkyHanniMod
import at.hannibal2.skyhanni.features.damageindicator.BossType
import at.hannibal2.skyhanni.features.damageindicator.DamageIndicatorManager
import at.hannibal2.skyhanni.utils.*
-import at.hannibal2.skyhanni.utils.ItemUtils.getSkullTexture
+import at.hannibal2.skyhanni.utils.EntityUtils.hasSkullTexture
import at.hannibal2.skyhanni.utils.RenderUtils.drawString
import net.minecraft.client.Minecraft
import net.minecraft.entity.item.EntityArmorStand
@@ -25,9 +25,8 @@ class AshfangGravityOrbs {
if (!isEnabled()) return
Minecraft.getMinecraft().theWorld.loadedEntityList
- .filter { it ->
- it is EntityArmorStand && it !in orbs && it.inventory
- .any { it != null && it.getSkullTexture() == texture }
+ .filter {
+ it is EntityArmorStand && it !in orbs && it.hasSkullTexture(texture)
}.forEach { orbs.add(it as EntityArmorStand) }
}