Home Getting Started With Scripts Commands Examples
BracketDumpers BracketHandlers BracketValidators

Expansion for MCTag<ItemDefinition>

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

Result typeIs Implicit
Result type
IData
Is Implicit
true
Result type
IIngredient
Is Implicit
true
Result type
IIngredientWithAmount
Is Implicit
true

Methods

Return Type: void

script.zs
MCTag.add(items as stdlib.List<IItemStack>) as void
ParameterTypeDescription
Parameter
items
Type
stdlib.List<IItemStack>
Description
No Description Provided

Return Type: IData

script.zs
// MCTag.asIData() as IData
<tag:items:forge:gems>.asIData();

Return Type: IIngredient

script.zs
// MCTag.asIIngredient() as IIngredient
<tag:items:forge:gems>.asIIngredient();

Return Type: IIngredientWithAmount

script.zs
// MCTag.asIIngredientWithAmount() as IIngredientWithAmount
<tag:items:forge:gems>.asIIngredientWithAmount();