Class ExpandCustomData

java.lang.Object
com.blamejared.crafttweaker.natives.item.component.ExpandCustomData

@ZenRegister public class ExpandCustomData extends Object
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    contains(net.minecraft.world.item.component.CustomData internal, String key)
    Checks if the CustomData contains the given key.
    static net.minecraft.nbt.CompoundTag
    copyTag(net.minecraft.world.item.component.CustomData internal)
    Gets the copy of the tag of the CustomData.
    static boolean
    isEmpty(net.minecraft.world.item.component.CustomData internal)
    Checks if the CustomData is empty.
    static boolean
    matchedBy(net.minecraft.world.item.component.CustomData internal, MapData tag)
    Checks if the CustomData matches the given tag.
    static net.minecraft.world.item.component.CustomData
    of(MapData tag)
    Creates a new CustomData with the given data.
    static int
    size(net.minecraft.world.item.component.CustomData internal)
    Gets the size of the CustomData.
    static net.minecraft.world.item.component.CustomData
    update(net.minecraft.world.item.component.CustomData internal, Consumer<MapData> updater)
    Updates the CustomData with the given updater.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandCustomData

      public ExpandCustomData()
  • Method Details

    • of

      public static net.minecraft.world.item.component.CustomData of(MapData tag)
      Creates a new CustomData with the given data.
      Parameters:
      tag - The data to create the CustomData from.
      Returns:
      The new CustomData.
    • copyTag

      public static net.minecraft.nbt.CompoundTag copyTag(net.minecraft.world.item.component.CustomData internal)
      Gets the copy of the tag of the CustomData.
      Parameters:
      internal - The CustomData.
      Returns:
      The copy of the tag of the CustomData.
    • contains

      public static boolean contains(net.minecraft.world.item.component.CustomData internal, String key)
      Checks if the CustomData contains the given key.
      Parameters:
      key - The key to check for.
      Returns:
      Whether the CustomData contains the given key.
    • size

      public static int size(net.minecraft.world.item.component.CustomData internal)
      Gets the size of the CustomData.
      Returns:
      The size of the CustomData.
    • matchedBy

      public static boolean matchedBy(net.minecraft.world.item.component.CustomData internal, MapData tag)
      Checks if the CustomData matches the given tag.
      Parameters:
      tag - The tag to check for.
      Returns:
      Whether the CustomData matches the given tag.
    • update

      public static net.minecraft.world.item.component.CustomData update(net.minecraft.world.item.component.CustomData internal, Consumer<MapData> updater)
      Updates the CustomData with the given updater.
      Parameters:
      updater - The updater to update the CustomData with.
      Returns:
      The updated CustomData.
    • isEmpty

      public static boolean isEmpty(net.minecraft.world.item.component.CustomData internal)
      Checks if the CustomData is empty.
      Returns:
      Whether the CustomData is empty.