Fixed rotation and scale applied to the custom-modeled scripted blocks

This commit is contained in:
Goodbird committed 2024-05-06 18:19:07 +03:00
1 parent 1471ffddb0
commit 85c3fb5f8b
1 file changed
+4
@@ -39,10 +39,14 @@ public abstract class MixinBlockScriptedRenderer {
TileScripted tileScripted = (TileScripted) te;
if(!(tileScripted.renderTile instanceof TileEntityCustomModel)) return;
GL11.glPushMatrix();
GL11.glTranslated(x,y,z);
GL11.glTranslated(0.5,0, 0.5);
GL11.glRotatef((float)tileScripted.rotationY, 0.0F, 1.0F, 0.0F);
GL11.glRotatef((float)tileScripted.rotationX, 1.0F, 0.0F, 0.0F);
GL11.glRotatef((float)tileScripted.rotationZ, 0.0F, 0.0F, 1.0F);
GL11.glScalef(tileScripted.scaleX, tileScripted.scaleY, tileScripted.scaleZ);
GL11.glTranslated(-0.5,0, -0.5);
GL11.glTranslated(-x,-y,-z);
TileEntityRendererDispatcher.instance.renderTileEntityAt(tileScripted.renderTile, x, y, z, partialTicks);
GL11.glPopMatrix();
ci.cancel();