From 0b9b2d2188575b5cbbfab240a26d17ad893d4217 Mon Sep 17 00:00:00 2001 From: Rongmario Date: Sat, 16 Dec 2023 16:49:11 +0000 Subject: [PATCH] Fix the reload from crashing when JEI isn't in the environment (#107) --- .../groovyscript/registry/ReloadableRegistryManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cleanroommc/groovyscript/registry/ReloadableRegistryManager.java b/src/main/java/com/cleanroommc/groovyscript/registry/ReloadableRegistryManager.java index 320decf86..9c483268c 100644 --- a/src/main/java/com/cleanroommc/groovyscript/registry/ReloadableRegistryManager.java +++ b/src/main/java/com/cleanroommc/groovyscript/registry/ReloadableRegistryManager.java @@ -80,7 +80,9 @@ public static void onReload() { .map(ModPropertyContainer::getRegistries) .flatMap(Collection::stream) .forEach(VirtualizedRegistry::onReload); - JeiPlugin.reload(); + if (ModSupport.JEI.isLoaded()) { + JeiPlugin.reload(); + } } @ApiStatus.Internal