From eb2dff41b395c5fb71ef2d16e8b9c6a167bfc996 Mon Sep 17 00:00:00 2001 From: Hunter19823 Date: Fri, 10 Nov 2023 16:22:40 -0700 Subject: [PATCH] Back ported a JEI event register fix. --- .../src/main/java/pie/ilikepiefoo/compat/jei/JEIEvents.java | 5 ++++- gradle.properties | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/common/src/main/java/pie/ilikepiefoo/compat/jei/JEIEvents.java b/common/src/main/java/pie/ilikepiefoo/compat/jei/JEIEvents.java index 7dc938d..7e1a13a 100644 --- a/common/src/main/java/pie/ilikepiefoo/compat/jei/JEIEvents.java +++ b/common/src/main/java/pie/ilikepiefoo/compat/jei/JEIEvents.java @@ -1,5 +1,6 @@ package pie.ilikepiefoo.compat.jei; +import dev.architectury.platform.Platform; import dev.latvian.mods.kubejs.event.EventGroup; import dev.latvian.mods.kubejs.event.EventHandler; import pie.ilikepiefoo.compat.jei.events.OnRuntimeAvailableEventJS; @@ -32,7 +33,9 @@ public interface JEIEvents { () -> RegisterVanillaCategoryExtensionsEventJS.class); static void register() { - GROUP.register(); + if (Platform.isModLoaded("jei")) { + GROUP.register(); + } } } diff --git a/gradle.properties b/gradle.properties index 418936f..cad8bd6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ enabled_platforms=fabric,forge archives_base_name=kubejsadditions mod_id=kubejsadditions mod_name=KubeJS Addditions -mod_version=3.2.0 +mod_version=3.2.1 mod_description=A mod that adds a bunch of additional features to KubeJS. mod_author=ILIKEPIEFOO2 mod_icon=assets/kubejsadditions/kubejs_logo.png