Alright, I got it to stop spitting errors at me, but now I just can't get it to generate the ores I am telling it to, and I am quite sure it's probably some giant mistake I am not seeing here
package jedijoe.mods.init;
import java.util.Random;
import com.google.common.base.Predicate;
import net.minecraft.block.state.IBlockState;
import net.minecraft.block.state.pattern.BlockMatcher;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.DimensionType;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import net.minecraft.world.gen.feature.WorldGenerator;
import net.minecraftforge.fml.common.IWorldGenerator;
public class Worldgen implements IWorldGenerator {
private WorldGenerator ATOMICORE;
public Worldgen() {
}
@Override
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkGenerator chunkGenerator,
IChunkProvider chunkProvider) {
switch (world.provider.getDimension())
{
case 0:
addOreSpawn(ModBlocks.AtomicO.getDefaultState(), world, random, chunkX, chunkZ, 16, 16, 50, 30, 10, 100, BlockMatcher.forBlock(Blocks.STONE));
break;
default:
break;
}
}
private void genSurface(World world, Random random, int chunkX, int chunkZ){
addOreSpawn(ModBlocks.AtomicO.getDefaultState(), world, random, chunkX, chunkZ, 16, 16, 50, 20, 10, 100, BlockMatcher.forBlock(Blocks.STONE));
}
private void addOreSpawn(IBlockState defaultState, World world, Random random, int blockXpos, int blockZpos, int maxX, int maxZ,
int maxVeinSize, int chance, int minY, int maxY, Predicate<IBlockState> Stone) {
int diffMinMaxY = maxY - minY;
for (int x = 0; x < chance; x++) {
int posX = blockXpos + random.nextInt(maxX);
int posY = minY + random.nextInt(diffMinMaxY);
int posZ = blockZpos + random.nextInt(maxZ);
(new WorldGenMinable(defaultState, maxVeinSize, Stone)).generate(world, random, new BlockPos(posX, posY, posZ));
}
}
}