aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/data/EntityData.kt')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/data/EntityData.kt10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
index 14d102a50..0bc742198 100644
--- a/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
+++ b/src/main/java/at/hannibal2/skyhanni/data/EntityData.kt
@@ -1,9 +1,6 @@
package at.hannibal2.skyhanni.data
-import at.hannibal2.skyhanni.events.EntityHealthUpdateEvent
-import at.hannibal2.skyhanni.events.EntityMaxHealthUpdateEvent
-import at.hannibal2.skyhanni.events.LorenzWorldChangeEvent
-import at.hannibal2.skyhanni.events.PacketEvent
+import at.hannibal2.skyhanni.events.*
import at.hannibal2.skyhanni.utils.EntityUtils
import at.hannibal2.skyhanni.utils.LorenzUtils.baseMaxHealth
import net.minecraft.client.Minecraft
@@ -17,16 +14,13 @@ import net.minecraft.entity.item.EntityItemFrame
import net.minecraft.entity.item.EntityXPOrb
import net.minecraft.network.play.server.S1CPacketEntityMetadata
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent
-import net.minecraftforge.fml.common.gameevent.TickEvent
class EntityData {
private val maxHealthMap = mutableMapOf<EntityLivingBase, Int>()
@SubscribeEvent
- fun onTick(event: TickEvent.ClientTickEvent) {
- if (event.phase != TickEvent.Phase.START) return
-
+ fun onTick(event: LorenzTickEvent) {
val entities = EntityUtils.getEntitiesOrNull<EntityLivingBase>() ?: return
for (entity in entities) {
val maxHealth = entity.baseMaxHealth