Posted May 9, 201411 yr 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!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.