use of minetweaker.api.oredict.IOreDictEntry in project CraftTweaker by CraftTweaker.
the class OreBracketHandler method getOreList.
public static List<IOreDictEntry> getOreList(String wildcardName) {
List<IOreDictEntry> result = new ArrayList<>();
Pattern wildcardPattern = Pattern.compile(wildcardName.replaceAll("\\*", ".+"));
for (IOreDictEntry someOreDict : MineTweakerAPI.oreDict.getEntries()) {
String oreDictName = someOreDict.getName();
if (wildcardPattern.matcher(oreDictName).matches()) {
result.add(getOre(oreDictName));
}
}
return result;
}
Aggregations