More Oil gen rebalancing
Reduced the chances of spawning wells.
This commit is contained in:
parent
3dbe71ea36
commit
bbc5881fd0
2 changed files with 30 additions and 26 deletions
|
@ -55,16 +55,17 @@ import buildcraft.energy.worldgen.BiomeInitializer;
|
|||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.Instance;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.Mod.PreInit;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
import cpw.mods.fml.common.registry.LanguageRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.common.BiomeDictionary;
|
||||
|
||||
@Mod(name = "BuildCraft Energy", version = Version.VERSION, useMetadata = false, modid = "BuildCraft|Energy", dependencies = DefaultProps.DEPENDENCY_CORE)
|
||||
@NetworkMod(channels = {DefaultProps.NET_CHANNEL_NAME}, packetHandler = PacketHandler.class, clientSideRequired = true, serverSideRequired = true)
|
||||
|
@ -91,26 +92,8 @@ public class BuildCraftEnergy {
|
|||
@Instance("BuildCraft|Energy")
|
||||
public static BuildCraftEnergy instance;
|
||||
|
||||
@Init
|
||||
public static void load(FMLInitializationEvent evt) {
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
|
||||
|
||||
if (BuildCraftCore.modifyWorld) {
|
||||
MinecraftForge.EVENT_BUS.register(OilPopulate.INSTANCE);
|
||||
MinecraftForge.TERRAIN_GEN_BUS.register(new BiomeInitializer());
|
||||
}
|
||||
|
||||
new BptBlockEngine(engineBlock.blockID);
|
||||
|
||||
if (BuildCraftCore.loadDefaultRecipes) {
|
||||
loadRecipes();
|
||||
}
|
||||
EnergyProxy.proxy.registerBlockRenderers();
|
||||
EnergyProxy.proxy.registerTileEntities();
|
||||
}
|
||||
|
||||
@PreInit
|
||||
public void initialize(FMLPreInitializationEvent evt) {
|
||||
public void preInit(FMLPreInitializationEvent evt) {
|
||||
Property engineId = BuildCraftCore.mainConfiguration.getBlock("engine.id", DefaultProps.ENGINE_ID);
|
||||
Property oilStillId = BuildCraftCore.mainConfiguration.getBlock("oilStill.id", DefaultProps.OIL_STILL_ID);
|
||||
Property oilMovingId = BuildCraftCore.mainConfiguration.getBlock("oilMoving.id", DefaultProps.OIL_MOVING_ID);
|
||||
|
@ -202,6 +185,27 @@ public class BuildCraftEnergy {
|
|||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Init
|
||||
public void init(FMLInitializationEvent evt) {
|
||||
NetworkRegistry.instance().registerGuiHandler(instance, new GuiHandler());
|
||||
|
||||
new BptBlockEngine(engineBlock.blockID);
|
||||
|
||||
if (BuildCraftCore.loadDefaultRecipes) {
|
||||
loadRecipes();
|
||||
}
|
||||
EnergyProxy.proxy.registerBlockRenderers();
|
||||
EnergyProxy.proxy.registerTileEntities();
|
||||
}
|
||||
|
||||
@PostInit
|
||||
public void postInit(FMLPostInitializationEvent evt) {
|
||||
if (BuildCraftCore.modifyWorld) {
|
||||
MinecraftForge.EVENT_BUS.register(OilPopulate.INSTANCE);
|
||||
MinecraftForge.TERRAIN_GEN_BUS.register(new BiomeInitializer());
|
||||
}
|
||||
}
|
||||
|
||||
@ForgeSubscribe
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void textureHook(TextureStitchEvent.Post event) {
|
||||
|
|
|
@ -79,19 +79,19 @@ public class OilPopulate {
|
|||
|
||||
boolean oilBiome = surfaceDepositBiomes.contains(biome.biomeID)
|
||||
|| BiomeDictionary.isBiomeOfType(biome, DESERT)
|
||||
|| BiomeDictionary.isBiomeOfType(biome, WASTELAND)
|
||||
|| (BiomeDictionary.isBiomeOfType(biome, WASTELAND) && !BiomeDictionary.isBiomeOfType(biome, FROZEN))
|
||||
|| (BiomeDictionary.isBiomeOfType(biome, FOREST) && BiomeDictionary.isBiomeOfType(biome, FROZEN));
|
||||
|
||||
double bonus = oilBiome ? 4.0 : 1.0;
|
||||
if (excessiveBiomes.contains(biome.biomeID)) {
|
||||
bonus *= 30;
|
||||
bonus *= 35;
|
||||
} else if (BuildCraftCore.debugMode) {
|
||||
bonus *= 20;
|
||||
}
|
||||
GenType type = GenType.NONE;
|
||||
if (rand.nextDouble() <= 0.001 * bonus) {// 0.1%
|
||||
if (rand.nextDouble() <= 0.0004 * bonus) {// 0.04%
|
||||
type = GenType.LARGE;
|
||||
} else if (rand.nextDouble() <= 0.003 * bonus) {// 0.3%
|
||||
} else if (rand.nextDouble() <= 0.001 * bonus) {// 0.1%
|
||||
type = GenType.MEDIUM;
|
||||
} else if (oilBiome && rand.nextDouble() <= 0.02 * bonus) {// 2%
|
||||
type = GenType.LAKE;
|
||||
|
|
Loading…
Reference in a new issue