Skip to content

Commit

Permalink
only server!
Browse files Browse the repository at this point in the history
  • Loading branch information
TexBlock committed Aug 8, 2023
1 parent 1295713 commit 51eb355
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/main/java/fi/dy/masa/servux/Servux.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package fi.dy.masa.servux;

import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.DistExecutor;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.loading.FMLLoader;
import net.minecraftforge.fml.loading.moddiscovery.ModInfo;
Expand All @@ -13,6 +15,10 @@ public class Servux {
public static final Logger logger = LogManager.getLogger(Reference.MOD_NAME);

public Servux() {
DistExecutor.safeRunWhenOn(Dist.DEDICATED_SERVER, () -> this::onInitialize);
}

public void onInitialize() {
DataProviderManager.INSTANCE.registerDataProvider(StructureDataProvider.INSTANCE);
DataProviderManager.INSTANCE.readFromConfig();
}
Expand Down

0 comments on commit 51eb355

Please sign in to comment.