Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.brandoncow.mod.worldGen;
- import java.util.Random;
- import net.brandoncow.mod.world.EbonyWorldGenTrees;
- import net.minecraft.block.Block;
- 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 WorldGeneratorEbonyTree 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);
- case 0:
- generateSurface(world, random, chunkX*16, chunkZ*16);
- case 1:
- generateEnd(world, random, chunkX*16, chunkZ*16);
- }
- }
- private void generateNether(World world, Random random, int x, int y){
- }
- private void generateSurface(World world, Random random, int i, int j){
- for(int t =0; t < 25; t++){
- int chunkX = i + random.nextInt(16);
- int chunkY = random.nextInt(90);
- int chunkZ = j + random.nextInt(16);
- (new EbonyWorldGenTrees(false, 10, 0, 0, false)).generate(world, random, chunkX, chunkY, chunkZ);
- }
- }
- private void generateEnd(World world, Random random, int x, int y){
- }
- public void AddOreSpawn(Block block, World world, Random random, int blockXPos, int blockZPos, int maxX, int maxZ, int maxVeinSize, int chancesToSpawn, int minY, int maxY){
- for(int i = 0; i < chancesToSpawn; i++){
- int posX = blockXPos + random.nextInt(maxX);
- int posY = minY + random.nextInt(maxY - minY);
- int posZ = blockZPos + random.nextInt(maxZ);
- (new WorldGenMinable(block.blockID, maxVeinSize)).generate(world, random, posX, posY, posZ);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment