Class ExpandCustomData
java.lang.Object
com.blamejared.crafttweaker.natives.item.component.ExpandCustomData
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanChecks if the CustomData contains the given key.static net.minecraft.nbt.CompoundTagcopyTag(net.minecraft.world.item.component.CustomData internal) Gets the copy of the tag of the CustomData.static booleanisEmpty(net.minecraft.world.item.component.CustomData internal) Checks if the CustomData is empty.static booleanChecks if the CustomData matches the given tag.static net.minecraft.world.item.component.CustomDataCreates a new CustomData with the given data.static intsize(net.minecraft.world.item.component.CustomData internal) Gets the size of the CustomData.static net.minecraft.world.item.component.CustomDataUpdates the CustomData with the given updater.
-
Constructor Details
-
ExpandCustomData
public ExpandCustomData()
-
-
Method Details
-
of
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
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.
-