Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package O3Bubbles09.Common;
- import java.util.Random;
- import O3Bubbles09.Common.O3Bubbles09;
- import net.minecraft.world.World;
- import net.minecraft.world.chunk.IChunkProvider;
- import net.minecraft.world.gen.feature.WorldGenMinable;
- import cpw.mods.fml.common.IWorldGenerator;
- public class WorldGenO3Bubbles09 implements IWorldGenerator {
- O3Bubbles09 bubs;
- 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);
- case 0:
- generateSurface(world, random, chunkX *16, chunkZ *16);
- case -1:
- generateEnd(world, random, chunkX *16, chunkZ *16);
- }
- }
- private void generateEnd(World world, Random random, int chunkX, int chunkZ) {
- }
- private void generateSurface(World world, Random random, int chunkX, int chunkZ) {
- for(int i = 0; i < 10; i++) {
- int xCoord = chunkX + random.nextInt(16);
- int yCoord = random.nextInt(64);
- int zCoord = chunkZ + random.nextInt(16);
- if(bubs.copperOreSpawn == true) {
- (new WorldGenMinable(bubs.copperOre.blockID, 6)).generate(world, random, xCoord, yCoord, zCoord);
- }
- }
- for(int i = 0; i < 6; i++) {
- int xC = chunkX + random.nextInt(16);
- int yC = random.nextInt(16);
- int zC = chunkZ + random.nextInt(16);
- if(bubs.kunziteOreSpawn == true) {
- (new WorldGenMinable(bubs.kunziteOre.blockID, 4)).generate(world, random, xC, yC, zC);
- }
- }
- }
- private void generateNether(World world, Random random, int chunkX, int chunkZ) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment