Fix crash when Sodium is disabled

This commit is contained in:
makamys authored and Jason Mitchell committed 2024-03-27 09:06:48 -07:00
1 parent d236689e6a
commit 3e6aa461c6
1 file changed
+9 -7
@@ -78,13 +78,15 @@ public class ClientProxy extends CommonProxy {
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);
});
}
}