I Can't get my ore to generate in the nether i Have the same coding as my ruby ore generation but i cant seem to get the ore to generate in the nether:
package com.moreoresmod.main.worldgeneration;
import java.util.Random;
import com.moreoresmod.main.init.MoreOresModBlocks;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraftforge.fml.common.IWorldGenerator;
public class NetherDiamondGeneration implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
switch(world.provider.getDimensionId()){
case 1:
generateEnd(world, random, chunkX, chunkZ);
break;
case 0:
generateOverworld(world, random, chunkX, chunkZ);
break;
case -1:
generateNether(world, random, chunkX, chunkZ);
break;
}
}
public void generateEnd(World world, Random random, int x, int z){
}
public void generateOverworld(World world, Random random, int x, int z){
}
public void generateNether(World world, Random random, int x, int z){
generateOre(MoreOresModBlocks.nether_diamond, world, random, x, z, 2, 8, 50, 2, 256, Blocks.netherrack);
}
public void generateOre(Block block, World world, Random random, int chunkX, int chunkZ, int minVienSize, int maxVienSize, int chance , int minY, int maxY, Block generateIn){
int vienSize = minVienSize + random.nextInt(maxVienSize - minVienSize);
int hightRange = maxY - minY;
WorldGenMinable gen = new WorldGenMinable(block.getDefaultState(), vienSize);
for(int i = 0; i < chance; i++){
int xRand = chunkX * 16 + random.nextInt(16);
int yRand = random.nextInt(hightRange) + minY;
int zRand = chunkZ * 16 + random.nextInt(16);
gen.generate(world, random,new BlockPos(xRand, yRand, zRand));
}
}
}