Fix crash after loading error due to fluid texture gathering and config lookup (#8802)

This commit is contained in:
Dennis C authored and GitHub committed 2022-06-27 21:16:54 -07:00
1 parent 06d568408c
commit dc1c973684
2 files changed
+3 -1

No files matched your search

@@ -472,6 +472,8 @@ public class ForgeHooksClient
public static void gatherFluidTextures(Set<Material> textures)
{
if (!ModLoader.isLoadingStateValid()) return;
ForgeRegistries.FLUIDS.getValues().stream()
.flatMap(ForgeHooksClient::getFluidMaterials)
.forEach(textures::add);
@@ -147,7 +147,7 @@ public class ClientModLoader
boolean showWarnings = true;
try {
showWarnings = ForgeConfig.CLIENT.showLoadWarnings.get();
} catch (NullPointerException e) {
} catch (NullPointerException | IllegalStateException e) {
// We're in an early error state, config is not available. Assume true.
}
if (!showWarnings) {