mirror of
https://github.com/GTNewHorizons/ForgeRelocation.git
synced 2026-11-13 17:04:06 +00:00
use one local variable for the Tesselator, so it can be transformed properly (#8)
This commit is contained in:
1 parent
5b34a69e2b
commit
b2c051b597
1 file changed
+6
-6
@@ -32,7 +32,6 @@ object MovingRenderer {
|
||||
|
||||
private def mc = Minecraft.getMinecraft
|
||||
private def world = mc.theWorld
|
||||
private def tes = Tessellator.instance
|
||||
|
||||
private def render(x: Int, y: Int, z: Int, rpos: Vector3) {
|
||||
val oldOcclusion = mc.gameSettings.ambientOcclusion
|
||||
@@ -65,8 +64,9 @@ object MovingRenderer {
|
||||
)
|
||||
|
||||
for (pass <- 0 to 1) {
|
||||
tes.startDrawingQuads()
|
||||
tes.setTranslation(
|
||||
val tess = Tessellator.instance
|
||||
tess.startDrawingQuads()
|
||||
tess.setTranslation(
|
||||
-TileEntityRendererDispatcher.staticPlayerX + MathLib
|
||||
.clamp(-1f, 1f, rpos.x.toFloat),
|
||||
-TileEntityRendererDispatcher.staticPlayerY + MathLib
|
||||
@@ -77,7 +77,7 @@ object MovingRenderer {
|
||||
rpos.z.toFloat
|
||||
)
|
||||
)
|
||||
tes.setColorOpaque(1, 1, 1)
|
||||
tess.setColorOpaque(1, 1, 1)
|
||||
|
||||
block.getRenderBlockPass
|
||||
if (block.canRenderInPass(pass)) {
|
||||
@@ -86,8 +86,8 @@ object MovingRenderer {
|
||||
renderHack = true
|
||||
}
|
||||
|
||||
tes.setTranslation(0, 0, 0)
|
||||
tes.draw()
|
||||
tess.setTranslation(0, 0, 0)
|
||||
tess.draw()
|
||||
}
|
||||
RenderHelper.enableStandardItemLighting()
|
||||
mc.entityRenderer.disableLightmap(frame)
|
||||
|
||||
Reference in new issue
Block a user