Skip to content

Commit

Permalink
Fix forge server crash
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiancc committed Sep 24, 2024
1 parent 0afeed3 commit 8e40f60
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions forge/src/main/java/cc/cassian/pyrite/forge/PyriteForge.java
Original file line number Diff line number Diff line change
@@ -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 {
Expand All @@ -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);
}



Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8e40f60

Please sign in to comment.