aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/at
diff options
context:
space:
mode:
authorhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 16:19:17 +0200
committerhannibal2 <24389977+hannibal00212@users.noreply.github.com>2023-08-28 16:19:17 +0200
commit9239e161ba6f8f6b0a279d94db1e9144170ae83c (patch)
tree05b8e16c6d0e0bfef2564d12d61a0b771271d622 /src/main/java/at
parentdf3fecab65827e551e3ff0e086eeb5e8d3c19b0f (diff)
downloadskyhanni-9239e161ba6f8f6b0a279d94db1e9144170ae83c.tar.gz
skyhanni-9239e161ba6f8f6b0a279d94db1e9144170ae83c.tar.bz2
skyhanni-9239e161ba6f8f6b0a279d94db1e9144170ae83c.zip
Show the name over Nukekebi Skulls for in ender slayer
Diffstat (limited to 'src/main/java/at')
-rw-r--r--src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt29
1 files changed, 25 insertions, 4 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
index 00e8b2065..65c5e6757 100644
--- a/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
+++ b/src/main/java/at/hannibal2/skyhanni/features/slayer/enderman/EndermanSlayerFeatures.kt
@@ -13,6 +13,7 @@ import at.hannibal2.skyhanni.utils.LorenzUtils.editCopy
import at.hannibal2.skyhanni.utils.LorenzUtils.isInIsland
import at.hannibal2.skyhanni.utils.RenderUtils.drawColor
import at.hannibal2.skyhanni.utils.RenderUtils.drawDynamicText
+import at.hannibal2.skyhanni.utils.RenderUtils.exactLocation
import at.hannibal2.skyhanni.utils.TimeUtils.format
import net.minecraft.entity.item.EntityArmorStand
import net.minecraft.entity.monster.EntityEnderman
@@ -60,9 +61,10 @@ class EndermanSlayerFeatures {
if (config.endermanHighlightNukekebi) {
if (entity.inventory.any { it?.getSkullTexture() == nukekebiSkulTexture }) {
- nukekebiSkulls.add(entity)
- logger.log("Added nukekebi skulls at ${entity.getLorenzVec()}")
- nukekebiSkulls.also { it.removeAll { it.isDead } }
+ if (entity !in nukekebiSkulls) {
+ nukekebiSkulls.add(entity)
+ logger.log("Added nukekebi skulls at ${entity.getLorenzVec()}")
+ }
}
}
}
@@ -102,14 +104,33 @@ class EndermanSlayerFeatures {
event.drawWaypointFilled(location, LorenzColor.RED.toColor(), true, true)
event.drawDynamicText(location.add(0, 1, 0), "§4Beacon §b$durationFormat", 1.8)
}
+ for (beacon in flyingBeacons) {
+ if (!beacon.isDead) {
+ val location = event.exactLocation(beacon)
+ event.drawDynamicText(location.add(0, 1, 0), "§4Beacon", 1.8)
+ }
+ }
+
+ for (skull in nukekebiSkulls) {
+ if (!skull.isDead) {
+ event.drawDynamicText(
+ skull.getLorenzVec().add(-0.5, 1.5, -0.5),
+ "§6Nukekebi Skull",
+ 1.6,
+ ignoreBlocks = false
+ )
+ }
+ }
}
@SubscribeEvent
fun onTick(event: LorenzTickEvent) {
if (!IslandType.THE_END.isInIsland()) return
- if (!config.slayerEndermanBeacon) return
if (!event.repeatSeconds(1)) return
+ nukekebiSkulls.also { it.removeAll { it.isDead } }
+ flyingBeacons.also { it.removeAll { it.isDead } }
+
// Removing the beacon if It's still there after 7 sesconds.
// This is just a workaround for the cases where the ServerBlockChangeEvent don't detect the beacon despawn info.
val toRemove = sittingBeacon.filter { it.value.passedSince() > 7.seconds }