Skip to content

Commit 4be7b0b

Browse files
committed
v1.4 - Fix ModMenu On First Launch (Fixes #6)
1 parent 3e23a02 commit 4be7b0b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ fabric_version=0.119.3+1.21.4
1313
modmenu_version=13.0.3
1414

1515
# Mod Properties
16-
mod_version=1.3
16+
mod_version=1.4
1717
maven_group=btw.lowercase
1818
archives_base_name=optiboxes

src/main/java/btw/lowercase/optiboxes/mixins/MixinLevelRenderer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)