Class ExpandDataComponentType

java.lang.Object
com.blamejared.crafttweaker.natives.component.ExpandDataComponentType

@ZenRegister public class ExpandDataComponentType extends Object
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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    getCommandString(net.minecraft.core.component.DataComponentType internal)
    Gets the command string representation of the data component type.
    static net.minecraft.resources.ResourceLocation
    getRegistryName(net.minecraft.core.component.DataComponentType internal)
    Gets the registry name of the data component type.
    static boolean
    isTransient(net.minecraft.core.component.DataComponentType internal)
    Checks if the data component type is transient, meaning it is not saved.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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

      public static String getCommandString(net.minecraft.core.component.DataComponentType internal)
      Gets the command string representation of the data component type.
      Returns:
      The command string representation of the data component type.