The IterableAnnotation can be applied to a class to allow ZS Iterating over it.
There are three kinds of IterableAnnotations:


CraftTweaker’s IOreDict

public interface IOreDict extends Iterable<IOreDictEntry> {

    IOreDictEntry get(String name);

    List<IOreDictEntry> getEntries();

    boolean contains(String name);

MCOreDict (implementation)

    public Iterator<IOreDictEntry> iterator() {
        return Arrays.asList(OreDictionary.getOreNames())


How would that be useable in ZS?

for oreDictEntry in oreDict {

What Classes can be annotated || Additional Info

You can annotate all classes that implement the required interface.
You need to provide a String value that refers to the Iterated ZenScript’s class name.