IOreDictEntry
When the IOreDict is the lexicon, the IOreDictEntries are the lexicon’s entries.
They consist of a name (OreDictionary name) and an explanation (all matching items).
Importing the package
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
import crafttweaker.oredict.IOreDictEntry;
Retrieving such an Object.
There are multiple ways of getting an IOreDictEntry Object: If you refer to an oreDict that does not yet exist, it will be created.
- Using the IOreDict class.
- Using the ore Bracket Handler.
- Using an IItemDefinition’s
ores
getter.
ZenGetters
You can use these getters to retrieve some information on the oredict:
name | Description | Return type |
---|---|---|
name name | Description Returns the oreDict’s name | Return type string |
name empty | Description Returns if the oreDict is empty | Return type bool |
name firstItem | Description Returns the first of the oreDict’s items | Return type IItemStack |
ZenMethods
You can use these methos on an IOreDictEntry Object:
Add/Remove items
Check if an IOreDictEntry contains an item
You can check if an IOreDictEntry contains an item using either the in
or has
keywords:
Mirror an IOreDictEntry
Mirroring an IOreDictEntry means that all items in the other oreDictEntry will be replaced by the items in the oreDictEntry the method was executed on:
IIngredient implementation
IOreDictEntry extends IIngredient. This means that all methods available to IIngredient are also available to IOreDictEntries. It also means that you can put IOreDictEntries into IIngredient Arrays (such as the ones in crafting recipe methods).