Skip to content

Commit

Permalink
Fix crash when Sodium is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
makamys authored and mitchej123 committed Mar 27, 2024
1 parent d236689 commit 3e6aa46
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/main/java/com/gtnewhorizons/angelica/proxy/ClientProxy.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,15 @@ public void worldLoad(WorldEvent.Load event) {
LOGGER.info("World loaded - Enabling GLSM Cache");
}

// Register all blocks. Because blockids are unique to a world, this must be done each load
GameData.getBlockRegistry().forEach(o -> {

final Block b = (Block) o;
AngelicaBlockSafetyRegistry.canBlockRenderOffThread(b, true, true);
AngelicaBlockSafetyRegistry.canBlockRenderOffThread(b, false, true);
});
if(AngelicaConfig.enableSodium) {
// Register all blocks. Because blockids are unique to a world, this must be done each load
GameData.getBlockRegistry().forEach(o -> {

final Block b = (Block) o;
AngelicaBlockSafetyRegistry.canBlockRenderOffThread(b, true, true);
AngelicaBlockSafetyRegistry.canBlockRenderOffThread(b, false, true);
});
}
}


Expand Down

0 comments on commit 3e6aa46

Please sign in to comment.