@@ -54,12 +54,12 @@ public abstract class MixinLevelRenderer {
5454
5555 original .call (instance );
5656 if (isEnabled ) {
57- ClientLevel clientLevel = Objects .requireNonNull (this .level );
5857 Matrix4fStack modelViewStack = RenderSystem .getModelViewStack ();
5958 modelViewStack .pushMatrix ();
6059 modelViewStack .rotate (Axis .YP .rotationDegrees (-90.0F ));
6160 for (OptiFineSkybox optiFineSkybox : SkyboxManager .INSTANCE .getActiveSkyboxes ()) {
62- OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , clientLevel , 0.0F );
61+ //noinspection DataFlowIssue
62+ OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , this .level , 0.0F );
6363 }
6464 modelViewStack .popMatrix ();
6565 RenderSystem .depthMask (true );
@@ -88,13 +88,13 @@ public abstract class MixinLevelRenderer {
8888 private void optiboxes$renderSkyboxes (SkyRenderer instance , PoseStack poseStack , MultiBufferSource .BufferSource bufferSource , float timeOfDay , int moonPhases , float rainLevel , float starBrightness , FogParameters fogParameters , Operation <Void > original ) {
8989 boolean isEnabled = SkyboxManager .INSTANCE .isEnabled (this .level );
9090 if (isEnabled ) {
91- ClientLevel clientLevel = Objects .requireNonNull (this .level );
9291 Matrix4fStack modelViewStack = RenderSystem .getModelViewStack ();
9392 modelViewStack .pushMatrix ();
9493 modelViewStack .rotate (Axis .YP .rotationDegrees (-90.0F ));
9594 RenderSystem .blendFuncSeparate (GlStateManager .SourceFactor .SRC_ALPHA , GlStateManager .DestFactor .ONE , GlStateManager .SourceFactor .ONE , GlStateManager .DestFactor .ZERO );
9695 for (OptiFineSkybox optiFineSkybox : SkyboxManager .INSTANCE .getActiveSkyboxes ()) {
97- OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , clientLevel , this .optiboxes$tickDelta );
96+ //noinspection DataFlowIssue
97+ OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , this .level , this .optiboxes$tickDelta );
9898 }
9999 modelViewStack .popMatrix ();
100100 }
0 commit comments