IIngredientWithAmount
Link to iingredientwithamount
Consists of an ingredient and an amount.
导入类
Link to 导入类
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 Copyimport crafttweaker.api.ingredient.IIngredientWithAmount;
已实现的接口
Link to 已实现的接口
IIngredientWithAmount implements the following interfaces. That means all methods defined in these interfaces are also available in IIngredientWithAmount
Casters
Link to casters
Result Type | 是否隐藏 |
---|---|
Result Type IData #数据 | 是否隐藏 true |
使用方式
Link to 使用方式
Name: asIData
Return Type: IData
ZenScript Copy// IIngredientWithAmount.asIData() as IData
myIIngredientWithAmount.asIData();
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 |