Esempio n. 1
0
  @Override
  public List<IOreDictEntry> getOres() {
    List<IOreDictEntry> result = new ArrayList<>();

    for (String key : OreDictionary.getOreNames()) {
      for (ItemStack is : OreDictionary.getOres(key)) {
        if (is.getItem() == stack.getItem()
            && (is.getItemDamage() == OreDictionary.WILDCARD_VALUE
                || is.getItemDamage() == stack.getItemDamage())) {
          result.add(MineTweakerAPI.oreDict.get(key));
          break;
        }
      }
    }

    return result;
  }
Esempio n. 2
0
 @Override
 public boolean contains(IIngredient ingredient) {
   List<IItemStack> iitems = ingredient.getItems();
   return !(iitems == null || iitems.size() != 1) && matches(iitems.get(0));
 }