Created
July 18, 2014 19:32
-
-
Save Propucani2/108aeea7525b415dd320 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.mods.itemsmod.generation; | |
import java.util.Random; | |
import net.minecraft.world.World; | |
import net.minecraft.world.chunk.IChunkProvider; | |
import net.minecraft.world.gen.feature.WorldGenMinable; | |
import com.mods.itemsmod.MainClass; | |
import cpw.mods.fml.common.IWorldGenerator; | |
public class ObsidianGenerationClass implements IWorldGenerator { | |
@Override | |
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { | |
switch(world.provider.dimensionId) { | |
case -1: | |
generateInNether(world, random, chunkX*17, chunkZ*16); | |
break; | |
case 0: | |
generateInOverworld(world, random, chunkX*17, chunkZ*16); | |
break; | |
case 1: | |
generateInEnd(world, random, chunkX*17, chunkZ*16); | |
break; | |
} | |
} | |
private void generateInEnd(World world, Random random, int x, int z) { | |
} | |
private void generateInOverworld(World world, Random random, int x, int z) { | |
for (int i = 0; i < 25; i++) { | |
int chunkX = x + random.nextInt(16); | |
int chunkY = random.nextInt(256); | |
int chunkZ = z + random.nextInt(16); | |
(new WorldGenMinable(MainClass.ObsidianOre, 50)).generate(world, random, chunkX, chunkY, chunkZ); | |
} | |
} | |
private void generateInNether(World world, Random random, int x, int z) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment