A TagType identifies the kind of items that can be stored inside a given Tag. It also hosts some additional read-only data that identifies a certain set of mnemonics that help identify a type in a more human-friendly way.

The class is situated in the net.thesilkminer.mc.boson.zen.tag package, making net.thesilkminer.mc.boson.zen.tag.TagType its fully qualified name for importing.

Creating a New Instance

Link to creating-a-new-instance

It is not possible to create a new instance of a raw tag type from CraftTweaker. It is nevertheless possible to obtain the type of a given Tag via its properties. Refer to the documentation for Tag for more information.

Boson by default already creates a certain set of tag types, which can be used in bracket handlers to obtain instances of Tags or TagIngredients. These mnemonics are written in the table that follows:

MnemonicStored Objects
Mnemonic
blocks
Stored Objects
IBlockState
Mnemonic
fluids
Stored Objects
(not currently accessible via CraftTweaker)
Mnemonic
items
Stored Objects
IItemStack

A TagType provides read-only access to a certain set of properties, as outlined in the following table:

Property NameTypeDescription
Property Name
directoryName
Type
string
Description
Name of the directory where tag JSONs are in a data-pack
Property Name
name
Type
string
Description
Mnemonic that identifies the given tag type; used in tag bracket handlers
Property Name
classType
Type
Class
Description
Type of objects stored in the tag
Property Name
converterFunction
Type
Function<NameSpacedString, any>
Description
Converts names into tag elements