CraftTweaker

CraftTweaker

151M Downloads

[Question/Request] Iterate through items in a single OreDictEntry

ElvenChaos opened this issue ยท 2 comments

commented

Issue Description:

Is it possible to loop through the entries of a single IOreDictEntry? When I was searching through the documentation, I found that I could loop through other kinds of arrays, and that I could loop through a list of all IOreDictEntries, but not anything more granular than that.

I realize I could use a nested loop to check through the list of all items in the game to see if they are in the IOreDictEntry, and then perform the wanted action, but that seems a little overkill to achieve the desired outcome.

If it is not a feature, could pulling an IItemStack[] from an IOreDictEntry become one?


Affected Versions (Do not use "latest"):

  • Minecraft:1.12.2
  • Forge: 2611
  • Crafttweaker: 4.1.3
commented
<ore:ingotIron>.items

You can iterate through them like that :)

commented

Thanks a ton :D Sorry if I missed it in the documentation somewhere.