Class ExpandDataComponentType
java.lang.Object
com.blamejared.crafttweaker.natives.component.ExpandDataComponentType
Represents a type of data that game objects can have.
Some examples are:
<componenttype:minecraft:stack_size>
<componenttype:minecraft:durability>
<componenttype:minecraft:enchantment:minecraft:damage>
Data components can be stored on any type that implements DataComponentHolder, such as ItemStack.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetCommandString(net.minecraft.core.component.DataComponentType internal) Gets the command string representation of the data component type.static net.minecraft.resources.ResourceLocationgetRegistryName(net.minecraft.core.component.DataComponentType internal) Gets the registry name of the data component type.static booleanisTransient(net.minecraft.core.component.DataComponentType internal) Checks if the data component type is transient, meaning it is not saved.
-
Constructor Details
-
ExpandDataComponentType
public ExpandDataComponentType()
-
-
Method Details
-
isTransient
public static boolean isTransient(net.minecraft.core.component.DataComponentType internal) Checks if the data component type is transient, meaning it is not saved.- Returns:
- True if the data component type is transient, false otherwise.
-
getRegistryName
public static net.minecraft.resources.ResourceLocation getRegistryName(net.minecraft.core.component.DataComponentType internal) Gets the registry name of the data component type.- Returns:
- The registry name of the data component type.
-
getCommandString
Gets the command string representation of the data component type.- Returns:
- The command string representation of the data component type.
-