@@ -98,11 +98,11 @@ public void render(Camera camera,
98
98
var renderMode = Minecraft .getInstance ().options .getCloudsType ();
99
99
100
100
// Translation of the clouds texture in world-space
101
- float worldX = (float ) ( cameraPos .x + ((ticks + tickDelta ) * 0.03F ));
102
- float worldZ = (float ) ( cameraPos .z + 3.96F );
101
+ double worldX = (cameraPos .x + ((ticks + tickDelta ) * 0.03D ));
102
+ double worldZ = (cameraPos .z + 3.96D );
103
103
104
- float textureWidth = this .textureData .width * CLOUD_WIDTH ;
105
- float textureHeight = this .textureData .height * CLOUD_WIDTH ;
104
+ double textureWidth = this .textureData .width * CLOUD_WIDTH ;
105
+ double textureHeight = this .textureData .height * CLOUD_WIDTH ;
106
106
worldX -= Mth .floor (worldX / textureWidth ) * textureWidth ;
107
107
worldZ -= Mth .floor (worldZ / textureHeight ) * textureHeight ;
108
108
@@ -139,9 +139,9 @@ public void render(Camera camera,
139
139
}
140
140
141
141
// Apply world->view transform
142
- final float viewPosX = (worldX - (cellX * CLOUD_WIDTH ));
142
+ final float viewPosX = (float ) ( worldX - (cellX * CLOUD_WIDTH ));
143
143
final float viewPosY = (float ) cameraPos .y () - height ;
144
- final float viewPosZ = (worldZ - (cellZ * CLOUD_WIDTH ));
144
+ final float viewPosZ = (float ) ( worldZ - (cellZ * CLOUD_WIDTH ));
145
145
146
146
Matrix4f modelViewMatrix = new Matrix4f (modelView );
147
147
modelViewMatrix .translate (-viewPosX , -viewPosY , -viewPosZ );
0 commit comments