package com.test;
import java.util.List;
import java.util.Random;
import com.mojang.realmsclient.dto.Ops;
import cpw.mods.fml.common.IWorldGenerator;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStone;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.structure.StructureMineshaftPieces.Room;
public class YashmaGenerator implements IWorldGenerator{
@Override
public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
generateOverworld(rand, chunkX, chunkZ, world);
generateNether(rand, chunkX, chunkZ, world);
generateEnd(rand, chunkX, chunkZ, world);
}
private void generateOverworld(Random rand, int chunkX, int chunkZ, World world) {
generateOverworld(world, rand, chunkX * 16, chunkZ * 16);
}
private void generateNether(Random rand, int chunkX, int chunkZ, World world) {
generateNether(world, rand, chunkX * 16, chunkZ * 16);
}
private void generateEnd(Random rand, int chunkX, int chunkZ, World world) {
generateEnd(world, rand, chunkX * 16, chunkZ * 16);
}
public void generateOverworld(World world, Random rand, int blockXPos, int blockZPos) {
addOreSpawn(testMain.Yashma, Blocks.stone, world, rand, blockXPos, blockZPos,6,5,3,7,1,3,50,5,30);
}
private void addOreSpawn(Block blockFromItem, Block stone, World world, Random rand, int blockXPos, int blockZPos,
int max6, int max5, int min3, int max7, int min1, int max3, int chancesToSpawn50, int min5, int max30) {
}
public void generateNether(World world, Random rand, int blockXPos, int blockZPos) {
}
public void generateEnd(World world, Random rand, int blockXPos, int blockZPos) {
}
public static void addOreSpawn(Yashma block, Block stone, World world, Random rand, int blockXPos, int blockZPos, int max6, int max5, int min3, int max7, int min1, int max3, int chancesToSpawn50, int min5, int max30) {
if (rand.nextInt(101) < (100 - chancesToSpawn50)) return;
int veins = rand.nextInt(max3 - min1 + 1) + min1;
for (int i = 0; i < veins; i++) {
int posX = blockXPos + rand.nextInt(max7);
int posY = min5 + rand.nextInt(max30 - min5);
int posZ = blockZPos + rand.nextInt(max7);
(new WorldGenMinable(block, min3 + rand.nextInt(max7 - min3 + 1), stone)).generate(world, rand, posX, posY, posZ);
}
}
}