Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed that providerClass in BaseFullChunk can be null. #1884

Merged
merged 2 commits into from
Aug 26, 2021
Merged

Fixed that providerClass in BaseFullChunk can be null. #1884

merged 2 commits into from
Aug 26, 2021

Conversation

EinBexiii
Copy link
Collaborator

@EinBexiii EinBexiii commented Aug 9, 2021

This commit fix that the providerClass can be null in BaseFullChunk. Reason for that can be that you create a chunk from binary:

https://github.com/CloudburstMC/Nukkit/blob/master/src/main/java/cn/nukkit/level/format/anvil/Chunk.java#L222

In this case the LevelProvider will be set later if it's null, but providerClass stays null, this will cause some NPE's e.g. if you place blocks in this chunk.

@PetteriM1 PetteriM1 merged commit c29dbf4 into CloudburstMC:master Aug 26, 2021
wode490390 pushed a commit to NetEasePE/Nukkit that referenced this pull request Dec 10, 2021
wode490390 pushed a commit to NetEasePE/Nukkit that referenced this pull request Dec 26, 2021
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.

2 participants