Skip to content

Fix null Pointer Exeption in AetherChunkData#12

Merged
0vergrown merged 1 commit into0vergrown:masterfrom
pirate0815:fix-null-error
Nov 16, 2025
Merged

Fix null Pointer Exeption in AetherChunkData#12
0vergrown merged 1 commit into0vergrown:masterfrom
pirate0815:fix-null-error

Conversation

@pirate0815
Copy link
Copy Markdown
Contributor

Currently if AetherChunkData is loaded from disk, the final world variable is set to null.
If the world is loaded from disk and a particular chunk was saved and becomes corrupted this can cause a Null Pointer Exception:
java.lang.NullPointerException: Cannot invoke "net.minecraft.world.World.isClient()" because "world" is null at knot//dev.overgrown.aspectslib.aether.AetherManager.isDeadZone(AetherManager.java:79) at knot//dev.overgrown.aspectslib.aether.AetherChunkData.canHarvest(AetherChunkData.java:98) at knot//dev.overgrown.aspectslib.aether.AetherChunkData.harvestAether(AetherChunkData.java:107) at knot//dev.overgrown.aspectslib.corruption.CorruptionManager.processAetherConsumption(CorruptionManager.java:306) at knot//dev.overgrown.aspectslib.corruption.CorruptionManager.processRegionCorruption(CorruptionManager.java:138) at knot//dev.overgrown.aspectslib.corruption.CorruptionManager.processWorldCorruption(CorruptionManager.java:86) at knot//dev.overgrown.aspectslib.corruption.CorruptionManager.onServerTick(CorruptionManager.java:52)

This PR fixes the problem by having AetherWorldState set the world variable of all its loaded AetherChunkData objects on the first call to get any AetherChunkData.

Makes sure that the world is set in AetherChunkData when it is loaded from disk.
@0vergrown 0vergrown merged commit 232bc5e into 0vergrown:master Nov 16, 2025
1 check passed
@0vergrown
Copy link
Copy Markdown
Owner

Okay, I actually merged this and then updated the Modrinth maven and then updated Thaumaturge with the new version (1.1.8) so this PR should be working on there too 👍

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