Wrong Minecraft version

Crash Loading World: Cannot invoke LocalPlayer.isSpectator() because this.minecraft.player is null

What the log looks like

java\.lang\.NullPointerException: Cannot invoke "net\.minecraft\.client\.player\.LocalPlayer\.isSpectator\(\)" because "this\.minecraft\.player" is null
Cannot invoke "net\.minecraft\.client\.player\.LocalPlayer\.isSpectator\(\)" because "this\.minecraft\.player" is null[\s\S]{0,160}net\.minecraft\.client\.renderer\.LevelRenderer\.update

How to fix it

  1. Update both Iris Shaders and Sodium to their latest matching releases for your exact Minecraft version (for example, Sodium 0.9.2 requires Iris 1.11.4 or newer).
  2. Check the Iris changelog or download page on Modrinth to verify which exact Sodium version your installed Iris jar was built against, as Iris is strictly tied to specific Sodium updates.
  3. If you already have the newest versions and still crash on world load, downgrade both Iris and Sodium together to the previous stable pair until a hotfix is released.
  4. Test loading the world with Iris temporarily removed from your mods folder to confirm no other rendering or camera mod is triggering an early frame update.
LoadersFabric, Neoforge, Quilt
SeverityStops the game
CategoryWrong Minecraft version

Check your own log

Related errors