Make config options consistently static

This commit is contained in:
mezz committed 2015-01-13 23:55:30 -08:00
1 parent 8ccb8f4d75
commit f645076eeb
11 files changed
+75 -78

No files matched your search

@@ -5,6 +5,8 @@ import java.util.Random;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.Mod;
import magicbees.main.Config;
import magicbees.main.MagicBees;
import magicbees.main.utils.ChunkCoords;
import magicbees.world.feature.FeatureHive;
@@ -32,7 +34,7 @@ public class WorldGeneratorHandler implements IWorldGenerator
public void chunkSaveEventHandler(ChunkDataEvent.Save event)
{
NBTTagCompound tag = new NBTTagCompound();
if (MagicBees.getConfig().DoHiveRetrogen)
if (Config.DoHiveRetrogen)
{
tag.setBoolean("hiveRetrogen", true);
}
@@ -50,9 +52,9 @@ public class WorldGeneratorHandler implements IWorldGenerator
{
doRetrogen = true;
}
else if (MagicBees.getConfig().DoHiveRetrogen)
else if (Config.DoHiveRetrogen)
{
if (!tag.hasKey("hiveRetrogen") || MagicBees.getConfig().ForceHiveRegen)
if (!tag.hasKey("hiveRetrogen") || Config.ForceHiveRegen)
{
doRetrogen = true;
}
@@ -77,7 +79,7 @@ public class WorldGeneratorHandler implements IWorldGenerator
if (world.provider.terrainType != WorldType.FLAT)
{
if (initialGen || MagicBees.getConfig().DoHiveRetrogen)
if (initialGen || Config.DoHiveRetrogen)
{
FeatureHive.generateHives(world, random, chunkX, chunkZ, initialGen);
modified = true;
@@ -18,7 +18,7 @@ public class FeatureHive
private static FeatureOreVein glowstoneGen;
private static FeatureOreVein endStoneGen;
private static boolean logSpawns = MagicBees.getConfig().LogHiveSpawns;
private static boolean logSpawns = Config.LogHiveSpawns;
public static void initialize()
{
@@ -161,7 +161,7 @@ public class FeatureHive
netherQuartzGen.generateVein(world, random, coordX, coordY, coordZ - 1, 4);
}
}
else if (MagicBees.getConfig().DoSpecialHiveGen && world.rand.nextInt() < 11)
else if (Config.DoSpecialHiveGen && world.rand.nextInt() < 11)
{
int coordY = random.nextInt(13) + 5;
@@ -230,7 +230,7 @@ public class FeatureHive
}
}
}
else if (MagicBees.getConfig().DoSpecialHiveGen && world.rand.nextInt() < 8)
else if (Config.DoSpecialHiveGen && world.rand.nextInt() < 8)
{
// 1 per gen
int coordY = random.nextInt(5) + 5;