Skip to content

Commit

Permalink
fix dedicated server trying to load client classes
Browse files Browse the repository at this point in the history
fixes: #12
Signed-off-by: srs-bsns <[email protected]>
  • Loading branch information
srs-bsns committed Mar 24, 2019
1 parent ad83b15 commit ba0877e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/main/java/teamrtg/lonelybiome/LBConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@
import net.minecraftforge.fml.client.config.GuiConfigEntries.ArrayEntry;
import net.minecraftforge.fml.client.config.GuiConfigEntries.SelectValueEntry;
import net.minecraftforge.fml.client.config.IConfigElement;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.registry.ForgeRegistries;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.registries.IForgeRegistryEntry;


Expand Down Expand Up @@ -74,8 +76,7 @@ static void postinit()
configBiome = config.get(LonelyBiome.MOD_ID, "biome", "minecraft:plains",
"The registry name of the biome to generate the world with. [Example: minecraft:plains]" + Configuration.NEW_LINE +
"If left blank, LonelyBiome will be disabled.")
.setLanguageKey(LonelyBiome.MOD_ID.concat(".config.biome"))
.setConfigEntryClass(LBBiomeEntry.class);
.setLanguageKey(LonelyBiome.MOD_ID.concat(".config.biome"));

configEnsureStrongholds = config.get(LonelyBiome.MOD_ID, "ensureStrongholds", true,
"If this is set to true, then stronghold generation will be ensured for the single-biome world.")
Expand All @@ -89,8 +90,12 @@ static void postinit()
"Biomes of these types will be blacklisted from selection." + Configuration.NEW_LINE +
"By default, vanilla biomes of the fallowing types are blacklisted as they do not properly generate as" + Configuration.NEW_LINE +
"normal biomes in the Overworld by themselves, or at all: BEACH, RIVER, NETHER, END, VOID")
.setLanguageKey(LonelyBiome.MOD_ID.concat(".config.biomeTypeBlacklist"))
.setConfigEntryClass(LBBiomeTypeEntry.class);
.setLanguageKey(LonelyBiome.MOD_ID.concat(".config.biomeTypeBlacklist"));

if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT) {
configBiome.setConfigEntryClass(LBBiomeEntry.class);
configBiomeTypeBlacklist.setConfigEntryClass(LBBiomeTypeEntry.class);
}

sync();
}
Expand Down

0 comments on commit ba0877e

Please sign in to comment.