IIngredient
Link to iingredient
This is IIngredient!!!
This class was added by a mod with mod-id crafttweaker
. So you need to have this mod installed if you want to use this feature.
Importing the class
Link to importing-the-class
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.
ZenScript Copycrafttweaker.api.item.IIngredient
Implemented Interfaces
Link to implemented-interfaces
IIngredientのimplementsでは、以下のようなインターフェースで実装されています。 That means any method available to them can also be used on this class.
Methods
Link to methods
getRemainingItem
Link to getremainingitem
この材料スタックでクラフトが行われると、グリッド上になにが残るか? ただし、スタックが一致するかどうかのチェックは行いません! Craft Tweakerでの使用例,
Returns crafttweaker.api.item.IItemStack
ZenScript Copy<tag:ingotIron>.getRemainingItem(stack as crafttweaker.api.item.IItemStack);
<tag:ingotIron>.getRemainingItem(<item:minecraft:iron_ingot>);
Parameter | Type | Description |
---|---|---|
Parameter stack | Type crafttweaker.api.item.IItemStack | Description The stack to provide for this ingredient. |
matches
Link to matches
Does the given stack match the ingredient?
Returns boolean
ZenScript Copy<tag:ingotIron>.matches(stack as crafttweaker.api.item.IItemStack);
<tag:ingotIron>.matches(<item:minecraft:iron_ingot>);
Parameter | Type | Description |
---|---|---|
Parameter stack | Type crafttweaker.api.item.IItemStack | Description The stack to check |
Properties
Link to properties
名称 | Type | Has Getter | Has Setter |
---|---|---|---|
名称 commandString | Type 文字列型 | Has Getter true | Has Setter false |
名称 items | Type crafttweaker.api.item.IItemStack[] | Has Getter true | Has Setter false |
Casters
Link to casters
Result type | Is Implicit |
---|---|
Result type crafttweaker.api.data.IData | Is Implicit true |
Result type crafttweaker.api.data.MapData | Is Implicit true |