@@ -49,12 +49,12 @@ public abstract class MixinLevelRenderer {
4949 original .call (instance );
5050 if (SkyboxManager .INSTANCE .isEnabled (this .level )) {
5151 List <OptiFineSkybox > activeSkyboxes = SkyboxManager .INSTANCE .getActiveSkyboxes ();
52- ClientLevel clientLevel = Objects .requireNonNull (this .level );
5352 Matrix4fStack modelViewStack = RenderSystem .getModelViewStack ();
5453 modelViewStack .pushMatrix ();
5554 modelViewStack .rotate (Axis .YP .rotationDegrees (-90.0F ));
5655 for (OptiFineSkybox optiFineSkybox : activeSkyboxes ) {
57- OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , clientLevel , 0.0F );
56+ //noinspection DataFlowIssue
57+ OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , this .level , 0.0F );
5858 }
5959 modelViewStack .popMatrix ();
6060 RenderSystem .setShaderColor (1.0F , 1.0F , 1.0F , 1.0F );
@@ -73,12 +73,12 @@ public abstract class MixinLevelRenderer {
7373 private void optiboxes$renderSkyboxes (SkyRenderer instance , PoseStack poseStack , MultiBufferSource .BufferSource bufferSource , float timeOfDay , int moonPhases , float rainLevel , float starBrightness , FogParameters fogParameters , Operation <Void > original ) {
7474 if (SkyboxManager .INSTANCE .isEnabled (this .level )) {
7575 List <OptiFineSkybox > activeSkyboxes = SkyboxManager .INSTANCE .getActiveSkyboxes ();
76- ClientLevel clientLevel = Objects .requireNonNull (this .level );
7776 Matrix4fStack modelViewStack = RenderSystem .getModelViewStack ();
7877 modelViewStack .pushMatrix ();
7978 modelViewStack .rotate (Axis .YP .rotationDegrees (-90.0F ));
8079 for (OptiFineSkybox optiFineSkybox : activeSkyboxes ) {
81- OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , clientLevel , this .optiboxes$tickDelta );
80+ //noinspection DataFlowIssue
81+ OptiFineSkyRenderer .INSTANCE .renderSkybox (optiFineSkybox , modelViewStack , this .level , this .optiboxes$tickDelta );
8282 }
8383 modelViewStack .popMatrix ();
8484 }
0 commit comments