I want to get a list of ores, but I couldn't find an easy way, so...
ores = new ArrayList<Block>();
String[] oreNames = OreDictionary.getOreNames();
for (String oreName : oreNames) {
if (oreName.startsWith("ore")) {
ItemStack ore = OreDictionary.getOres(OreDictionary.getOreID(oreName)).get(0);
Block oreBlock = Block.getBlockFromItem(ore.getItem());
if (oreBlock != Blocks.air && oreBlock.renderAsNormalBlock()) {
ores.add(oreBlock);
}
}
}
Is this code abusing OreDict? And should I bother checking if it's a solid block?
Thanks!