diff options
author | inglettronald <inglettronald@gmail.com> | 2023-05-03 02:35:33 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-05-03 02:35:33 -0500 |
commit | 8022824961f4735730bc0041eb47b86addd6ed03 (patch) | |
tree | bc4404e287963a50f1a1f5125a31b3abe0d5fa66 /src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt | |
parent | 160688c66622fdbbd8a42b72ead4206e21391719 (diff) | |
download | DulkirMod-8022824961f4735730bc0041eb47b86addd6ed03.tar.gz DulkirMod-8022824961f4735730bc0041eb47b86addd6ed03.tar.bz2 DulkirMod-8022824961f4735730bc0041eb47b86addd6ed03.zip |
Blaze Slayer feature addition
Diffstat (limited to 'src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt')
-rw-r--r-- | src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt index 231ab3f..f49ed2c 100644 --- a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt +++ b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt @@ -9,6 +9,8 @@ import net.minecraft.client.renderer.WorldRenderer import net.minecraft.client.renderer.entity.RenderManager import net.minecraft.client.renderer.vertex.DefaultVertexFormats import net.minecraft.util.Vec3 +import net.minecraftforge.client.event.RenderWorldLastEvent +import net.minecraftforge.fml.common.eventhandler.SubscribeEvent import org.lwjgl.opengl.GL11 import java.awt.Color @@ -20,6 +22,7 @@ class WorldRenderUtils { private val tessellator: Tessellator = Tessellator.getInstance() private val worldRenderer: WorldRenderer = tessellator.worldRenderer private val renderManager: RenderManager = mc.renderManager + var partialTicks: Float = 0f fun renderString( location: Vec3, text: String, @@ -172,5 +175,10 @@ class WorldRenderUtils { GlStateManager.popMatrix() } + + @SubscribeEvent + fun grabPartialTicks(event: RenderWorldLastEvent) { + this.partialTicks = event.partialTicks + } } }
\ No newline at end of file |