Skip to content

Commit

Permalink
fix: dedicated server issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sylv256 committed Nov 9, 2024
1 parent e610346 commit fa76e2b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/main/java/gay/sylv/legacy_landscape/ClientConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
import gay.sylv.legacy_landscape.client.SuperSecretSetting;
import gay.sylv.legacy_landscape.util.Constants;
import net.minecraft.client.Minecraft;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.api.distmarker.OnlyIn;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.event.config.ModConfigEvent;
import net.neoforged.neoforge.common.ModConfigSpec;

@OnlyIn(Dist.CLIENT)
@EventBusSubscriber(
modid = Constants.MOD_ID,
bus = EventBusSubscriber.Bus.MOD
Expand Down
6 changes: 5 additions & 1 deletion src/main/java/gay/sylv/legacy_landscape/LegacyLandscape.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
import gay.sylv.legacy_landscape.util.RandomStrings;
import net.minecraft.resources.ResourceLocation;
import net.neoforged.bus.api.IEventBus;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.fml.event.lifecycle.FMLCommonSetupEvent;
import org.jetbrains.annotations.NotNull;
import org.slf4j.Logger;
Expand All @@ -31,7 +33,9 @@ public final class LegacyLandscape {

// The constructor for the mod class is the first code that is run when your mod is loaded.
// FML will recognize some parameter types like IEventBus or ModContainer and pass them in automatically.
public LegacyLandscape(IEventBus modBus) {
public LegacyLandscape(IEventBus modBus, ModContainer modContainer) {
modContainer.registerConfig(ModConfig.Type.CLIENT, ClientConfig.SPEC);

LegacySounds.SOUNDS.register(modBus);
LegacyComponents.DATA_COMPONENTS.register(modBus);
LegacyEffects.MOB_EFFECTS.register(modBus);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.neoforged.api.distmarker.Dist;
import net.neoforged.fml.ModContainer;
import net.neoforged.fml.common.Mod;
import net.neoforged.fml.config.ModConfig;
import net.neoforged.neoforge.client.gui.ConfigurationScreen;
import net.neoforged.neoforge.client.gui.IConfigScreenFactory;

Expand All @@ -15,7 +14,6 @@
)
public final class LegacyLandscapeClient {
public LegacyLandscapeClient(ModContainer modContainer) {
modContainer.registerConfig(ModConfig.Type.CLIENT, ClientConfig.SPEC);
modContainer.registerExtensionPoint(IConfigScreenFactory.class, ConfigurationScreen::new);
}
}

0 comments on commit fa76e2b

Please sign in to comment.