diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-08-15 18:14:46 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-08-15 18:14:46 +0200 |
commit | 5bb2a583b3c0a55960843c4261e239f4c61ede2e (patch) | |
tree | 68a9e802037e5639534b259059025d5bdc52c982 | |
parent | 783ea96018adc4fb8e7353a121aa30f50a75bf2d (diff) | |
download | skyhanni-5bb2a583b3c0a55960843c4261e239f4c61ede2e.tar.gz skyhanni-5bb2a583b3c0a55960843c4261e239f4c61ede2e.tar.bz2 skyhanni-5bb2a583b3c0a55960843c4261e239f4c61ede2e.zip |
adding rev5 boom timer, not totally ready yet
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt index 221741640..f0299a173 100644 --- a/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt +++ b/src/main/java/at/hannibal2/skyhanni/damageindicator/BossDamageIndicator.kt @@ -14,6 +14,7 @@ import net.minecraft.client.renderer.GlStateManager import net.minecraft.entity.EntityLivingBase import net.minecraft.entity.monster.EntityEnderman import net.minecraft.entity.monster.EntityMagmaCube +import net.minecraft.entity.monster.EntityZombie import net.minecraft.util.Vec3 import net.minecraftforge.client.event.RenderWorldLastEvent import net.minecraftforge.event.entity.EntityJoinWorldEvent @@ -52,7 +53,8 @@ class BossDamageIndicator { val player = Minecraft.getMinecraft().thePlayer //TODO config to define between 100ms and 5 sec - for (uuid in data.filter { System.currentTimeMillis() > it.value.timeLastTick + if (it.value.dead) 3_000 else 100 }.map { it.key }) { + for (uuid in data.filter { System.currentTimeMillis() > it.value.timeLastTick + if (it.value.dead) 3_000 else 100 } + .map { it.key }) { data.remove(uuid) } @@ -317,7 +319,18 @@ class BossDamageIndicator { } } } -// } + if (entityData.bossType == BossType.SLAYER_ZOMBIE_5) { + if (entity is EntityZombie) { + entity.hasNameTagWith(3, "§fBoom!", consumer = { + val ticksAlive = entity.ticksExisted % (20 * 5) + val remainingTicks = (5 * 20).toLong() - ticksAlive + val format = formatDelay(remainingTicks * 50) +// entityData.nameSuffix = " §lBOOM - $format" + entityData.nameSuffix = " §lBOOM!" + }) + } + } + if (health == 0) { customHealthText = "§cDead" entityData.dead = true |