prevent crashing when runtime isn't loaded

fixes #101
This commit is contained in:
rlnt 2024-10-22 13:19:25 +02:00
parent 254055b9b3
commit 84fcb8046d
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -6,7 +6,8 @@ The format is based on [Keep a Changelog],
and this project adheres to [Semantic Versioning].
## Unreleased
- /
- fixed crash when runtime isn't loaded ([#101](https://github.com/AlmostReliable/almostunified/issues/101))
## [1.2.0] - 2024-10-06

View file

@ -46,12 +46,12 @@ public final class AlmostUnifiedCommon {
}
public static void onRecipeManagerError(ResourceLocation recipe) {
assert RUNTIME != null;
if (RUNTIME == null) return;
RUNTIME.getDebugHandler().collectRecipeError(recipe);
}
public static void onRecipeManagerEnd() {
assert RUNTIME != null;
if (RUNTIME == null) return;
RUNTIME.getDebugHandler().finish();
}
}