Expansion for KnownTag<ItemDefinition>
Link to expansion-for-knowntagitemdefinition
This expansion specifically targets itemTags. It adds implicit casters to IIngredient and IData, so that you can use them wherever you can use IIngredient.
Only downside is that if you want to use Ingredient Transformers, you will need to call asIIngredient()
first.
Casters
Link to casters
Result Type | 是否隐藏 |
---|---|
Result Type IData #数据 | 是否隐藏 true |
Result Type 材料(IIngredient) | 是否隐藏 true |
Result Type IIngredientWithAmount | 是否隐藏 true |
使用方式
Link to 使用方式
Name: add
ZenScript CopyKnownTag.add(items as stdlib.List<IItemStack>)
参数 | 类型 |
---|---|
参数 items | 类型 stdlib.List<IItemStack> |
Name: asIIngredient
Return Type: IIngredient
ZenScript Copy// KnownTag.asIIngredient() as IIngredient
myKnownTag.asIIngredient();
Name: asIIngredientWithAmount
Return Type: IIngredientWithAmount
ZenScript Copy// KnownTag.asIIngredientWithAmount() as IIngredientWithAmount
myKnownTag.asIIngredientWithAmount();