Hooked up oil world generation again.
This commit is contained in:
parent
aaa54ac79c
commit
d1275161af
4 changed files with 18 additions and 18 deletions
|
@ -8,7 +8,6 @@
|
|||
|
||||
package buildcraft;
|
||||
|
||||
import java.util.Random;
|
||||
import java.util.TreeMap;
|
||||
|
||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||
|
@ -33,7 +32,6 @@ import buildcraft.energy.GuiHandler;
|
|||
import buildcraft.energy.ItemBucketOil;
|
||||
import buildcraft.energy.ItemEngine;
|
||||
import buildcraft.energy.OilBucketHandler;
|
||||
import buildcraft.energy.OilPopulate;
|
||||
import buildcraft.energy.TriggerEngineHeat;
|
||||
import buildcraft.energy.Engine.EnergyStage;
|
||||
|
||||
|
@ -41,7 +39,6 @@ import net.minecraft.src.Block;
|
|||
import net.minecraft.src.Item;
|
||||
import net.minecraft.src.ItemStack;
|
||||
import net.minecraft.src.Material;
|
||||
import net.minecraft.src.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.Property;
|
||||
|
@ -171,11 +168,6 @@ public class BuildCraftEnergy {
|
|||
Character.valueOf('p'), Block.pistonBase });
|
||||
}
|
||||
|
||||
public static void generateSurface(World world, Random random, int i, int j) {
|
||||
OilPopulate.doPopulate(world, i, j);
|
||||
|
||||
}
|
||||
|
||||
// public static int createPollution (World world, int i, int j, int k, int
|
||||
// saturation) {
|
||||
// int remainingSaturation = saturation;
|
||||
|
|
|
@ -45,7 +45,6 @@ public class BlockRenderingHandler implements ISimpleBlockRenderingHandler {
|
|||
|
||||
public BlockRenderingHandler() {
|
||||
initializeMarkerMatrix();
|
||||
System.out.println("BlockRenderingHandler registered");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -11,18 +11,32 @@ package buildcraft.energy;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
|
||||
import buildcraft.BuildCraftCore;
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import buildcraft.core.ProxyCore;
|
||||
|
||||
import net.minecraft.src.BiomeGenBase;
|
||||
import net.minecraft.src.Block;
|
||||
import net.minecraft.src.IChunkProvider;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
public class OilPopulate {
|
||||
public class OilPopulate implements IWorldGenerator {
|
||||
|
||||
public static Random rand = null;
|
||||
|
||||
@Override
|
||||
public void generate(Random random, int chunkX, int chunkZ, World world,
|
||||
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
|
||||
// shift to world coordinates
|
||||
chunkX = chunkX << 4;
|
||||
chunkZ = chunkZ << 4;
|
||||
|
||||
doPopulate(world, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
public static void doPopulate(World world, int x, int z) {
|
||||
if (!BuildCraftCore.modifyWorld) {
|
||||
return;
|
||||
|
|
|
@ -9,20 +9,20 @@
|
|||
|
||||
package buildcraft;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cpw.mods.fml.common.Mod;
|
||||
import cpw.mods.fml.common.Mod.Init;
|
||||
import cpw.mods.fml.common.Mod.PostInit;
|
||||
import cpw.mods.fml.common.event.FMLInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.network.NetworkMod;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import buildcraft.BuildCraftEnergy;
|
||||
import buildcraft.core.DefaultProps;
|
||||
import buildcraft.core.network.PacketHandler;
|
||||
import buildcraft.core.render.BlockRenderingHandler;
|
||||
import buildcraft.core.render.BlockRenderingHandler.EntityRenderIndex;
|
||||
import buildcraft.energy.OilPopulate;
|
||||
import buildcraft.energy.TileEngine;
|
||||
import buildcraft.energy.render.RenderEngine;
|
||||
import buildcraft.energy.render.TextureFuelFX;
|
||||
|
@ -30,7 +30,6 @@ import buildcraft.energy.render.TextureOilFX;
|
|||
import buildcraft.energy.render.TextureOilFlowFX;
|
||||
|
||||
import net.minecraft.src.ModLoader;
|
||||
import net.minecraft.src.World;
|
||||
|
||||
|
||||
@Mod(name="BuildCraft Energy", version=DefaultProps.VERSION, useMetadata = false, modid = "BC|ENERGY")
|
||||
|
@ -46,6 +45,7 @@ public class mod_BuildCraftEnergy {
|
|||
@Init
|
||||
public void init(FMLInitializationEvent event) {
|
||||
BuildCraftEnergy.load();
|
||||
GameRegistry.registerWorldGenerator(new OilPopulate());
|
||||
}
|
||||
|
||||
@PostInit
|
||||
|
@ -82,9 +82,4 @@ public class mod_BuildCraftEnergy {
|
|||
* return null; } }
|
||||
*/
|
||||
|
||||
//@Override
|
||||
public void generateSurface(World world, Random random, int i, int j) {
|
||||
BuildCraftEnergy.generateSurface(world, random, i, j);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue