[Suggestion] Making @ZenGetter("components") return a Array instead of ImmutableList
tekcay opened this issue ยท 1 comments
In Material.java :
@ZenGetter("components")
public ImmutableList<MaterialStack> getMaterialComponents() {
return materialInfo.componentList;
}
Applying this getter returns a ImmutableList
which is hard (impossible ?) to work with in CT.
Describe the solution you'd like
I don't know if simply doing
@ZenGetter("components")
public ArrayList<MaterialStack> getMaterialComponents() {
return materialInfo.componentList;
}
would work, but basically having an Array
would be more convenient to work with.
Context
For example, this code does not work :
import mods.gregtech.material.Material;
import mods.gregtech.material.MaterialStack;
val bla as MaterialStack[] = <material:bronze>.components;
for i in bla {
print(i.material.camelCaseName);
print(i.amount);
}
As I would expect it to print :
tin
1
copper
3