@@ -94,7 +94,6 @@ public void renderCustomSky(MatrixStack matrixStack, float tickDelta, CallbackIn
9494 Matrix4f matrix4f = matrixStack .peek ().getModel ();
9595 bufferBuilder .begin (6 , VertexFormats .POSITION_COLOR );
9696 bufferBuilder .vertex (matrix4f , 0.0F , 100.0F , 0.0F ).color (k , l , m , fs [3 ]).next ();
97- int n = 16 ;
9897
9998 for (int o = 0 ; o <= 16 ; ++o ) {
10099 float p = (float )o * (float ) (Math .PI * 2 ) / 16.0F ;
@@ -118,30 +117,32 @@ public void renderCustomSky(MatrixStack matrixStack, float tickDelta, CallbackIn
118117 matrixStack .multiply (Vector3f .POSITIVE_X .getDegreesQuaternion (this .world .getSkyAngle (tickDelta ) * 360.0F ));
119118 Matrix4f matrix4f2 = matrixStack .peek ().getModel ();
120119 float l = 30.0F ;
121- MinecraftClient .getInstance ().getTextureManager ().bindTexture (SUN );
122- bufferBuilder .begin (7 , VertexFormats .POSITION_TEXTURE );
123- bufferBuilder .vertex (matrix4f2 , -l , 100.0F , -l ).texture (0.0F , 0.0F ).next ();
124- bufferBuilder .vertex (matrix4f2 , l , 100.0F , -l ).texture (1.0F , 0.0F ).next ();
125- bufferBuilder .vertex (matrix4f2 , l , 100.0F , l ).texture (1.0F , 1.0F ).next ();
126- bufferBuilder .vertex (matrix4f2 , -l , 100.0F , l ).texture (0.0F , 1.0F ).next ();
127- bufferBuilder .end ();
128- BufferRenderer .draw (bufferBuilder );
129- l = 20.0F ;
130- MinecraftClient .getInstance ().getTextureManager ().bindTexture (MOON_PHASES );
131- int s = this .world .getMoonPhase ();
132- int t = s % 4 ;
133- int n = s / 4 % 2 ;
134- float u = (float )(t ) / 4.0F ;
135- float p = (float )(n ) / 2.0F ;
136- float q = (float )(t + 1 ) / 4.0F ;
137- float r = (float )(n + 1 ) / 2.0F ;
138- bufferBuilder .begin (7 , VertexFormats .POSITION_TEXTURE );
139- bufferBuilder .vertex (matrix4f2 , -l , -100.0F , l ).texture (q , r ).next ();
140- bufferBuilder .vertex (matrix4f2 , l , -100.0F , l ).texture (u , r ).next ();
141- bufferBuilder .vertex (matrix4f2 , l , -100.0F , -l ).texture (u , p ).next ();
142- bufferBuilder .vertex (matrix4f2 , -l , -100.0F , -l ).texture (q , p ).next ();
143- bufferBuilder .end ();
144- BufferRenderer .draw (bufferBuilder );
120+ if (AxolotlClient .CONFIG .showSunMoon .get ()) {
121+ MinecraftClient .getInstance ().getTextureManager ().bindTexture (SUN );
122+ bufferBuilder .begin (7 , VertexFormats .POSITION_TEXTURE );
123+ bufferBuilder .vertex (matrix4f2 , -l , 100.0F , -l ).texture (0.0F , 0.0F ).next ();
124+ bufferBuilder .vertex (matrix4f2 , l , 100.0F , -l ).texture (1.0F , 0.0F ).next ();
125+ bufferBuilder .vertex (matrix4f2 , l , 100.0F , l ).texture (1.0F , 1.0F ).next ();
126+ bufferBuilder .vertex (matrix4f2 , -l , 100.0F , l ).texture (0.0F , 1.0F ).next ();
127+ bufferBuilder .end ();
128+ BufferRenderer .draw (bufferBuilder );
129+ l = 20.0F ;
130+ MinecraftClient .getInstance ().getTextureManager ().bindTexture (MOON_PHASES );
131+ int s = this .world .getMoonPhase ();
132+ int t = s % 4 ;
133+ int n = s / 4 % 2 ;
134+ float u = (float ) (t ) / 4.0F ;
135+ float p = (float ) (n ) / 2.0F ;
136+ float q = (float ) (t + 1 ) / 4.0F ;
137+ float r = (float ) (n + 1 ) / 2.0F ;
138+ bufferBuilder .begin (7 , VertexFormats .POSITION_TEXTURE );
139+ bufferBuilder .vertex (matrix4f2 , -l , -100.0F , l ).texture (q , r ).next ();
140+ bufferBuilder .vertex (matrix4f2 , l , -100.0F , l ).texture (u , r ).next ();
141+ bufferBuilder .vertex (matrix4f2 , l , -100.0F , -l ).texture (u , p ).next ();
142+ bufferBuilder .vertex (matrix4f2 , -l , -100.0F , -l ).texture (q , p ).next ();
143+ bufferBuilder .end ();
144+ BufferRenderer .draw (bufferBuilder );
145+ }
145146 RenderSystem .disableTexture ();
146147 float v = this .world .method_23787 (tickDelta ) * j ;
147148 if (v > 0.0F ) {
0 commit comments