Jump to content

NonExistent

Members
  • Posts

    1
  • Joined

  • Last visited

Everything posted by NonExistent

  1. 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!
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.