Jump to content

NonExistent

Members
  • Posts

    1
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

NonExistent's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  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.