diff options
| author | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-15 16:52:41 +0200 |
|---|---|---|
| committer | OnyxDarkKnight <sor1n.iliutza16@gmail.com> | 2013-12-15 16:52:41 +0200 |
| commit | 06415dc21d71e8ac363dae5c56c5317971f7aede (patch) | |
| tree | 7ddbe2cc709a5a39c3fe8b8a80d7ac77f336a220 /common/darkknight/jewelrycraft/worldGen/Generation.java | |
| parent | 9342967bd8a6a9451591325c7c5deb5416819adc (diff) | |
| parent | 943f1a493b27c630e95730b385e6524643d98564 (diff) | |
Merge branch 'master' of https://github.com/sor1n/Modjam-Mod
As well as added the smelter and working on the molder
Diffstat (limited to 'common/darkknight/jewelrycraft/worldGen/Generation.java')
| -rw-r--r-- | common/darkknight/jewelrycraft/worldGen/Generation.java | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/common/darkknight/jewelrycraft/worldGen/Generation.java b/common/darkknight/jewelrycraft/worldGen/Generation.java new file mode 100644 index 0000000..341b91e --- /dev/null +++ b/common/darkknight/jewelrycraft/worldGen/Generation.java @@ -0,0 +1,45 @@ +package darkknight.jewelrycraft.worldGen; + +import java.util.Random; + + +import net.minecraft.world.World; +import net.minecraft.world.chunk.IChunkProvider; +import net.minecraft.world.gen.feature.WorldGenMinable; +import cpw.mods.fml.common.IWorldGenerator; +import darkknight.jewelrycraft.block.BlockList; + +public class Generation implements IWorldGenerator +{ + + @Override + public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) + { + switch(world.provider.dimensionId){ + case -1: + generateNether(world, random, chunkX * 16, chunkZ * 16); + break; + case 0: + generateSurface(world, random, chunkX * 16, chunkZ * 16); + break; + case 1: + generateEnd(world, random, chunkX * 16, chunkZ * 16); + break; + } + } + + private void generateEnd(World world, Random random, int i, int j) {} + + private void generateSurface(World world, Random random, int i, int j) + { + for(int k = 0; k < 1; k++) { + int x = i + random.nextInt(16); + int y = random.nextInt(5); + int z = j + random.nextInt(16); + (new WorldGenMinable(BlockList.shadowOre.blockID, 1)).generate(world, random, x, y, z); + } + } + + private void generateNether(World world, Random random, int i, int j) {} + +} |
