diff --git a/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java b/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java index b08c74443..4d6c13c4e 100644 --- a/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java +++ b/forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java @@ -1,11 +1,13 @@ package cc.cassian.pyrite.forge; import dev.architectury.platform.forge.EventBuses; +import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import cc.cassian.pyrite.Pyrite; +import net.minecraftforge.fml.loading.FMLEnvironment; @Mod(Pyrite.modID) public final class PyriteForge { @@ -15,8 +17,10 @@ public PyriteForge() { IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus(); // Run our common setup. Pyrite.init(); - modEventBus.addListener(PyriteClient::registerBlockColors); - modEventBus.addListener(PyriteClient::registerItemColorHandlers); + if (FMLEnvironment.dist == Dist.CLIENT) { + modEventBus.addListener(PyriteClient::registerBlockColors); + modEventBus.addListener(PyriteClient::registerItemColorHandlers); + } diff --git a/gradle.properties b/gradle.properties index c20a54084..3a31ded52 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx2G org.gradle.parallel=true # Mod properties -mod_version = 0.14.4-1.19.2 +mod_version = 0.14.5-1.19.2 maven_group = cc.cassian archives_name = pyrite enabled_platforms = fabric,forge