Skip to content

[Bug] Crash if a mod tries to get the projection matrix outside a level #519

@fayer3

Description

@fayer3

Bug Description

When a mod tries to get the projection matrix outside a level this line causes a crash, because the player will be null.

return original * Math.min(Minecraft.getInstance().player.getScale(), 1F);

one mod that causes this is Vivecraft when in VR mode

How to Reproduce?

  1. install vivecraft
  2. enable vr mode (needs a headset, or NullVR mode selected in the settings)
  3. game will crash

Expected Behavior

no crash

Version

Debugify 1.21.11+1.0

Fabric/Quilt Loader Version

Fabric Loader 0.18.4 for 1.21.11

Logs or additional context

https://github.com/user-attachments/files/24648496/crash-2026-01-15_17.37.57-client.txt

Has not been reported.

  • I made sure this bug hasn't already been reported.

Is on most update to date version.

  • I made sure I am using the most up to date fabric/quilt loader and mod version.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions