Home Commands Examples Getting Started With Scripts Global Keywords 1.21 Migration Guide
BracketDumpers BracketHandlers BracketValidators ResourceLocationBracketHandler

ExpandItemTag

Expands

This class expands crafttweaker.api.tag.type.KnownTag<crafttweaker.api.item.ItemDefinition>, meaning that the content found on this page can be called on that type directly.

Description

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.

Members

add(items as List<IItemStack>)
script.zs
myInstance.add(myList);

Parameters:

items Type: List<IItemStack>
asIData() as IData
script.zs
myInstance.asIData();

Return Type: IData

implicit as IData
script.zs
myInstance as IData

Return Type: IData

asIIngredient() as IIngredient
script.zs
myInstance.asIIngredient();

Return Type: IIngredient

implicit as IIngredient
script.zs
myInstance as IIngredient

Return Type: IIngredient

asIIngredientWithAmount() as IIngredientWithAmount
script.zs
myInstance.asIIngredientWithAmount();

Return Type: IIngredientWithAmount

implicit as IIngredientWithAmount
script.zs
myInstance as IIngredientWithAmount

Return Type: IIngredientWithAmount