This class was added by a mod with mod-id crafttweaker. So you need to have this mod installed if you want to use this feature.

Importing the class

Link to importing-the-class

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.

ZenScript
Copy
crafttweaker.api.tag.MCTag

Implemented Interfaces

Link to implemented-interfaces

MCTag implements the following interfaces. That means any method available to them can also be used on this class.

ZenScript
Copy
myMCTag.addBlocks(blocks as crafttweaker.api.block.MCBlock[]);
ParameterTypeDescription
Parameter
blocks
Type
crafttweaker.api.block.MCBlock[]
Description
No description provided
ZenScript
Copy
myMCTag.addEntityTypes(entities as crafttweaker.api.entity.MCEntityType[]);
ParameterTypeDescription
Parameter
entities
Type
crafttweaker.api.entity.MCEntityType[]
Description
No description provided
ZenScript
Copy
myMCTag.addItems(items as crafttweaker.api.item.IItemStack[]);
ParameterTypeDescription
Parameter
items
Type
crafttweaker.api.item.IItemStack[]
Description
No description provided

Returns crafttweaker.api.tag.MCTag

ZenScript
Copy
myMCTag.createBlockTag();

createEntityTypeTag

Link to createentitytypetag

Returns crafttweaker.api.tag.MCTag

ZenScript
Copy
myMCTag.createEntityTypeTag();

Returns crafttweaker.api.tag.MCTag

ZenScript
Copy
myMCTag.createItemTag();

getRemainingItem

Link to getremainingitem

When this ingredient stack is crafted, what will remain in the grid? Does not check if the stack matches though! Used e.g. in CrT's net.minecraft.item.crafting.ICraftingRecipe

Returns crafttweaker.api.item.IItemStack

ZenScript
Copy
myMCTag.getRemainingItem(stack as crafttweaker.api.item.IItemStack);
myMCTag.getRemainingItem(<item:minecraft:iron_ingot>);
ParameterTypeDescription
Parameter
stack
Type
crafttweaker.api.item.IItemStack
Description
The stack to provide for this ingredient.

Does the given stack match the ingredient?

Returns boolean

ZenScript
Copy
myMCTag.matches(stack as crafttweaker.api.item.IItemStack);
myMCTag.matches(<item:minecraft:iron_ingot>);
ParameterTypeDescription
Parameter
stack
Type
crafttweaker.api.item.IItemStack
Description
The stack to check
ZenScript
Copy
myMCTag.removeBlocks(blocks as crafttweaker.api.block.MCBlock[]);
ParameterTypeDescription
Parameter
blocks
Type
crafttweaker.api.block.MCBlock[]
Description
No description provided

removeEntityTypes

Link to removeentitytypes

ZenScript
Copy
myMCTag.removeEntityTypes(entities as crafttweaker.api.entity.MCEntityType[]);
ParameterTypeDescription
Parameter
entities
Type
crafttweaker.api.entity.MCEntityType[]
Description
No description provided
ZenScript
Copy
myMCTag.removeItems(items as crafttweaker.api.item.IItemStack[]);
ParameterTypeDescription
Parameter
items
Type
crafttweaker.api.item.IItemStack[]
Description
No description provided
이름TypeHas GetterHas Setter
이름
blocks
Type
crafttweaker.api.block.MCBlock[]
Has Getter
true
Has Setter
false
이름
commandString
Type
String
Has Getter
true
Has Setter
false
이름
entityTypes
Type
crafttweaker.api.entity.MCEntityType[]
Has Getter
true
Has Setter
false
이름
items
Type
crafttweaker.api.item.IItemStack[]
Has Getter
true
Has Setter
false
반환 자료형암묵적
반환 자료형
crafttweaker.api.data.IData
암묵적
true
반환 자료형
crafttweaker.api.data.MapData
암묵적
true