diff options
author | inglettronald <inglettronald@gmail.com> | 2023-05-25 17:54:35 -0500 |
---|---|---|
committer | inglettronald <inglettronald@gmail.com> | 2023-05-25 17:54:35 -0500 |
commit | e645175075b28d13266650ec00f6d5b7927133bf (patch) | |
tree | 145701d4173ac2658f7f8fa870320f23e9de635f /src/main/kotlin/dulkirmod/utils | |
parent | 1cc4b53862eb60e892b8c5cf1190b8cd6a62d32b (diff) | |
download | DulkirMod-e645175075b28d13266650ec00f6d5b7927133bf.tar.gz DulkirMod-e645175075b28d13266650ec00f6d5b7927133bf.tar.bz2 DulkirMod-e645175075b28d13266650ec00f6d5b7927133bf.zip |
better interpolation
Diffstat (limited to 'src/main/kotlin/dulkirmod/utils')
-rw-r--r-- | src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt index f49ed2c..229b380 100644 --- a/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt +++ b/src/main/kotlin/dulkirmod/utils/WorldRenderUtils.kt @@ -1,6 +1,7 @@ package dulkirmod.utils import dulkirmod.DulkirMod.Companion.mc +import dulkirmod.mixins.AccessorRenderManager import net.minecraft.client.renderer.GlStateManager import net.minecraft.client.renderer.GlStateManager.disableTexture2D import net.minecraft.client.renderer.GlStateManager.enableTexture2D @@ -180,5 +181,21 @@ class WorldRenderUtils { fun grabPartialTicks(event: RenderWorldLastEvent) { this.partialTicks = event.partialTicks } + + fun getRenderX() : Double { + return (mc.renderManager as AccessorRenderManager).renderX + } + + fun getRenderY() : Double { + return (mc.renderManager as AccessorRenderManager).renderY + } + + fun getRenderZ() : Double { + return (mc.renderManager as AccessorRenderManager).renderZ + } + + fun fixRenderPos(x: Double, y: Double, z: Double) : Array<Double> { + return arrayOf(x + getRenderX(), y + getRenderY(), z + getRenderZ()) + } } }
\ No newline at end of file |