Skip to content

Fixes #1458 | Implement null check for LocalPlayer in renderLevel - #1554

Open
Rodriggrr wants to merge 1 commit into
ryanhcode:mainfrom
Rodriggrr:patch-1
Open

Fixes #1458 | Implement null check for LocalPlayer in renderLevel#1554
Rodriggrr wants to merge 1 commit into
ryanhcode:mainfrom
Rodriggrr:patch-1

Conversation

@Rodriggrr

Copy link
Copy Markdown

Problem

GameRendererMixin.renderLevel dereferences this.minecraft.player without a
null check. During the window between connecting to a server and the player
entity being fully assigned, renderLevel still runs and throws an NPE,
crashing the client. This is 100% reproducible on multiplayer connect but
doesn't show up in singleplayer, matching the reports in #1458 and #107.

Fix

Add a null check at the top of the injected method; reset sable$lastSubLevel
and return early if player is null, matching the existing behavior in the
else branch.

Fixes #1458

Add null check for player in renderLevel method.

Fixes ryanhcode#1458
@CLAassistant

CLAassistant commented Sep 11, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

server crash

2 participants