aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
diff options
context:
space:
mode:
authoringlettronald <inglettronald@gmail.com>2023-05-03 02:35:33 -0500
committeringlettronald <inglettronald@gmail.com>2023-05-03 02:35:33 -0500
commit8022824961f4735730bc0041eb47b86addd6ed03 (patch)
treebc4404e287963a50f1a1f5125a31b3abe0d5fa66 /src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt
parent160688c66622fdbbd8a42b72ead4206e21391719 (diff)
downloadDulkirMod-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.kt8
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