IWeightedIngredient
Link to iweightedingredient
An IWeightedIngredient is an ingredient with a percentage. It is the subclass of WeightedItemStack, WeightedLiquidStack and WeightedOreDictEntry.
导入相关包
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.
import crafttweaker.item.IWeightedIngredient;
ZenGetters
Link to zengetters
ZenGetter | 功能 | 返回值类型 |
---|---|---|
ZenGetter ingredient | 功能 Returns the associated IIngredient | 返回值类型 材料(IIngredient) |
ZenGetter chance | 功能 Returns the stack's chance as decimal (e.g. 0.2) | 返回值类型 float |
ZenGetter percent | 功能 Returns the stack's chance as percentage (e.g. 20.0) | 返回值类型 float |