Skip to content

Commit

Permalink
fix: crash with venus sky renderer
Browse files Browse the repository at this point in the history
the sky doesn't quite look correct, but at least it doesn't crash
closes #366
  • Loading branch information
marcus8448 committed Dec 22, 2024
1 parent aa4f0e4 commit d25fc4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public void render(WorldRenderContext context) {
matrices.mulPose(Axis.XP.rotationDegrees(context.world().getTimeOfDay(context.tickCounter().getRealtimeDeltaTicks()) * 360.0f));
matrices.mulPose(Axis.YP.rotationDegrees(-19.0F));

this.starManager.render(context.matrixStack(), context.projectionMatrix(), context.world(), context.tickCounter().getRealtimeDeltaTicks());
this.starManager.render(matrices, context.projectionMatrix(), context.world(), context.tickCounter().getRealtimeDeltaTicks());

matrices.popPose();
context.profiler().pop();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,8 @@ private MeshData renderStars() {
public void render(WorldRenderContext context) {
ClientLevel level = context.world();
float partialTicks = context.tickCounter().getRealtimeDeltaTicks();
PoseStack poseStack = context.matrixStack();
PoseStack poseStack = new PoseStack();
poseStack.mulPose(context.positionMatrix());
Vec3 vec3 = level.getSkyColor(context.camera().getPosition(), partialTicks);
float f1 = (float) vec3.x;
float f2 = (float) vec3.y;
Expand Down

0 comments on commit d25fc4c

Please sign in to comment.