diff options
author | inglettronald <inglettronald@gmail.com> | 2023-07-17 11:24:50 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-07-17 11:24:50 -0500 |
commit | d68c8bb34fe41d47777c4771364d2b94b4fdbdf1 (patch) | |
tree | 8b28111d93a1b5db2a7f98764f26b7ba8a15943a /src/main/kotlin/com/dulkirfabric/features/RenderTest.kt | |
parent | d21dad73e37c1aaba1933a52b094534865594dc7 (diff) | |
download | DulkirMod-Fabric-d68c8bb34fe41d47777c4771364d2b94b4fdbdf1.tar.gz DulkirMod-Fabric-d68c8bb34fe41d47777c4771364d2b94b4fdbdf1.tar.bz2 DulkirMod-Fabric-d68c8bb34fe41d47777c4771364d2b94b4fdbdf1.zip |
I'm all over the place today
Diffstat (limited to 'src/main/kotlin/com/dulkirfabric/features/RenderTest.kt')
-rw-r--r-- | src/main/kotlin/com/dulkirfabric/features/RenderTest.kt | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt b/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt index 1f96a7b..7b6c5e6 100644 --- a/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt +++ b/src/main/kotlin/com/dulkirfabric/features/RenderTest.kt @@ -1,12 +1,15 @@ package com.dulkirfabric.features +import com.dulkirfabric.events.EntityLoadEvent import com.dulkirfabric.events.WorldRenderLastEvent +import com.dulkirfabric.util.GlowingEntityInterface import com.dulkirfabric.util.WorldRenderUtils import meteordevelopment.orbit.EventHandler import net.minecraft.text.Style import net.minecraft.text.Text import net.minecraft.util.math.Vec3d import java.awt.Color +import kotlin.random.Random object RenderTest { @@ -16,11 +19,16 @@ object RenderTest { Text.literal("Home Base").setStyle(Style.EMPTY.withColor(Color(255, 100, 150, 255).rgb)), event.context, Vec3d(-183.5, 79.0, -465.5) ) + +// mc.world?.entities?.forEach { +// if (it is GlowingEntityInterface) +// it.setDulkirEntityGlow(true, Color(255, 255, 255, 255), Random(it.id).nextBoolean()) +// } } -// @EventHandler -// fun onLoadEnt(event: EntityLoadEvent) { -// if (event.entity !is GlowingEntityInterface) return -// event.entity.setDulkirEntityGlow(true, Color(255, 255, 255, 255), true) -// } + @EventHandler + fun onLoadEnt(event: EntityLoadEvent) { + if (event.entity !is GlowingEntityInterface) return + event.entity.setDulkirEntityGlow(true, Color(255, 255, 255, 255), Random(event.entity.id).nextBoolean()) + } }
\ No newline at end of file |