ItemApplicationRecipe
Link to itemapplicationrecipe
导入类
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 mods.createtweaker.ItemApplicationRecipe;
Extending ProcessingRecipe
Link to extending-processingrecipe
ItemApplicationRecipe extends ProcessingRecipe. That means all methods available in ProcessingRecipe are also available in ItemApplicationRecipe
使用方式
Link to 使用方式
Name: getProcessedItem
Gets the processed Item.
Returns: The processed Item.
Return Type: IIngredient
ZenScript Copy// ItemApplicationRecipe.getProcessedItem() as IIngredient
myItemApplicationRecipe.getProcessedItem();
Name: getRequiredHeldItem
Gets the required held item.
Returns: The required held item.
Return Type: IIngredient
ZenScript Copy// ItemApplicationRecipe.getRequiredHeldItem() as IIngredient
myItemApplicationRecipe.getRequiredHeldItem();
Name: shouldKeepHeldItem
Should the recipe keep the held item?
Returns: True if the recipe keeps the held item. False otherwise.
Return Type: boolean
ZenScript Copy// ItemApplicationRecipe.shouldKeepHeldItem() as boolean
myItemApplicationRecipe.shouldKeepHeldItem();
名称 | 类型 | 可获得 | 可设置 | 描述 |
---|---|---|---|---|
名称 processedItem | 类型 材料(IIngredient) | 可获得 true | 可设置 false | 描述 Gets the processed Item. |
名称 requiredHeldItem | 类型 材料(IIngredient) | 可获得 true | 可设置 false | 描述 Gets the required held item. |
名称 shouldKeepHeldItem | 类型 布尔值 | 可获得 true | 可设置 false | 描述 Should the recipe keep the held item? |