[Suggestion] Add "oredicts" ZenGetter for IGame class
OrdinatorStouff opened this issue ยท 2 comments
From https://crafttweaker.readthedocs.io/en/latest/#Vanilla/Game/IGame/#game-class I suggest adding an oredict ZenGetter the to game class something like the following:
Zengetter | What does it do? | Return Type | Usage |
---|---|---|---|
oredicts | Returns all registered ore dictionaries as list | List<IOredDictEntry> | game.oredicts |
I have a use for iterating every registered oredict and right now the best way I can think of to get all is by iterating all items and appending each item's oredict to a list like so:
var allOreD as IOreDictEntry[];
for itemDef in game.items {
for oreD in itemDef.ores {
if !(oreD in allOreD) {
allOreD += oreD;
}
}
}
(untested code just an example to how I'll try to do it without something like game.oredicts)
http://crafttweaker.readthedocs.io/en/latest/#Vanilla/OreDict/#using-the-oredict-keyword
Gonna change that wiki entry though since currently IOreDict and IOreDictEntry are kinda mixed up