Resources now only install client-side, added the workaround for the level-type BIOMESOP being broken in SMP
This commit is contained in:
parent
bd18ea4a78
commit
872b13a632
2 changed files with 41 additions and 24 deletions
|
@ -6,6 +6,9 @@ import static net.minecraftforge.common.Configuration.CATEGORY_GENERAL;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import tdwp_ftw.biomesop.ClientProxy;
|
||||||
|
import tdwp_ftw.biomesop.mod_BiomesOPlenty;
|
||||||
|
|
||||||
import net.minecraftforge.common.Configuration;
|
import net.minecraftforge.common.Configuration;
|
||||||
import cpw.mods.fml.common.FMLLog;
|
import cpw.mods.fml.common.FMLLog;
|
||||||
|
|
||||||
|
@ -415,6 +418,8 @@ public class BOPConfiguration {
|
||||||
|
|
||||||
public static void init(File configFile)
|
public static void init(File configFile)
|
||||||
{
|
{
|
||||||
|
boolean isClient = mod_BiomesOPlenty.proxy instanceof ClientProxy;
|
||||||
|
|
||||||
config = new Configuration(configFile);
|
config = new Configuration(configFile);
|
||||||
|
|
||||||
try
|
try
|
||||||
|
@ -424,10 +429,18 @@ public class BOPConfiguration {
|
||||||
skyColors = true;
|
skyColors = true;
|
||||||
biomeSize = config.get("Biome Settings", "Biome Size", 4, null).getInt();
|
biomeSize = config.get("Biome Settings", "Biome Size", 4, null).getInt();
|
||||||
achievements = config.get("Achievement Settings", "Add Biomes O Plenty Achievemnets (Currently Broken)", false).getBoolean(false);
|
achievements = config.get("Achievement Settings", "Add Biomes O Plenty Achievemnets (Currently Broken)", false).getBoolean(false);
|
||||||
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", false).getBoolean(false);
|
|
||||||
vanillaEnhanced = config.get("Biome Settings", "Enhanced Vanilla Biomes", true).getBoolean(false);
|
vanillaEnhanced = config.get("Biome Settings", "Enhanced Vanilla Biomes", true).getBoolean(false);
|
||||||
promisedLandDimID = config.get("Dimension Settings", "Promised Land Dimension ID", 20, null).getInt();
|
promisedLandDimID = config.get("Dimension Settings", "Promised Land Dimension ID", 20, null).getInt();
|
||||||
|
|
||||||
|
if (!isClient)
|
||||||
|
{
|
||||||
|
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", true).getBoolean(true);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", false).getBoolean(false);
|
||||||
|
}
|
||||||
|
|
||||||
alpsGen = config.get("Biomes To Generate", "Alps", true).getBoolean(false);
|
alpsGen = config.get("Biomes To Generate", "Alps", true).getBoolean(false);
|
||||||
arcticGen = config.get("Biomes To Generate", "Arctic", true).getBoolean(false);
|
arcticGen = config.get("Biomes To Generate", "Arctic", true).getBoolean(false);
|
||||||
badlandsGen = config.get("Biomes To Generate", "Badlands", true).getBoolean(false);
|
badlandsGen = config.get("Biomes To Generate", "Badlands", true).getBoolean(false);
|
||||||
|
|
|
@ -74,9 +74,12 @@ public class mod_BiomesOPlenty
|
||||||
@PreInit
|
@PreInit
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
public void preInit(FMLPreInitializationEvent event)
|
||||||
{
|
{
|
||||||
|
boolean isClient = proxy instanceof ClientProxy;
|
||||||
|
|
||||||
String[] soundFiles = { "bopdisc.ogg", "bopdiscmud.ogg"};
|
String[] soundFiles = { "bopdisc.ogg", "bopdiscmud.ogg"};
|
||||||
|
|
||||||
|
if (isClient)
|
||||||
|
{
|
||||||
for (String soundFile : soundFiles) try
|
for (String soundFile : soundFiles) try
|
||||||
{
|
{
|
||||||
File file = new File("resources/mod/streaming/" + soundFile);
|
File file = new File("resources/mod/streaming/" + soundFile);
|
||||||
|
@ -103,6 +106,7 @@ public class mod_BiomesOPlenty
|
||||||
FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, "[BoP] Failed to load sound file: " + soundFile);
|
FMLCommonHandler.instance().getFMLLogger().log(Level.WARNING, "[BoP] Failed to load sound file: " + soundFile);
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BOPConfiguration.init(event.getSuggestedConfigurationFile());
|
BOPConfiguration.init(event.getSuggestedConfigurationFile());
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue