IIngredientWithAmount

Link to iingredientwithamount

Consists of an ingredient and an amount.

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 at the very top of the file.

ZenScript
Copy
import crafttweaker.api.ingredient.IIngredientWithAmount;

已实现的接口

Link to 已实现的接口

IIngredientWithAmount implements the following interfaces. That means all methods defined in these interfaces are also available in IIngredientWithAmount

Result Type是否隐藏
Result Type
IData #数据
是否隐藏
true

Name: asIData

Return Type: IData

ZenScript
Copy
// IIngredientWithAmount.asIData() as IData

myIIngredientWithAmount.asIData();

Link to getCommandString

Name: getCommandString

Returns the BEP to get this thingy

Return Type: string

ZenScript
Copy
// IIngredientWithAmount.getCommandString() as string

myIIngredientWithAmount.getCommandString();
名称类型可获得可设置描述
名称
amount
类型
int
可获得
true
可设置
false
描述
Gets the amount of Items in the ItemStack
名称
commandString #命令字符串
类型
string
可获得
true
可设置
false
描述
Returns the BEP to get this thingy
名称
ingredient
类型
材料(IIngredient)
可获得
true
可设置
false
描述
The backing ingredient