Home Commands Examples Getting Started With Scripts Global Keywords

MCItemStackMutable

Importing the class

If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.

script.zs
import crafttweaker.api.item.MCItemStackMutable;

Implements

MCItemStackMutable implements the following interfaces:

NeoForgeItemStack,IItemStack,IIngredient,IIngredientWithAmount,DataComponentHolder,ComponentAccess<IItemStack>,CommandStringDisplayable

Undocumented Interfaces

IDataComponentHolderExtension

Operators

in(ingredient as IIngredient) as bool
Does the ingredient contain the given ingredient?
script.zs
// ((ingredient as IIngredient) in MCItemStackMutable) as bool
myIIngredient in myMCItemStackMutable

Parameters:

ingredient Type: IIngredient - The ingredient to check

Return Type: bool

==(o as Object) as bool
script.zs
// (MCItemStackMutable == (o as Object)) as bool
myMCItemStackMutable == myObject

Parameters:

o Type: Object

Return Type: bool

*(amount as int) as IIngredientWithAmount
Use this in contexts where machines accept more than one item to state that fact.
script.zs
// (MCItemStackMutable * (amount as int)) as IIngredientWithAmount
myMCItemStackMutable * myInt

Parameters:

amount Type: int

Return Type: IIngredientWithAmount

|(other as IIngredient) as IIngredientList
script.zs
// (MCItemStackMutable | (other as IIngredient)) as IIngredientList
myMCItemStackMutable | myIIngredient

Parameters:

other Type: IIngredient

Return Type: IIngredientList

%(percentage as double) as Percentaged<IItemStack>
script.zs
// (MCItemStackMutable % (percentage as double)) as Percentaged<IItemStack>
myMCItemStackMutable % myDouble

Parameters:

percentage Type: double

Return Type: Percentaged<IItemStack>

*(amount as int) as IItemStack
Sets the amount of the ItemStack
script.zs
// (MCItemStackMutable * (amount as int)) as IItemStack
myMCItemStackMutable * myInt

Parameters:

amount Type: int - new amount

Return Type: IItemStack

Members

addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as Operation, slotTypes as EquipmentSlot[])
Adds an AttributeModifier to this IIngredient.
Attributes added with this method appear on all ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to have the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withAttributeModifier
script.zs
// MCItemStackMutable.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as Operation, slotTypes as EquipmentSlot[]);
myMCItemStackMutable.addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>, "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>]);

Parameters:

attribute Type: Attribute - The Attribute of the modifier.
name Type: string - The name of the modifier.
value Type: double - The value of the modifier.
operation Type: AttributeOperation - The operation of the modifier.
slotTypes Type: EquipmentSlot[] - What slots the modifier is valid for.
addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as Operation, slotTypes as EquipmentSlot[])
Adds an AttributeModifier to this IIngredient using a specific UUID.
The UUID can be used to override an existing attribute on an ItemStack with this new modifier. You can use /ct hand attributes to get the UUID of the attributes on an ItemStack.
Attributes added with this method appear on all ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to have the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withAttributeModifier
script.zs
// MCItemStackMutable.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as Operation, slotTypes as EquipmentSlot[]);
myMCItemStackMutable.addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>, "8c1b5535-9f79-448b-87ae-52d81480aaa3", "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>]);

Parameters:

attribute Type: Attribute - The Attribute of the modifier.
uuid Type: string - The unique identifier of the modifier to replace.
name Type: string - The name of the modifier.
value Type: double - The value of the modifier.
operation Type: AttributeOperation - The operation of the modifier.
slotTypes Type: EquipmentSlot[] - What slots the modifier is valid for.
addGlobalAttributeModifier(attribute as Attribute, uuid as UUID, name as string, value as double, operation as Operation, slotTypes as EquipmentSlot[])
Adds an AttributeModifier to this IIngredient using a specific UUID.
The UUID can be used to override an existing attribute on an ItemStack with this new modifier. You can use /ct hand attributes to get the UUID of the attributes on an ItemStack.
Attributes added with this method appear on all ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to have the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withAttributeModifier
script.zs
// MCItemStackMutable.addGlobalAttributeModifier(attribute as Attribute, uuid as UUID, name as string, value as double, operation as Operation, slotTypes as EquipmentSlot[]);
myMCItemStackMutable.addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>, IItemStack.BASE_ATTACK_DAMAGE_UUID, "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>]);

Parameters:

attribute Type: Attribute - The Attribute of the modifier.
uuid Type: UUID - The unique identifier of the modifier to replace.
name Type: string - The name of the modifier.
value Type: double - The value of the modifier.
operation Type: AttributeOperation - The operation of the modifier.
slotTypes Type: EquipmentSlot[] - What slots the modifier is valid for.
addShiftTooltip(content as Component, showMessage as Component = null)
script.zs
// MCItemStackMutable.addShiftTooltip(content as Component, showMessage as Component = null);
myMCItemStackMutable.addShiftTooltip(myComponent, myComponent);

Parameters:

content Type: Component
showMessage (optional) Type: Component

Default Value: null

addTooltip(content as Component)
script.zs
// MCItemStackMutable.addTooltip(content as Component);
myMCItemStackMutable.addTooltip(myComponent);

Parameters:

content Type: Component
Getter
Gets the amount of Items in the ItemStack
script.zs
// MCItemStackMutable.amount as int
myMCItemStackMutable.amount

Return Type: int

Getter
Gets the amount of Items in the ItemStack
script.zs
// MCItemStackMutable.amount as int
myMCItemStackMutable.amount

Return Type: int

anyDamage() as IIngredient
script.zs
// MCItemStackMutable.anyDamage() as IIngredient;
myMCItemStackMutable.anyDamage();

Return Type: IIngredient

applyComponents(map as DataComponentMap) as IItemStack
script.zs
// MCItemStackMutable.applyComponents(map as DataComponentMap) as IItemStack;
myMCItemStackMutable.applyComponents(myDataComponentMap);

Parameters:

Return Type: IItemStack

applyComponents(patch as DataComponentPatch) as IItemStack
script.zs
// MCItemStackMutable.applyComponents(patch as DataComponentPatch) as IItemStack;
myMCItemStackMutable.applyComponents(myDataComponentPatch);

Parameters:

Return Type: IItemStack

applyComponentsAndValidate(patch as DataComponentPatch) as IItemStack
script.zs
// MCItemStackMutable.applyComponentsAndValidate(patch as DataComponentPatch) as IItemStack;
myMCItemStackMutable.applyComponentsAndValidate(myDataComponentPatch);

Parameters:

Return Type: IItemStack

asIData() as IData
script.zs
// MCItemStackMutable.asIData() as IData;
myMCItemStackMutable.asIData();

Return Type: IData

implicit as IData
script.zs
// MCItemStackMutable as IData
myMCItemStackMutable as IData

Return Type: IData

implicit as IData
script.zs
// MCItemStackMutable as IData
myMCItemStackMutable as IData

Return Type: IData

asIIngredientWithAmount() as IIngredientWithAmount
script.zs
// MCItemStackMutable.asIIngredientWithAmount() as IIngredientWithAmount;
myMCItemStackMutable.asIIngredientWithAmount();

Return Type: IIngredientWithAmount

asIIngredientWithAmount() as IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one.
script.zs
// MCItemStackMutable.asIIngredientWithAmount() as IIngredientWithAmount;
myMCItemStackMutable.asIIngredientWithAmount();

Return Type: IIngredientWithAmount

implicit as IIngredientWithAmount
script.zs
// MCItemStackMutable as IIngredientWithAmount
myMCItemStackMutable as IIngredientWithAmount

Return Type: IIngredientWithAmount

implicit as IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one.
script.zs
// MCItemStackMutable as IIngredientWithAmount
myMCItemStackMutable as IIngredientWithAmount

Return Type: IIngredientWithAmount

asItemLike() as ItemLike
script.zs
// MCItemStackMutable.asItemLike() as ItemLike;
myMCItemStackMutable.asItemLike();

Return Type: ItemLike

implicit as ItemLike
script.zs
// MCItemStackMutable as ItemLike
myMCItemStackMutable as ItemLike

Return Type: ItemLike

implicit as MapData
script.zs
// MCItemStackMutable as MapData
myMCItemStackMutable as MapData

Return Type: MapData

asVanillaIngredient() as Ingredient
Create a Vanilla ingredient matching this one.
script.zs
// MCItemStackMutable.asVanillaIngredient() as Ingredient;
myMCItemStackMutable.asVanillaIngredient();

Return Type: Ingredient

implicit as Ingredient
Create a Vanilla ingredient matching this one.
script.zs
// MCItemStackMutable as Ingredient
myMCItemStackMutable as Ingredient

Return Type: Ingredient

implicit as Percentaged<IItemStack>
script.zs
// MCItemStackMutable as Percentaged<IItemStack>
myMCItemStackMutable as Percentaged<IItemStack>

Return Type: Percentaged<IItemStack>

Getter
Gets the data in &lt;componenttype:minecraft:attribute_modifiers&gt;
script.zs
// MCItemStackMutable.attributeModifiers as ItemAttributeModifiers
myMCItemStackMutable.attributeModifiers

Return Type: ItemAttributeModifiers

Getter
Gets the data in &lt;componenttype:minecraft:banner_patterns&gt;
script.zs
// MCItemStackMutable.bannerPatterns as BannerPatternLayers
myMCItemStackMutable.bannerPatterns

Return Type: BannerPatternLayers

Field
script.zs
// MCItemStackMutable.BASE_ATTACK_DAMAGE_UUID as UUID
MCItemStackMutable.BASE_ATTACK_DAMAGE_UUID

Return Type: UUID

Field
script.zs
// MCItemStackMutable.BASE_ATTACK_SPEED_UUID as UUID
MCItemStackMutable.BASE_ATTACK_SPEED_UUID

Return Type: UUID

Getter
Gets the data in &lt;componenttype:minecraft:base_color&gt;
script.zs
// MCItemStackMutable.baseColor as DyeColor
myMCItemStackMutable.baseColor

Return Type: DyeColor

Getter
Gets the data in &lt;componenttype:minecraft:bees&gt;
script.zs
// MCItemStackMutable.bees as List<Occupant>
myMCItemStackMutable.bees

Return Type: List<BeehiveBlockEntityOccupant>

Getter
Gets the data in &lt;componenttype:minecraft:block_entity_data&gt;
script.zs
// MCItemStackMutable.blockEntityData as CustomData
myMCItemStackMutable.blockEntityData

Return Type: CustomData

Getter
Gets the data in &lt;componenttype:minecraft:block_state&gt;
script.zs
// MCItemStackMutable.blockState as BlockItemStateProperties
myMCItemStackMutable.blockState

Return Type: BlockItemStateProperties

Getter
Gets the data in &lt;componenttype:minecraft:bucket_entity_data&gt;
script.zs
// MCItemStackMutable.bucketEntityData as CustomData
myMCItemStackMutable.bucketEntityData

Return Type: CustomData

Getter
Gets the data in &lt;componenttype:minecraft:bundle_contents&gt;
script.zs
// MCItemStackMutable.bundleContents as BundleContents
myMCItemStackMutable.bundleContents

Return Type: BundleContents

Getter
script.zs
// MCItemStackMutable.burnTime as int
myMCItemStackMutable.burnTime

Return Type: int

Setter
Sets the burn time of this ingredient, for use in the furnace and other machines
script.zs
// MCItemStackMutable.burnTime = (time as int);
myMCItemStackMutable.burnTime = myInt;

Parameters:

time Type: int - the new burn time
burnTime(time as int)
Sets the burn time of this ingredient, for use in the furnace and other machines
script.zs
// MCItemStackMutable.burnTime(time as int);
myMCItemStackMutable.burnTime(500);

Parameters:

time Type: int - the new burn time
Getter
Gets the data in &lt;componenttype:minecraft:can_break&gt;
script.zs
// MCItemStackMutable.canBreak as AdventureModePredicate
myMCItemStackMutable.canBreak

Return Type: AdventureModePredicate

Getter
Gets the data in &lt;componenttype:minecraft:can_place_on&gt;
script.zs
// MCItemStackMutable.canPlaceOn as AdventureModePredicate
myMCItemStackMutable.canPlaceOn

Return Type: AdventureModePredicate

Getter
Gets the data in &lt;componenttype:minecraft:charged_projectiles&gt;
script.zs
// MCItemStackMutable.chargedProjectiles as ChargedProjectiles
myMCItemStackMutable.chargedProjectiles

Return Type: ChargedProjectiles

clearTooltip(leaveName as bool = false)
script.zs
// MCItemStackMutable.clearTooltip(leaveName as bool = false);
myMCItemStackMutable.clearTooltip(myBool);

Parameters:

leaveName (optional) Type: bool

Default Value: false

Getter
Returns the BEP to get this stack
script.zs
// MCItemStackMutable.commandString as string
myMCItemStackMutable.commandString

Return Type: string

Getter
Returns the BEP to get this thingy
script.zs
// MCItemStackMutable.commandString as string
myMCItemStackMutable.commandString

Return Type: string

commandString() as string
Returns the BEP to get this thingy
script.zs
// MCItemStackMutable.commandString() as string;
myMCItemStackMutable.commandString();

Return Type: string

Getter
script.zs
// MCItemStackMutable.componentsPatch as DataComponentPatch
myMCItemStackMutable.componentsPatch

Return Type: DataComponentPatch

condition(condition as IIngredientCondition) as IIngredient
Use this if you already have the condition from another ingredient
script.zs
// MCItemStackMutable.condition(condition as IIngredientCondition) as IIngredient;
myMCItemStackMutable.condition(myIIngredientCondition);

Parameters:

Return Type: IIngredient

Getter
Gets the data in &lt;componenttype:minecraft:container&gt;
script.zs
// MCItemStackMutable.container as ItemContainerContents
myMCItemStackMutable.container

Return Type: ItemContainerContents

Getter
Gets the data in &lt;componenttype:minecraft:container_loot&gt;
script.zs
// MCItemStackMutable.containerLoot as SeededContainerLoot
myMCItemStackMutable.containerLoot

Return Type: SeededContainerLoot

contains(ingredient as IIngredient) as bool
Does the ingredient contain the given ingredient?
script.zs
// MCItemStackMutable.contains(ingredient as IIngredient) as bool;
myMCItemStackMutable.contains((<item:minecraft:iron_ingot> | <item:minecraft:gold_ingot>));

Parameters:

ingredient Type: IIngredient - The ingredient to check

Return Type: bool

Field
script.zs
// MCItemStackMutable.CRAFTTWEAKER_DATA_KEY as string
MCItemStackMutable.CRAFTTWEAKER_DATA_KEY

Return Type: string

Getter
Gets the data in &lt;componenttype:minecraft:creative_slot_lock&gt;
script.zs
// MCItemStackMutable.creativeSlotLock as bool
myMCItemStackMutable.creativeSlotLock

Return Type: bool

Getter
Gets the data in the &lt;componenttype:minecraft:custom_data&gt;
script.zs
// MCItemStackMutable.customData as CustomData
myMCItemStackMutable.customData

Return Type: CustomData

Getter
Gets the data in &lt;componenttype:minecraft:custom_model_data&gt;
script.zs
// MCItemStackMutable.customModelData as CustomModelData
myMCItemStackMutable.customModelData

Return Type: CustomModelData

Getter
Gets the data in the &lt;componenttype:minecraft:custom_name&gt;
A custom name is generally displayed in italics and controlled by the user.
script.zs
// MCItemStackMutable.customName as Component
myMCItemStackMutable.customName

Return Type: Component

Getter
Gets the data in the &lt;componenttype:minecraft:damage&gt;
script.zs
// MCItemStackMutable.damage as int
myMCItemStackMutable.damage

Return Type: int

Getter
Returns if the ItemStack is damageable I.E Swords and tools are damageable, sticks are not.
script.zs
// MCItemStackMutable.damageableItem as bool
myMCItemStackMutable.damageableItem

Return Type: bool

Getter
Returns if the ItemStack is damaged I.E a Swords that is no at full durability is damaged.
script.zs
// MCItemStackMutable.damaged as bool
myMCItemStackMutable.damaged

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:debug_stick_state&gt;
script.zs
// MCItemStackMutable.debugStickState as DebugStickState
myMCItemStackMutable.debugStickState

Return Type: DebugStickState

Getter
script.zs
// MCItemStackMutable.definition as Item
myMCItemStackMutable.definition

Return Type: ItemDefinition

definition() as Item
script.zs
// MCItemStackMutable.definition() as Item;
myMCItemStackMutable.definition();

Return Type: ItemDefinition

implicit as Item
script.zs
// MCItemStackMutable as Item
myMCItemStackMutable as Item

Return Type: ItemDefinition

Getter
Returns the unlocalized Name of the Item in the ItemStack
script.zs
// MCItemStackMutable.descriptionId as string
myMCItemStackMutable.descriptionId

Return Type: string

Getter
Gets the display name of the ItemStack
script.zs
// MCItemStackMutable.displayName as Component
myMCItemStackMutable.displayName

Return Type: Component

Getter
Gets the data in &lt;componenttype:minecraft:dye_color&gt;
script.zs
// MCItemStackMutable.dyedColor as DyedItemColor
myMCItemStackMutable.dyedColor

Return Type: DyedItemColor

Getter
Checks if this ingredient is empty.
script.zs
// MCItemStackMutable.empty as bool
myMCItemStackMutable.empty

Return Type: bool

empty() as bool
Checks if this ingredient is empty.

Returns: true if empty, false otherwise

script.zs
// MCItemStackMutable.empty() as bool;
myMCItemStackMutable.empty();

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:enchantment_glint_override&gt;
If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
script.zs
// MCItemStackMutable.enchantmentGlintOverride as bool
myMCItemStackMutable.enchantmentGlintOverride

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:enchantments&gt;
script.zs
// MCItemStackMutable.enchantments as ItemEnchantments
myMCItemStackMutable.enchantments

Return Type: ItemEnchantments

Getter
Gets the data in &lt;componenttype:minecraft:entity_data&gt;
script.zs
// MCItemStackMutable.entityData as CustomData
myMCItemStackMutable.entityData

Return Type: CustomData

Getter
Gets the data in &lt;componenttype:minecraft:firework_explosion&gt;
script.zs
// MCItemStackMutable.fireworkExplosion as FireworkExplosion
myMCItemStackMutable.fireworkExplosion

Return Type: FireworkExplosion

Getter
Gets the data in &lt;componenttype:minecraft:fireworks&gt;
script.zs
// MCItemStackMutable.fireworks as Fireworks
myMCItemStackMutable.fireworks

Return Type: Fireworks

Getter
Gets the data in &lt;componenttype:minecraft:food&gt;
script.zs
// MCItemStackMutable.food as FoodProperties
myMCItemStackMutable.food

Return Type: FoodProperties

getAttributes(slotType as EquipmentSlot) as List<AttributeModifier>[Attribute]
Gets the Attributes and the AttributeModifiers on this IItemStack for the given EquipmentSlot

Returns: A Map of Attribute to a List of AttributeModifier for the given EquipmentSlot.

script.zs
// MCItemStackMutable.getAttributes(slotType as EquipmentSlot) as List<AttributeModifier>[Attribute];
myMCItemStackMutable.getAttributes(<constant:minecraft:equipmentslot:chest>);

Parameters:

slotType Type: EquipmentSlot - The slot to get the Attributes for.

Return Type: List<AttributeModifier>[Attribute]

getBurnTime(manager as IRecipeManager<Recipe>) as int
script.zs
// MCItemStackMutable.getBurnTime(manager as IRecipeManager<Recipe>) as int;
myMCItemStackMutable.getBurnTime(myIRecipeManager);

Parameters:

Return Type: int

getImmutableInternal() as ItemStack
script.zs
// MCItemStackMutable.getImmutableInternal() as ItemStack;
myMCItemStackMutable.getImmutableInternal();

Return Type: ItemStack

getRemainingItem(stack as IItemStack) as IItemStack
When this ingredient stack is crafted, what will remain in the grid? Does not check if the stack matches though! Used e.g. in Crafting Table recipes.
script.zs
// MCItemStackMutable.getRemainingItem(stack as IItemStack) as IItemStack;
myMCItemStackMutable.getRemainingItem(<item:minecraft:iron_ingot>);

Parameters:

stack Type: IItemStack - The stack to provide for this ingredient.

Return Type: IItemStack

grow(amount as int = 1) as IItemStack
Grows this IItemStack's stack size by the given amount, or 1 if no amount is given.

Returns: This IItemStack if mutable, a new one with the new amount otherwise.

script.zs
// MCItemStackMutable.grow(amount as int = 1) as IItemStack;
myMCItemStackMutable.grow(2);

Parameters:

amount (optional) Type: int - The amount to grow by.

Default Value: 1

Return Type: IItemStack

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:attribute_modifiers&gt;
script.zs
// MCItemStackMutable.hasAttributeModifiers as bool
myMCItemStackMutable.hasAttributeModifiers

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:banner_patterns&gt;
script.zs
// MCItemStackMutable.hasBannerPatterns as bool
myMCItemStackMutable.hasBannerPatterns

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:base_color&gt;
Used for shield colouring.
script.zs
// MCItemStackMutable.hasBaseColor as bool
myMCItemStackMutable.hasBaseColor

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:bees&gt;
script.zs
// MCItemStackMutable.hasBees as bool
myMCItemStackMutable.hasBees

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:block_entity_data&gt;
script.zs
// MCItemStackMutable.hasBlockEntityData as bool
myMCItemStackMutable.hasBlockEntityData

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:block_state&gt;
script.zs
// MCItemStackMutable.hasBlockState as bool
myMCItemStackMutable.hasBlockState

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:bucket_entity_data&gt;
script.zs
// MCItemStackMutable.hasBucketEntityData as bool
myMCItemStackMutable.hasBucketEntityData

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:bundle_contents&gt;
script.zs
// MCItemStackMutable.hasBundleContents as bool
myMCItemStackMutable.hasBundleContents

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:can_break&gt;
script.zs
// MCItemStackMutable.hasCanBreak as bool
myMCItemStackMutable.hasCanBreak

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:can_place_on&gt;
script.zs
// MCItemStackMutable.hasCanPlaceOn as bool
myMCItemStackMutable.hasCanPlaceOn

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:charged_projectiles&gt;
This component is used for crossbows.
script.zs
// MCItemStackMutable.hasChargedProjectiles as bool
myMCItemStackMutable.hasChargedProjectiles

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:container&gt;
script.zs
// MCItemStackMutable.hasContainer as bool
myMCItemStackMutable.hasContainer

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:container_loot&gt;
script.zs
// MCItemStackMutable.hasContainerLoot as bool
myMCItemStackMutable.hasContainerLoot

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:custom_data&gt;
script.zs
// MCItemStackMutable.hasCustomData as bool
myMCItemStackMutable.hasCustomData

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:custom_model_data&gt;
script.zs
// MCItemStackMutable.hasCustomModelData as bool
myMCItemStackMutable.hasCustomModelData

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:custom_name&gt;
script.zs
// MCItemStackMutable.hasCustomName as bool
myMCItemStackMutable.hasCustomName

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:damage&gt;
script.zs
// MCItemStackMutable.hasDamage as bool
myMCItemStackMutable.hasDamage

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:debug_stick_state&gt;
script.zs
// MCItemStackMutable.hasDebugStickState as bool
myMCItemStackMutable.hasDebugStickState

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:dyed_color&gt;
script.zs
// MCItemStackMutable.hasDyedColor as bool
myMCItemStackMutable.hasDyedColor

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:enchantment_glint_override&gt;
script.zs
// MCItemStackMutable.hasEnchantmentGlintOverride as bool
myMCItemStackMutable.hasEnchantmentGlintOverride

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:enchantments&gt;
script.zs
// MCItemStackMutable.hasEnchantments as bool
myMCItemStackMutable.hasEnchantments

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:entity_data&gt;
script.zs
// MCItemStackMutable.hasEntityData as bool
myMCItemStackMutable.hasEntityData

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:firework_explosion&gt;
script.zs
// MCItemStackMutable.hasFireworkExplosion as bool
myMCItemStackMutable.hasFireworkExplosion

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:fireworks&gt;
script.zs
// MCItemStackMutable.hasFireworks as bool
myMCItemStackMutable.hasFireworks

Return Type: bool

Getter
Returns true if this ItemStack has a foil effect.
Foil is the glint / effect that is added to enchanted ItemStacks (and other items).
script.zs
// MCItemStackMutable.hasFoil as bool
myMCItemStackMutable.hasFoil

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:food&gt;
script.zs
// MCItemStackMutable.hasFood as bool
myMCItemStackMutable.hasFood

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:instrument&gt;
script.zs
// MCItemStackMutable.hasInstrument as bool
myMCItemStackMutable.hasInstrument

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:item_namegt;
script.zs
// MCItemStackMutable.hasItemName as bool
myMCItemStackMutable.hasItemName

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:lock&gt;
script.zs
// MCItemStackMutable.hasLock as bool
myMCItemStackMutable.hasLock

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:lodestone_tracker&gt;
script.zs
// MCItemStackMutable.hasLodestoneTracker as bool
myMCItemStackMutable.hasLodestoneTracker

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:lore&gt;
script.zs
// MCItemStackMutable.hasLore as bool
myMCItemStackMutable.hasLore

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:map_color&gt;
script.zs
// MCItemStackMutable.hasMapColor as bool
myMCItemStackMutable.hasMapColor

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:map_decorations&gt;
MapDecorations are additional elements that render on a map, such as waypoints.
script.zs
// MCItemStackMutable.hasMapDecorations as bool
myMCItemStackMutable.hasMapDecorations

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:map_id&gt;
script.zs
// MCItemStackMutable.hasMapId as bool
myMCItemStackMutable.hasMapId

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:map_post_processing&gt;
This componenet stores additional info on the map, such as the scale or whether to lock it.
script.zs
// MCItemStackMutable.hasMapPostProcessing as bool
myMCItemStackMutable.hasMapPostProcessing

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:max_damage&gt;
script.zs
// MCItemStackMutable.hasMaxDamage as bool
myMCItemStackMutable.hasMaxDamage

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:max_stack_size&gt;
script.zs
// MCItemStackMutable.hasMaxStackSize as bool
myMCItemStackMutable.hasMaxStackSize

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:note_block_sound&gt;
script.zs
// MCItemStackMutable.hasNoteBlockSound as bool
myMCItemStackMutable.hasNoteBlockSound

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:ominous_bottle_amplifier&gt;
script.zs
// MCItemStackMutable.hasOminousBottleAmplifier as bool
myMCItemStackMutable.hasOminousBottleAmplifier

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:pot_decorations&gt;
script.zs
// MCItemStackMutable.hasPotDecorations as bool
myMCItemStackMutable.hasPotDecorations

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:potion_contents&gt;
Stores Potion Data on an item.
script.zs
// MCItemStackMutable.hasPotionContents as bool
myMCItemStackMutable.hasPotionContents

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:profile&gt;
script.zs
// MCItemStackMutable.hasProfile as bool
myMCItemStackMutable.hasProfile

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:rarity&gt;
script.zs
// MCItemStackMutable.hasRarity as bool
myMCItemStackMutable.hasRarity

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:recipes&gt;
Used for Knowledge Books.
script.zs
// MCItemStackMutable.hasRecipes as bool
myMCItemStackMutable.hasRecipes

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:repair_cost&gt;
script.zs
// MCItemStackMutable.hasRepairCost as bool
myMCItemStackMutable.hasRepairCost

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:stored_enchantments&gt;
The stored enchantments component is only present in enchanted books, since it just stores the enchantments under a lid for future use. The item is not enchanted.
script.zs
// MCItemStackMutable.hasStoredEnchantments as bool
myMCItemStackMutable.hasStoredEnchantments

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:suspicious_stew_effects&gt;
script.zs
// MCItemStackMutable.hasSuspiciousStewEffects as bool
myMCItemStackMutable.hasSuspiciousStewEffects

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:tool&gt;
script.zs
// MCItemStackMutable.hasTool as bool
myMCItemStackMutable.hasTool

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:trim&gt;
script.zs
// MCItemStackMutable.hasTrim as bool
myMCItemStackMutable.hasTrim

Return Type: bool

Getter
Checks whether the ComponentAccess has the &lt;componenttype:minecraft:unbreakable&gt;
script.zs
// MCItemStackMutable.hasUnbreakable as bool
myMCItemStackMutable.hasUnbreakable

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:writable_book_content&gt;
script.zs
// MCItemStackMutable.hasWritableBookContent as bool
myMCItemStackMutable.hasWritableBookContent

Return Type: bool

Getter
Checks whether the ComponentAccess has &lt;componenttype:minecraft:written_book_content&gt;
script.zs
// MCItemStackMutable.hasWrittenBookContent as bool
myMCItemStackMutable.hasWrittenBookContent

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:hide_additional_tooltip&gt;
script.zs
// MCItemStackMutable.hideAdditionalTooltip as bool
myMCItemStackMutable.hideAdditionalTooltip

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:hide_tooltip&gt;
script.zs
// MCItemStackMutable.hideTooltip as bool
myMCItemStackMutable.hideTooltip

Return Type: bool

Getter
Gets the hover name of the ItemStack.

This will give the raw name without the formatting that 'displayName' applies.

script.zs
// MCItemStackMutable.hoverName as Component
myMCItemStackMutable.hoverName

Return Type: Component

Getter
The backing ingredient
script.zs
// MCItemStackMutable.ingredient as IIngredient
myMCItemStackMutable.ingredient

Return Type: IIngredient

Getter
Gets the data in &lt;componenttype:minecraft:instrument&gt;
script.zs
// MCItemStackMutable.instrument as Instrument
myMCItemStackMutable.instrument

Return Type: Instrument

Getter
Can this ItemStack be enchanted?
script.zs
// MCItemStackMutable.isEnchantable as bool
myMCItemStackMutable.isEnchantable

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:fire_resistant&gt;
script.zs
// MCItemStackMutable.isFireResistant as bool
myMCItemStackMutable.isFireResistant

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:intangible_projectile&gt;
script.zs
// MCItemStackMutable.isIntangibleProjectile as bool
myMCItemStackMutable.isIntangibleProjectile

Return Type: bool

Getter
script.zs
// MCItemStackMutable.isMutable as bool
myMCItemStackMutable.isMutable

Return Type: bool

isMutable() as bool
script.zs
// MCItemStackMutable.isMutable() as bool;
myMCItemStackMutable.isMutable();

Return Type: bool

Getter
Gets the data in the &lt;componenttype:minecraft:custom_name&gt;
In the case of items, an item name is set by the make to make a special instance of an item, such as with ominous banners.
script.zs
// MCItemStackMutable.itemName as Component
myMCItemStackMutable.itemName

Return Type: Component

Getter
Gets the data in &lt;componenttype:minecraft:lock&gt;
script.zs
// MCItemStackMutable.lockComponent as LockCode
myMCItemStackMutable.lockComponent

Return Type: LockCode

Getter
Gets the data in &lt;componenttype:minecraft:lodestone_tracker&gt;
script.zs
// MCItemStackMutable.lodestoneTracker as LodestoneTracker
myMCItemStackMutable.lodestoneTracker

Return Type: LodestoneTracker

Getter
Gets the data in the &lt;componenttype:minecraft:lore&gt;
script.zs
// MCItemStackMutable.lore as ItemLore
myMCItemStackMutable.lore

Return Type: ItemLore

Getter
Gets the data in &lt;componenttype:minecraft:map_color&gt;
script.zs
// MCItemStackMutable.mapColor as MapItemColor
myMCItemStackMutable.mapColor

Return Type: MapItemColor

Getter
Gets the data in &lt;componenttype:minecraft:map_decorations&gt;
script.zs
// MCItemStackMutable.mapDecorations as MapDecorations
myMCItemStackMutable.mapDecorations

Return Type: MapDecorations

Getter
Gets the data in &lt;componenttype:minecraft:map_id&gt;
script.zs
// MCItemStackMutable.mapId as MapId
myMCItemStackMutable.mapId

Return Type: MapId

Getter
Gets the data in &lt;componenttype:minecraft:map_post_processing&gt;
script.zs
// MCItemStackMutable.mapPostProcessing as MapPostProcessing
myMCItemStackMutable.mapPostProcessing

Return Type: MapPostProcessing

matches(stack as IItemStack) as bool
Does the given stack match the ingredient?
script.zs
// MCItemStackMutable.matches(stack as IItemStack) as bool;
myMCItemStackMutable.matches(<item:minecraft:iron_ingot>);

Parameters:

stack Type: IItemStack - The stack to check

Return Type: bool

Getter
Returns the max damage of the ItemStack This is the max durability of the ItemStack.
script.zs
// MCItemStackMutable.maxDamage as int
myMCItemStackMutable.maxDamage

Return Type: int

Getter
Gets the data in the &lt;componenttype:minecraft:max_damage&gt;
script.zs
// MCItemStackMutable.maxDamage as int
myMCItemStackMutable.maxDamage

Return Type: int

Getter
Gets the data in the &lt;componenttype:minecraft:max_stack_size&gt;
script.zs
// MCItemStackMutable.maxStackSize as int
myMCItemStackMutable.maxStackSize

Return Type: int

modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null)
script.zs
// MCItemStackMutable.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);
myMCItemStackMutable.modifyShiftTooltip(myITooltipFunction, myITooltipFunction);

Parameters:

shiftedFunction Type: ITooltipFunction
unshiftedFunction (optional) Type: ITooltipFunction

Default Value: null

modifyTooltip(function as ITooltipFunction)
script.zs
// MCItemStackMutable.modifyTooltip(function as ITooltipFunction);
myMCItemStackMutable.modifyTooltip(myITooltipFunction);

Parameters:

mul(amount as int) as IIngredientWithAmount
Use this in contexts where machines accept more than one item to state that fact.
script.zs
// MCItemStackMutable.mul(amount as int) as IIngredientWithAmount;
myMCItemStackMutable.mul(myInt);

Parameters:

amount Type: int

Return Type: IIngredientWithAmount

Getter
Gets the data in &lt;componenttype:minecraft:note_block_sound&gt;
script.zs
// MCItemStackMutable.noteBlockSound as ResourceLocation
myMCItemStackMutable.noteBlockSound

Return Type: ResourceLocation

Getter
Gets the data in &lt;componenttype:minecraft:ominous_bottle_amplifier&gt;
script.zs
// MCItemStackMutable.ominousBottleAmplifier as int
myMCItemStackMutable.ominousBottleAmplifier

Return Type: int

onlyDamaged() as IIngredient
script.zs
// MCItemStackMutable.onlyDamaged() as IIngredient;
myMCItemStackMutable.onlyDamaged();

Return Type: IIngredient

onlyDamagedAtLeast(minDamage as int) as IIngredient
script.zs
// MCItemStackMutable.onlyDamagedAtLeast(minDamage as int) as IIngredient;
myMCItemStackMutable.onlyDamagedAtLeast(myInt);

Parameters:

minDamage Type: int

Return Type: IIngredient

onlyDamagedAtMost(maxDamage as int) as IIngredient
script.zs
// MCItemStackMutable.onlyDamagedAtMost(maxDamage as int) as IIngredient;
myMCItemStackMutable.onlyDamagedAtMost(myInt);

Parameters:

maxDamage Type: int

Return Type: IIngredient

onlyIf(uid as string, function as function(t as IItemStack) as bool = null) as IIngredient
script.zs
// MCItemStackMutable.onlyIf(uid as string, function as function(t as IItemStack) as bool = null) as IIngredient;
myMCItemStackMutable.onlyIf(myString, myPredicate);

Parameters:

uid Type: string
function (optional) Type: function(t as IItemStack) as bool

Default Value: null

Return Type: IIngredient

Getter
Gets owning mod for the Item in this IItemStack
script.zs
// MCItemStackMutable.owner as string
myMCItemStackMutable.owner

Return Type: string

percent(percentage as double) as Percentaged<IItemStack>
script.zs
// MCItemStackMutable.percent(percentage as double) as Percentaged<IItemStack>;
myMCItemStackMutable.percent(myDouble);

Parameters:

percentage Type: double

Return Type: Percentaged<IItemStack>

Getter
Gets the data in &lt;componenttype:minecraft:pot_decorations&gt;
script.zs
// MCItemStackMutable.potDecorations as PotDecorations
myMCItemStackMutable.potDecorations

Return Type: PotDecorations

Getter
Gets the data in &lt;componenttype:minecraft:potion_contents&gt;
script.zs
// MCItemStackMutable.potionContents as PotionContents
myMCItemStackMutable.potionContents

Return Type: PotionContents

Getter
Gets the data in &lt;componenttype:minecraft:profile&gt;
script.zs
// MCItemStackMutable.profile as ResolvableProfile
myMCItemStackMutable.profile

Return Type: ResolvableProfile

Getter
script.zs
// MCItemStackMutable.prototype as DataComponentMap
myMCItemStackMutable.prototype

Return Type: DataComponentMap

Getter
Gets the data in the &lt;componenttype:minecraft:rarity&gt;
script.zs
// MCItemStackMutable.rarity as Rarity
myMCItemStackMutable.rarity

Return Type: Rarity

Getter
Gets the data in &lt;componenttype:minecraft:recipes&gt;
script.zs
// MCItemStackMutable.recipes as List<ResourceLocation>
myMCItemStackMutable.recipes

Return Type: List<ResourceLocation>

Getter
Gets the registry name for the Item in this IItemStack
script.zs
// MCItemStackMutable.registryName as ResourceLocation
myMCItemStackMutable.registryName

Return Type: ResourceLocation

remove(type as DataComponentType<T>) as IItemStack
script.zs
// MCItemStackMutable.remove<T>(type as DataComponentType<T>) as IItemStack;
myMCItemStackMutable.remove<T>(myDataComponentType);

Parameters:

Return Type: IItemStack

removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[])
Removes all AttributeModifiers that use the given Attribute from this IIngredient.
Attributes removed with this method are removed from ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to remove the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withoutAttribute.
This method can only remove default Attributes from an ItemStack, it is still possible that an ItemStack can override it.
script.zs
// MCItemStackMutable.removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[]);
myMCItemStackMutable.removeGlobalAttribute(<attribute:minecraft:generic.attack_damage>, [<constant:minecraft:equipmentslot:chest>]);

Parameters:

attribute Type: Attribute - The attribute to remove.
slotTypes Type: EquipmentSlot[] - The slot types to remove it from.
removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[])
Removes all AttributeModifiers who's ID is the same as the given uuid from this IIngredient.
script.zs
// MCItemStackMutable.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[]);
myMCItemStackMutable.removeGlobalAttributeModifier("8c1b5535-9f79-448b-87ae-52d81480aaa3", [<constant:minecraft:equipmentslot:chest>]);

Parameters:

uuid Type: string - The unique id of the AttributeModifier to remove.
slotTypes Type: EquipmentSlot[] - The slot types to remove it from.
removeGlobalAttributeModifier(uuid as UUID, slotTypes as EquipmentSlot[])
Removes all AttributeModifiers who's ID is the same as the given uuid from this IIngredient.
script.zs
// MCItemStackMutable.removeGlobalAttributeModifier(uuid as UUID, slotTypes as EquipmentSlot[]);
myMCItemStackMutable.removeGlobalAttributeModifier(IItemStack.BASE_ATTACK_DAMAGE_UUID, [<constant:minecraft:equipmentslot:chest>]);

Parameters:

uuid Type: UUID - The unique id of the AttributeModifier to remove.
slotTypes Type: EquipmentSlot[] - The slot types to remove it from.
removeTooltip(regex as string)
script.zs
// MCItemStackMutable.removeTooltip(regex as string);
myMCItemStackMutable.removeTooltip(myString);

Parameters:

regex Type: string
Getter
Gets the data in &lt;componenttype:minecraft:repair_cost&gt;
script.zs
// MCItemStackMutable.repairCost as int
myMCItemStackMutable.repairCost

Return Type: int

reuse() as IIngredient
script.zs
// MCItemStackMutable.reuse() as IIngredient;
myMCItemStackMutable.reuse();

Return Type: IIngredient

setBurnTime(time as int, manager as IRecipeManager<Recipe>)
Sets the burn time of this ingredient, for use in the furnace and other machines
script.zs
// MCItemStackMutable.setBurnTime(time as int, manager as IRecipeManager<Recipe>);
myMCItemStackMutable.setBurnTime(500, myIRecipeManager);

Parameters:

time Type: int - the new burn time
shrink(amount as int = 1) as IItemStack
Shrinks this IItemStack's stack size by the given amount, or 1 if no amount is given.

Returns: This IItemStack if mutable, a new one with the new amount otherwise.

script.zs
// MCItemStackMutable.shrink(amount as int = 1) as IItemStack;
myMCItemStackMutable.shrink(2);

Parameters:

amount (optional) Type: int - The amount to shrink by.

Default Value: 1

Return Type: IItemStack

Getter
Returns if the ItemStack can have an amount greater than 1 I.E Swords and tools are not stackable, sticks are.
script.zs
// MCItemStackMutable.stackable as bool
myMCItemStackMutable.stackable

Return Type: bool

Getter
Gets the data in &lt;componenttype:minecraft:stored_enchantments&gt;
script.zs
// MCItemStackMutable.storedEnchantments as ItemEnchantments
myMCItemStackMutable.storedEnchantments

Return Type: ItemEnchantments

Getter
Gets the data in &lt;componenttype:minecraft:suspicious_stew_effects&gt;
script.zs
// MCItemStackMutable.suspiciousStewEffects as SuspiciousStewEffects
myMCItemStackMutable.suspiciousStewEffects

Return Type: SuspiciousStewEffects

Getter
Gets the data in &lt;componenttype:minecraft:tool&gt;
script.zs
// MCItemStackMutable.tool as Tool
myMCItemStackMutable.tool

Return Type: Tool

transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient
script.zs
// MCItemStackMutable.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;
myMCItemStackMutable.transformCustom(myString, myFunction);

Parameters:

uid Type: string
function (optional) Type: function(r as IItemStack) as IItemStack

Default Value: null

Return Type: IIngredient

transformDamage(amount as int = 1) as IIngredient
script.zs
// MCItemStackMutable.transformDamage(amount as int = 1) as IIngredient;
myMCItemStackMutable.transformDamage(myInt);

Parameters:

amount (optional) Type: int

Default Value: 1

Return Type: IIngredient

transformReplace(replaceWith as IItemStack) as IIngredient
script.zs
// MCItemStackMutable.transformReplace(replaceWith as IItemStack) as IIngredient;
myMCItemStackMutable.transformReplace(myIItemStack);

Parameters:

replaceWith Type: IItemStack

Return Type: IIngredient

Getter
Gets the data in &lt;componenttype:minecraft:trim&gt;
script.zs
// MCItemStackMutable.trim as ArmorTrim
myMCItemStackMutable.trim

Return Type: ArmorTrim

Getter
Gets the data in the &lt;componenttype:minecraft:unbreakable&gt;
script.zs
// MCItemStackMutable.unbreakable as Unbreakable
myMCItemStackMutable.unbreakable

Return Type: Unbreakable

update(type as DataComponentType<T>, defaultValue as T, data as U, operator as BiFunction<T, T, U>) as IItemStack
script.zs
// MCItemStackMutable.update<T, U>(type as DataComponentType<T>, defaultValue as T, data as U, operator as BiFunction<T, T, U>) as IItemStack;
myMCItemStackMutable.update<T, U>(myDataComponentType, myT, myU, myBiFunction);

Parameters:

defaultValue Type: T
data Type: U
operator Type: BiFunction<T, T, U>

Return Type: IItemStack

update(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IItemStack
script.zs
// MCItemStackMutable.update<T>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IItemStack;
myMCItemStackMutable.update<T>(myDataComponentType, myT, myUnaryOperator);

Parameters:

defaultValue Type: T
operator Type: UnaryOperator<T>

Return Type: IItemStack

Getter
Gets the use duration of the ItemStack
script.zs
// MCItemStackMutable.useDuration as int
myMCItemStackMutable.useDuration

Return Type: int

Getter
Returns true if this stack is considered a crossbow item
script.zs
// MCItemStackMutable.useOnRelease as bool
myMCItemStackMutable.useOnRelease

Return Type: bool

with(type as DataComponentType<T>, value as T?) as IItemStack
script.zs
// MCItemStackMutable.with<T>(type as DataComponentType<T>, value as T?) as IItemStack;
myMCItemStackMutable.with<T>(myDataComponentType, myT);

Parameters:

value Type: T?

Return Type: IItemStack

withAttributeModifiers(modifiers as ItemAttributeModifiers) as ComponentAccess
Sets the &lt;componenttype:minecraft:attribute_modifiers&gt; of the ComponentAccess to have the given ItemAttributeModifiers

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withAttributeModifiers(modifiers as ItemAttributeModifiers) as ComponentAccess;
myMCItemStackMutable.withAttributeModifiers(ItemAttributeModifiers.builder().add(<attribute:minecraft:player.block_break_speed>,
AttributeModifier.create("test", 2.0, <constant:minecraft:attribute/operation:add_value>, "596e0826-7c66-42c6-b3da-45a6d667ccf7"),
<constant:minecraft:equipmentslot/group:mainhand>).build(););

Parameters:

modifiers Type: ItemAttributeModifiers - The attributes to give to the item.

Return Type: ComponentAccess

withAttributeModifiers(modifier as Entry, showInTooltip as bool = true) as ComponentAccess

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withAttributeModifiers(modifier as Entry, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable.withAttributeModifiers(myEntry, myBool);

Parameters:

showInTooltip (optional) Type: bool

Default Value: true

Return Type: ComponentAccess

withAttributeModifiers(modifiers as List<Entry>, showInTooltip as bool = true) as ComponentAccess
script.zs
// MCItemStackMutable.withAttributeModifiers(modifiers as List<Entry>, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable.withAttributeModifiers(myList, myBool);

Parameters:

showInTooltip (optional) Type: bool

Default Value: true

Return Type: ComponentAccess

withBannerPatterns(layers as List<Layer>) as ComponentAccess
Sets the &lt;componenttype:minecraft:banner_patterns&gt; of the ComponentAccess to have the given List<BannerPatternLayers.Layer>

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBannerPatterns(layers as List<Layer>) as ComponentAccess;
myMCItemStackMutable.withBannerPatterns(myList);

Parameters:

Return Type: ComponentAccess

withBannerPatterns(layers as BannerPatternLayers) as ComponentAccess
Sets the &lt;componenttype:minecraft:banner_patterns&gt; of the ComponentAccess to have the given BannerPatternLayers

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBannerPatterns(layers as BannerPatternLayers) as ComponentAccess;
myMCItemStackMutable.withBannerPatterns(myBannerPatternLayers);

Parameters:

Return Type: ComponentAccess

withBaseColor(color as DyeColor) as ComponentAccess
Sets the &lt;componenttype:minecraft:base_color&gt; of the ComponentAccess to have the given DyeColor

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBaseColor(color as DyeColor) as ComponentAccess;
myMCItemStackMutable.withBaseColor(myDyeColor);

Parameters:

color Type: DyeColor

Return Type: ComponentAccess

withBees(occupants as List<Occupant>) as ComponentAccess
Sets the &lt;componenttype:minecraft:bees&gt; of the ComponentAccess to have the given occupants

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBees(occupants as List<Occupant>) as ComponentAccess;
myMCItemStackMutable.withBees(myList);

Parameters:

Return Type: ComponentAccess

withBlockEntityData(data as MapData) as ComponentAccess
Sets the &lt;componenttype:minecraft:block_entity_data&gt; of the ComponentAccess to have the given MapData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBlockEntityData(data as MapData) as ComponentAccess;
myMCItemStackMutable.withBlockEntityData(myMapData);

Parameters:

data Type: MapData

Return Type: ComponentAccess

withBlockEntityData(data as CustomData) as ComponentAccess
Sets the &lt;componenttype:minecraft:block_entity_data&gt; of the ComponentAccess to have the given CustomData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBlockEntityData(data as CustomData) as ComponentAccess;
myMCItemStackMutable.withBlockEntityData(myCustomData);

Parameters:

data Type: CustomData

Return Type: ComponentAccess

withBlockState(properties as BlockItemStateProperties) as ComponentAccess
Sets the &lt;componenttype:minecraft:block_state&gt; of the ComponentAccess to have the given BlockItemStateProperties

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBlockState(properties as BlockItemStateProperties) as ComponentAccess;
myMCItemStackMutable.withBlockState(myBlockItemStateProperties);

Parameters:

Return Type: ComponentAccess

withBucketEntityData(data as MapData) as ComponentAccess
Sets the &lt;componenttype:minecraft:bucket_entity_data&gt; of the ComponentAccess to have the given MapData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBucketEntityData(data as MapData) as ComponentAccess;
myMCItemStackMutable.withBucketEntityData(myMapData);

Parameters:

data Type: MapData

Return Type: ComponentAccess

withBucketEntityData(data as CustomData) as ComponentAccess
Sets the &lt;componenttype:minecraft:bucket_entity_data&gt; of the ComponentAccess to have the given CustomData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBucketEntityData(data as CustomData) as ComponentAccess;
myMCItemStackMutable.withBucketEntityData(myCustomData);

Parameters:

data Type: CustomData

Return Type: ComponentAccess

withBundleContents(contents as List<IItemStack>) as ComponentAccess
Sets the &lt;componenttype:minecraft:bundle_contents&gt; of the ComponentAccess to have the given contents

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBundleContents(contents as List<IItemStack>) as ComponentAccess;
myMCItemStackMutable.withBundleContents([<item:minecraft:diamond> * 64]);

Parameters:

contents Type: List<IItemStack> - A list of items to store within.

Return Type: ComponentAccess

withBundleContents(contents as BundleContents) as ComponentAccess
Sets the &lt;componenttype:minecraft:bundle_contents&gt; of the ComponentAccess to have the given BundleContents

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withBundleContents(contents as BundleContents) as ComponentAccess;
myMCItemStackMutable.withBundleContents(myBundleContents);

Parameters:

contents Type: BundleContents

Return Type: ComponentAccess

withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess
Sets the &lt;componenttype:minecraft:can_break&gt; with the given BlockPredicates.
Any predicate that matches will allow the Block to be broken by this ItemStack.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable.withCanBreak(BlockPredicate.create().of(<block:minecraft:diamond_ore>).build(), true);

Parameters:

predicates Type: List<BlockPredicate> - The collection of predicates to test for
showInTooltip (optional) Type: bool - Whether to show the ability in the tooltip or not.

Default Value: true

Return Type: ComponentAccess

withCanBreak(predicate as AdventureModePredicate) as ComponentAccess
Sets the &lt;componenttype:minecraft:can_break&gt; of the ComponentAccess to have the given AdventureModePredicate

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCanBreak(predicate as AdventureModePredicate) as ComponentAccess;
myMCItemStackMutable.withCanBreak(myAdventureModePredicate);

Parameters:

predicate Type: AdventureModePredicate - The adventure mode predicate to use to determine whether the item can be used to break a block.

Return Type: ComponentAccess

withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess
Sets the &lt;componenttype:minecraft:can_place_on&gt; with the given BlockPredicates.
Any predicate that matches will allow the BlockItem within the ItemStack to be placed.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable.withCanPlaceOn(BlockPredicate.create().of(<block:minecraft:dirt>).build(), myBool);

Parameters:

predicates Type: List<BlockPredicate> - The collection of predicates to test for
showInTooltip (optional) Type: bool - Whether to show the restriction in the tooltip or not.

Default Value: true

Return Type: ComponentAccess

withCanPlaceOn(predicate as AdventureModePredicate) as ComponentAccess
Sets the &lt;componenttype:minecraft:can_place_on&gt; of the ComponentAccess to have the given AdventureModePredicate

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCanPlaceOn(predicate as AdventureModePredicate) as ComponentAccess;
myMCItemStackMutable.withCanPlaceOn(myAdventureModePredicate);

Parameters:

predicate Type: AdventureModePredicate - The adventure mode predicate to use to determine whether the current block can be placed on another block.

Return Type: ComponentAccess

withChargedProjectiles(item as IItemStack) as ComponentAccess
Sets the &lt;componenttype:minecraft:charged_projectiles&gt; of the ComponentAccess to have the given IItemStack

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withChargedProjectiles(item as IItemStack) as ComponentAccess;
myMCItemStackMutable.withChargedProjectiles(<item:minecraft:arrow>);

Parameters:

item Type: IItemStack - The item to store within.

Return Type: ComponentAccess

withChargedProjectiles(items as List<IItemStack>) as ComponentAccess
Sets the &lt;componenttype:minecraft:charged_projectiles&gt; of the ComponentAccess to have the given items.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withChargedProjectiles(items as List<IItemStack>) as ComponentAccess;
myMCItemStackMutable.withChargedProjectiles([<item:minecraft:arrow>]);

Parameters:

items Type: List<IItemStack> - The items to store within.

Return Type: ComponentAccess

withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as ComponentAccess
Sets the &lt;componenttype:minecraft:charged_projectiles&gt; of the ComponentAccess to have the given ChargedProjectiles

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as ComponentAccess;
myMCItemStackMutable.withChargedProjectiles(myChargedProjectiles);

Parameters:

chargedProjectiles Type: ChargedProjectiles

Return Type: ComponentAccess

withContainer(contents as List<IItemStack>) as ComponentAccess
Sets the &lt;componenttype:minecraft:container&gt; of the ComponentAccess to have the given values.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withContainer(contents as List<IItemStack>) as ComponentAccess;
myMCItemStackMutable.withContainer(myList);

Parameters:

contents Type: List<IItemStack>

Return Type: ComponentAccess

withContainer(contents as ItemContainerContents) as ComponentAccess
Sets the &lt;componenttype:minecraft:container&gt; of the ComponentAccess to have the given ItemContainerContents

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withContainer(contents as ItemContainerContents) as ComponentAccess;
myMCItemStackMutable.withContainer(myItemContainerContents);

Parameters:

Return Type: ComponentAccess

withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess
Sets the &lt;componenttype:minecraft:container_loot&gt; of the ComponentAccess to have the given loot table and seed.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;
myMCItemStackMutable.withContainerLoot(myResourceKey, myLong);

Parameters:

seed Type: long

Return Type: ComponentAccess

withContainerLoot(loot as SeededContainerLoot) as ComponentAccess
Sets the &lt;componenttype:minecraft:container_loot&gt; of the ComponentAccess to have the given SeededContainerLoot

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withContainerLoot(loot as SeededContainerLoot) as ComponentAccess;
myMCItemStackMutable.withContainerLoot(mySeededContainerLoot);

Parameters:

Return Type: ComponentAccess

withCreativeSlotLock() as ComponentAccess
Sets the &lt;componenttype:minecraft:creative_slot_lock&gt; of the ComponentAccess to exist.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCreativeSlotLock() as ComponentAccess;
myMCItemStackMutable.withCreativeSlotLock();

Return Type: ComponentAccess

withCustomData(customData as MapData) as ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given MapData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCustomData(customData as MapData) as ComponentAccess;
myMCItemStackMutable.withCustomData({custom_ammo_thing: 1, owner: "Benji"});

Parameters:

customData Type: MapData - The MapData to set the component to.

Return Type: ComponentAccess

withCustomData(customData as CustomData) as ComponentAccess
Sets the &lt;componenttype:minecraft:custom_data&gt; of the ComponentAccess to have the given CustomData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCustomData(customData as CustomData) as ComponentAccess;
myMCItemStackMutable.withCustomData(myCustomData);

Parameters:

customData Type: CustomData

Return Type: ComponentAccess

withCustomModelData(value as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:custom_model_data&gt; of the ComponentAccess to have the given value.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCustomModelData(value as int) as ComponentAccess;
myMCItemStackMutable.withCustomModelData(2);

Parameters:

value Type: int - The value to set the CustomModelData to

Return Type: ComponentAccess

withCustomModelData(data as CustomModelData) as ComponentAccess

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCustomModelData(data as CustomModelData) as ComponentAccess;
myMCItemStackMutable.withCustomModelData(myCustomModelData);

Parameters:

Return Type: ComponentAccess

withCustomName(name as Component) as ComponentAccess
Sets the &lt;componenttype:minecraft:custom_name&gt; of the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withCustomName(name as Component) as ComponentAccess;
myMCItemStackMutable.withCustomName(Component.literal("Fancy Water"));

Parameters:

name Type: Component - The component to use.

Return Type: ComponentAccess

withDamage(damage as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:damage&gt; of the ComponentAccess to have the given value. Damage is related to durability. Using this on an item that has no maxDamage may have unforeseen issues.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withDamage(damage as int) as ComponentAccess;
myMCItemStackMutable.withDamage(16);

Parameters:

damage Type: int - The new damage of the ComponentAccess.

Return Type: ComponentAccess

withDebugStickState(state as DebugStickState) as ComponentAccess
Sets the &lt;componenttype:minecraft:debug_stick_state&gt; of the ComponentAccess to have the given DebugStickState

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withDebugStickState(state as DebugStickState) as ComponentAccess;
myMCItemStackMutable.withDebugStickState(myDebugStickState);

Parameters:

Return Type: ComponentAccess

withDyedColor(rgb as int, showInTooltip as bool = true) as ComponentAccess
Sets the &lt;componenttype:minecraft:dyed_color&gt; of the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withDyedColor(rgb as int, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable.withDyedColor(0xFFFF00, true);

Parameters:

rgb Type: int - The colour to dye this item with
showInTooltip (optional) Type: bool - Whether to show this information in a tooltip

Default Value: true

Return Type: ComponentAccess

withDyedColor(color as DyedItemColor) as ComponentAccess
Sets the &lt;componenttype:minecraft:dyed_color&gt; of the ComponentAccess to have the given DyedItemColor

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withDyedColor(color as DyedItemColor) as ComponentAccess;
myMCItemStackMutable.withDyedColor(myDyedItemColor);

Parameters:

Return Type: ComponentAccess

withEnchantment(enchantment as Enchantment, level as int = 1) as ComponentAccess
Sets the &lt;componenttype:minecraft:enchantments&gt; of the ComponentAccess to have the given Enchantment and level.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withEnchantment(enchantment as Enchantment, level as int = 1) as ComponentAccess;
myMCItemStackMutable.withEnchantment(<enchantment:minecraft:efficiency>, 4);

Parameters:

enchantment Type: Enchantment - The enchantment to add
level (optional) Type: int - The level of the enchantment to set

Default Value: 1

Return Type: ComponentAccess

withEnchantmentGlintOverride(value as bool) as ComponentAccess
Sets the &lt;componenttype:minecraft:enchantment_glint_override&gt; of the ComponentAccess to have the given value.
If it is false, the item will never render the enchantment glint If it is true, the item will render the enchantment glint always, indenpendently of whether it is enchanted or not.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withEnchantmentGlintOverride(value as bool) as ComponentAccess;
myMCItemStackMutable.withEnchantmentGlintOverride(true);

Parameters:

value Type: bool - The value of the override, as described above

Return Type: ComponentAccess

withEnchantments(enchantments as ItemEnchantments) as ComponentAccess
Sets the &lt;componenttype:minecraft:enchantments&gt; of the ComponentAccess to have the given ItemEnchantments

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withEnchantments(enchantments as ItemEnchantments) as ComponentAccess;
myMCItemStackMutable.withEnchantments(myItemEnchantments);

Parameters:

enchantments Type: ItemEnchantments

Return Type: ComponentAccess

withEntityData(data as MapData) as ComponentAccess
Sets the &lt;componenttype:minecraft:entity_data&gt; of the ComponentAccess to have the given MapData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withEntityData(data as MapData) as ComponentAccess;
myMCItemStackMutable.withEntityData(myMapData);

Parameters:

data Type: MapData

Return Type: ComponentAccess

withEntityData(data as CustomData) as ComponentAccess
Sets the &lt;componenttype:minecraft:entity_data&gt; of the ComponentAccess to have the given CustomData

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withEntityData(data as CustomData) as ComponentAccess;
myMCItemStackMutable.withEntityData(myCustomData);

Parameters:

data Type: CustomData

Return Type: ComponentAccess

withFireResistant() as ComponentAccess
Sets the &lt;componenttype:minecraft:fire_resistant&gt; of the ComponentAccess to exist.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withFireResistant() as ComponentAccess;
myMCItemStackMutable.withFireResistant();

Return Type: ComponentAccess

withFireworkExplosion(explosion as FireworkExplosion) as ComponentAccess
Sets the &lt;componenttype:minecraft:firework_explosion&gt; of the ComponentAccess to have the given FireworkExplosion

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withFireworkExplosion(explosion as FireworkExplosion) as ComponentAccess;
myMCItemStackMutable.withFireworkExplosion(myFireworkExplosion);

Parameters:

Return Type: ComponentAccess

withFireworks(flightDuration as int, explosions as List<FireworkExplosion>) as ComponentAccess
Sets the &lt;componenttype:minecraft:fireworks&gt; of the ComponentAccess to have the given duration and explosions.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withFireworks(flightDuration as int, explosions as List<FireworkExplosion>) as ComponentAccess;
myMCItemStackMutable.withFireworks(myInt, myList);

Parameters:

flightDuration Type: int
explosions Type: List<FireworkExplosion>

Return Type: ComponentAccess

withFireworks(fireworks as Fireworks) as ComponentAccess
Sets the &lt;componenttype:minecraft:fireworks&gt; of the ComponentAccess to have the given Fireworks

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withFireworks(fireworks as Fireworks) as ComponentAccess;
myMCItemStackMutable.withFireworks(myFireworks);

Parameters:

fireworks Type: Fireworks

Return Type: ComponentAccess

withFood(food as FoodProperties) as ComponentAccess
Sets the &lt;componenttype:minecraft:food&gt; of the ComponentAccess to have the given FoodProperties

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withFood(food as FoodProperties) as ComponentAccess;
myMCItemStackMutable.withFood(myFoodProperties);

Parameters:

Return Type: ComponentAccess

withHideAdditionalTooltip() as ComponentAccess
Sets the &lt;componenttype:minecraft:hide_additional_tooltip&gt; of the ComponentAccess to exist.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withHideAdditionalTooltip() as ComponentAccess;
myMCItemStackMutable.withHideAdditionalTooltip();

Return Type: ComponentAccess

withHideTooltip() as ComponentAccess
Sets the &lt;componenttype:minecraft:hide_tooltip&gt; of the ComponentAccess to exist.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withHideTooltip() as ComponentAccess;
myMCItemStackMutable.withHideTooltip();

Return Type: ComponentAccess

withInstrument(instrument as Instrument) as ComponentAccess
Sets the &lt;componenttype:minecraft:instrument&gt; of the ComponentAccess to have the given Instrument

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withInstrument(instrument as Instrument) as ComponentAccess;
myMCItemStackMutable.withInstrument(myInstrument);

Parameters:

instrument Type: Instrument

Return Type: ComponentAccess

withIntangibleProjectile() as ComponentAccess
Sets the &lt;componenttype:minecraft:intangible_projectile&gt; of the ComponentAccess to exist.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withIntangibleProjectile() as ComponentAccess;
myMCItemStackMutable.withIntangibleProjectile();

Return Type: ComponentAccess

withItemName(name as Component) as ComponentAccess
Sets the &lt;componenttype:minecraft:item_name&gt; of the ComponentAccess to have the given Component

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withItemName(name as Component) as ComponentAccess;
myMCItemStackMutable.withItemName(Component.literal("Fancy Water"));

Parameters:

name Type: Component

Return Type: ComponentAccess

withJsonComponent(type as DataComponentType<T>, value as IData) as IItemStack
script.zs
// MCItemStackMutable.withJsonComponent(type as DataComponentType<T>, value as IData) as IItemStack;
myMCItemStackMutable.withJsonComponent(myDataComponentType, myIData);

Parameters:

value Type: IData

Return Type: IItemStack

withJsonComponents(value as IData) as IItemStack
script.zs
// MCItemStackMutable.withJsonComponents(value as IData) as IItemStack;
myMCItemStackMutable.withJsonComponents(myIData);

Parameters:

value Type: IData

Return Type: IItemStack

withLock(code as string) as ComponentAccess
Sets the &lt;componenttype:minecraft:lock&gt; of the ComponentAccess to have the given string.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withLock(code as string) as ComponentAccess;
myMCItemStackMutable.withLock(myString);

Parameters:

code Type: string

Return Type: ComponentAccess

withLock(lock as LockCode) as ComponentAccess
Sets the &lt;componenttype:minecraft:lock&gt; of the ComponentAccess to have the given LockCode

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withLock(lock as LockCode) as ComponentAccess;
myMCItemStackMutable.withLock(myLockCode);

Parameters:

lock Type: LockCode

Return Type: ComponentAccess

withLodestoneTracker(tracker as LodestoneTracker) as ComponentAccess
Sets the &lt;componenttype:minecraft:lodestone_tracker&gt; of the ComponentAccess to have the given LodestoneTracker

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withLodestoneTracker(tracker as LodestoneTracker) as ComponentAccess;
myMCItemStackMutable.withLodestoneTracker(myLodestoneTracker);

Parameters:

Return Type: ComponentAccess

withLore(components as List<Component>) as ComponentAccess
Sets the &lt;componenttype:minecraft:lore&gt; of the ComponentAccess to have the given stdlib.List&lt;Component&gt;

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withLore(components as List<Component>) as ComponentAccess;
myMCItemStackMutable.withLore([Component.literal("Found in a dark cave"), Component.translatable("Belonged to a Dragon")]);

Parameters:

components Type: List<Component> - The list of Components to add as lore.

Return Type: ComponentAccess

withLore(lore as ItemLore) as ComponentAccess
Sets the &lt;componenttype:minecraft:lore&gt; of the ComponentAccess to have the given ItemLore

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withLore(lore as ItemLore) as ComponentAccess;
myMCItemStackMutable.withLore(myItemLore);

Parameters:

lore Type: ItemLore

Return Type: ComponentAccess

withMapColor(rgb as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_color&gt; of the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapColor(rgb as int) as ComponentAccess;
myMCItemStackMutable.withMapColor(0xFF0000);

Parameters:

rgb Type: int - The new map colour

Return Type: ComponentAccess

withMapColor(color as MapItemColor) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_color&gt; of the ComponentAccess to have the given MapItemColor

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapColor(color as MapItemColor) as ComponentAccess;
myMCItemStackMutable.withMapColor(myMapItemColor);

Parameters:

color Type: MapItemColor

Return Type: ComponentAccess

withMapDecorations(decorations as Entry[string]) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_decorations&gt; of the ComponentAccess to have the given values.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapDecorations(decorations as Entry[string]) as ComponentAccess;
myMCItemStackMutable.withMapDecorations(myMap);

Parameters:

decorations Type: MapDecorationsEntry[string]

Return Type: ComponentAccess

withMapDecorations(decorations as MapDecorations) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_decorations&gt; of the ComponentAccess to have the given MapDecorations

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapDecorations(decorations as MapDecorations) as ComponentAccess;
myMCItemStackMutable.withMapDecorations(myMapDecorations);

Parameters:

decorations Type: MapDecorations

Return Type: ComponentAccess

withMapId(id as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_id&gt; of the ComponentAccess to have the given value.
A map id is only useful after the game generates one to store data. Therefore, you should always pass in the parameter for an id you know is available.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapId(id as int) as ComponentAccess;
myMCItemStackMutable.withMapId(myInt);

Parameters:

id Type: int

Return Type: ComponentAccess

withMapId(mapId as MapId) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_id&gt; of the ComponentAccess to have the given MapId

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapId(mapId as MapId) as ComponentAccess;
myMCItemStackMutable.withMapId(myMapId);

Parameters:

mapId Type: MapId

Return Type: ComponentAccess

withMapPostProcessing(value as MapPostProcessing) as ComponentAccess
Sets the &lt;componenttype:minecraft:map_post_processing&gt; of the ComponentAccess to have the given MapPostProcessing

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMapPostProcessing(value as MapPostProcessing) as ComponentAccess;
myMCItemStackMutable.withMapPostProcessing(myMapPostProcessing);

Parameters:

Return Type: ComponentAccess

withMaxDamage(maxDamage as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:max_damage&gt; of the ComponentAccess to have the given value.
It is likely that you need to call withDamage(0) in order for some things to function properly.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMaxDamage(maxDamage as int) as ComponentAccess;
myMCItemStackMutable.withMaxDamage(1024);

Parameters:

maxDamage Type: int

Return Type: ComponentAccess

withMaxStackSize(maxStackSize as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:stack_size&gt; of the ComponentAccess to have the given value. Non standard stack sizes may render differently and may not be handled correctly by all mods. Test your changes!

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withMaxStackSize(maxStackSize as int) as ComponentAccess;
myMCItemStackMutable.withMaxStackSize(16);

Parameters:

maxStackSize Type: int - The new maxStackSize of the ComponentAccess.

Return Type: ComponentAccess

withNoteBlockSound(sound as ResourceLocation) as ComponentAccess
Sets the &lt;componenttype:minecraft:note_block_sound&gt; of the ComponentAccess to have the given ResourceLocation

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withNoteBlockSound(sound as ResourceLocation) as ComponentAccess;
myMCItemStackMutable.withNoteBlockSound(myResourceLocation);

Parameters:

Return Type: ComponentAccess

withOminousBottleAmplifier(amplifier as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:ominous_bottle_amplifier&gt; of the ComponentAccess to have the given amplifier.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withOminousBottleAmplifier(amplifier as int) as ComponentAccess;
myMCItemStackMutable.withOminousBottleAmplifier(myInt);

Parameters:

amplifier Type: int

Return Type: ComponentAccess

without(type as DataComponentType<T>) as IItemStack
script.zs
// MCItemStackMutable.without<T>(type as DataComponentType<T>) as IItemStack;
myMCItemStackMutable.without<T>(myDataComponentType);

Parameters:

Return Type: IItemStack

withoutAttributeModifiers() as ComponentAccess
Removes the &lt;componenttype:minecraft:attribute_modifiers&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutAttributeModifiers() as ComponentAccess;
myMCItemStackMutable.withoutAttributeModifiers();

Return Type: ComponentAccess

withoutBannerPatterns() as ComponentAccess
Removes the &lt;componenttype:minecraft:banner_patterns&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBannerPatterns() as ComponentAccess;
myMCItemStackMutable.withoutBannerPatterns();

Return Type: ComponentAccess

withoutBaseColor() as ComponentAccess
Removes the &lt;componenttype:minecraft:base_color&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBaseColor() as ComponentAccess;
myMCItemStackMutable.withoutBaseColor();

Return Type: ComponentAccess

withoutBees() as ComponentAccess
Removes the &lt;componenttype:minecraft:bees&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBees() as ComponentAccess;
myMCItemStackMutable.withoutBees();

Return Type: ComponentAccess

withoutBlockEntityData() as ComponentAccess
Removes the &lt;componenttype:minecraft:block_entity_data&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBlockEntityData() as ComponentAccess;
myMCItemStackMutable.withoutBlockEntityData();

Return Type: ComponentAccess

withoutBlockState() as ComponentAccess
Removes the &lt;componenttype:minecraft:block_state&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBlockState() as ComponentAccess;
myMCItemStackMutable.withoutBlockState();

Return Type: ComponentAccess

withoutBucketEntityData() as ComponentAccess
Removes the &lt;componenttype:minecraft:bucket_entity_data&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBucketEntityData() as ComponentAccess;
myMCItemStackMutable.withoutBucketEntityData();

Return Type: ComponentAccess

withoutBundleContents() as ComponentAccess
Removes the &lt;componenttype:minecraft:bundle_contents&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutBundleContents() as ComponentAccess;
myMCItemStackMutable.withoutBundleContents();

Return Type: ComponentAccess

withoutCanBreak() as ComponentAccess
Removes the &lt;componenttype:minecraft:can_break&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutCanBreak() as ComponentAccess;
myMCItemStackMutable.withoutCanBreak();

Return Type: ComponentAccess

withoutCanPlaceOn() as ComponentAccess
Removes the &lt;componenttype:minecraft:can_place_on&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutCanPlaceOn() as ComponentAccess;
myMCItemStackMutable.withoutCanPlaceOn();

Return Type: ComponentAccess

withoutChargedProjectiles() as ComponentAccess
Removes the &lt;componenttype:minecraft:charged_projectiles&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutChargedProjectiles() as ComponentAccess;
myMCItemStackMutable.withoutChargedProjectiles();

Return Type: ComponentAccess

withoutContainer() as ComponentAccess
Removes the &lt;componenttype:minecraft:container&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutContainer() as ComponentAccess;
myMCItemStackMutable.withoutContainer();

Return Type: ComponentAccess

withoutContainerLoot() as ComponentAccess
Removes the &lt;componenttype:minecraft:container_loot&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutContainerLoot() as ComponentAccess;
myMCItemStackMutable.withoutContainerLoot();

Return Type: ComponentAccess

withoutCreativeSlotLock() as ComponentAccess
Removes the &lt;componenttype:minecraft:creative_slot_lock&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutCreativeSlotLock() as ComponentAccess;
myMCItemStackMutable.withoutCreativeSlotLock();

Return Type: ComponentAccess

withoutCustomData() as ComponentAccess
Removes the &lt;componenttype:minecraft:custom_data&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutCustomData() as ComponentAccess;
myMCItemStackMutable.withoutCustomData();

Return Type: ComponentAccess

withoutCustomModelData() as ComponentAccess
Removes the &lt;componenttype:minecraft:custom_model_data&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutCustomModelData() as ComponentAccess;
myMCItemStackMutable.withoutCustomModelData();

Return Type: ComponentAccess

withoutCustomName() as ComponentAccess
Removes the &lt;componenttype:minecraft:custom_name&gt; from the ComponentAccess

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutCustomName() as ComponentAccess;
myMCItemStackMutable.withoutCustomName();

Return Type: ComponentAccess

withoutDamage() as ComponentAccess
Removes the &lt;componenttype:minecraft:damage&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutDamage() as ComponentAccess;
myMCItemStackMutable.withoutDamage();

Return Type: ComponentAccess

withoutDebugStickState() as ComponentAccess
Removes the &lt;componenttype:minecraft:debug_stick_state&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutDebugStickState() as ComponentAccess;
myMCItemStackMutable.withoutDebugStickState();

Return Type: ComponentAccess

withoutDyedColor() as ComponentAccess
Removes the &lt;componenttype:minecraft:dyed_color&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutDyedColor() as ComponentAccess;
myMCItemStackMutable.withoutDyedColor();

Return Type: ComponentAccess

withoutEnchantment(enchantment as Enchantment) as ComponentAccess
Removes the Enchantment from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutEnchantment(enchantment as Enchantment) as ComponentAccess;
myMCItemStackMutable.withoutEnchantment(<enchantment:minecraft:mending>);

Parameters:

enchantment Type: Enchantment - The Enchantment to remove

Return Type: ComponentAccess

withoutEnchantmentGlintOverride() as ComponentAccess
Removes the &lt;componenttype:minecraft:enchantment_glint_override&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutEnchantmentGlintOverride() as ComponentAccess;
myMCItemStackMutable.withoutEnchantmentGlintOverride();

Return Type: ComponentAccess

withoutEnchantments() as ComponentAccess
Removes the &lt;componenttype:minecraft:enchantments&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutEnchantments() as ComponentAccess;
myMCItemStackMutable.withoutEnchantments();

Return Type: ComponentAccess

withoutEntityDate() as ComponentAccess
Removes the &lt;componenttype:minecraft:entity_data&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutEntityDate() as ComponentAccess;
myMCItemStackMutable.withoutEntityDate();

Return Type: ComponentAccess

withoutFireResistant() as ComponentAccess
Removes the &lt;componenttype:minecraft:fire_resistant&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutFireResistant() as ComponentAccess;
myMCItemStackMutable.withoutFireResistant();

Return Type: ComponentAccess

withoutFireworkExplosion() as ComponentAccess
Removes the &lt;componenttype:minecraft:firework_explosion&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutFireworkExplosion() as ComponentAccess;
myMCItemStackMutable.withoutFireworkExplosion();

Return Type: ComponentAccess

withoutFireworks() as ComponentAccess
Removes the &lt;componenttype:minecraft:fireworks&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutFireworks() as ComponentAccess;
myMCItemStackMutable.withoutFireworks();

Return Type: ComponentAccess

withoutFood() as ComponentAccess
Removes the &lt;componenttype:minecraft:food&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutFood() as ComponentAccess;
myMCItemStackMutable.withoutFood();

Return Type: ComponentAccess

withoutHideAdditionalTooltip() as ComponentAccess
Removes the &lt;componenttype:minecraft:hide_additional_tooltip&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutHideAdditionalTooltip() as ComponentAccess;
myMCItemStackMutable.withoutHideAdditionalTooltip();

Return Type: ComponentAccess

withoutHideTooltip() as ComponentAccess
Removes the &lt;componenttype:minecraft:hide_tooltip&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutHideTooltip() as ComponentAccess;
myMCItemStackMutable.withoutHideTooltip();

Return Type: ComponentAccess

withoutInstrument() as ComponentAccess
Removes the &lt;componenttype:minecraft:instrument&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutInstrument() as ComponentAccess;
myMCItemStackMutable.withoutInstrument();

Return Type: ComponentAccess

withoutIntangibleProjectile() as ComponentAccess
Removes the &lt;componenttype:minecraft:intangible_projectile&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutIntangibleProjectile() as ComponentAccess;
myMCItemStackMutable.withoutIntangibleProjectile();

Return Type: ComponentAccess

withoutItemName() as ComponentAccess
Removes the &lt;componenttype:minecraft:item_name&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutItemName() as ComponentAccess;
myMCItemStackMutable.withoutItemName();

Return Type: ComponentAccess

withoutLock() as ComponentAccess
Removes the &lt;componenttype:minecraft:lock&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutLock() as ComponentAccess;
myMCItemStackMutable.withoutLock();

Return Type: ComponentAccess

withoutLodestoneTracker() as ComponentAccess
Removes the &lt;componenttype:minecraft:lodestone_tracker&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutLodestoneTracker() as ComponentAccess;
myMCItemStackMutable.withoutLodestoneTracker();

Return Type: ComponentAccess

withoutLore() as ComponentAccess
Removes the &lt;componenttype:minecraft:lore&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutLore() as ComponentAccess;
myMCItemStackMutable.withoutLore();

Return Type: ComponentAccess

withoutMapColor() as ComponentAccess
Removes the &lt;componenttype:minecraft:map_color&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutMapColor() as ComponentAccess;
myMCItemStackMutable.withoutMapColor();

Return Type: ComponentAccess

withoutMapDecorations() as ComponentAccess
Removes the &lt;componenttype:minecraft:map_decorations&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutMapDecorations() as ComponentAccess;
myMCItemStackMutable.withoutMapDecorations();

Return Type: ComponentAccess

withoutMapId() as ComponentAccess
Removes the &lt;componenttype:minecraft:map_id&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutMapId() as ComponentAccess;
myMCItemStackMutable.withoutMapId();

Return Type: ComponentAccess

withoutMapPostProcessing() as ComponentAccess
Removes the &lt;componenttype:minecraft:map_post_processing&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutMapPostProcessing() as ComponentAccess;
myMCItemStackMutable.withoutMapPostProcessing();

Return Type: ComponentAccess

withoutMaxDamage() as ComponentAccess
Removes the &lt;componenttype:minecraft:max_damage&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutMaxDamage() as ComponentAccess;
myMCItemStackMutable.withoutMaxDamage();

Return Type: ComponentAccess

withoutMaxStackSize() as ComponentAccess
Removes the &lt;componenttype:minecraft:stack_size&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutMaxStackSize() as ComponentAccess;
myMCItemStackMutable.withoutMaxStackSize();

Return Type: ComponentAccess

withoutNoteBlockSound() as ComponentAccess
Removes the &lt;componenttype:minecraft:note_block_sound&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutNoteBlockSound() as ComponentAccess;
myMCItemStackMutable.withoutNoteBlockSound();

Return Type: ComponentAccess

withoutOminousBottleAmplifier() as ComponentAccess
Removes the &lt;componenttype:minecraft:ominous_bottle_amplifier&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutOminousBottleAmplifier() as ComponentAccess;
myMCItemStackMutable.withoutOminousBottleAmplifier();

Return Type: ComponentAccess

withoutPotDecorations() as ComponentAccess
Removes the &lt;componenttype:minecraft:pot_decorations&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutPotDecorations() as ComponentAccess;
myMCItemStackMutable.withoutPotDecorations();

Return Type: ComponentAccess

withoutPotionContents() as ComponentAccess
Removes the &lt;componenttype:minecraft:potion_contents&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutPotionContents() as ComponentAccess;
myMCItemStackMutable.withoutPotionContents();

Return Type: ComponentAccess

withoutProfile() as ComponentAccess
Removes the &lt;componenttype:minecraft:profile&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutProfile() as ComponentAccess;
myMCItemStackMutable.withoutProfile();

Return Type: ComponentAccess

withoutRarity() as ComponentAccess
Removes the &lt;componenttype:minecraft:rarity&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutRarity() as ComponentAccess;
myMCItemStackMutable.withoutRarity();

Return Type: ComponentAccess

withoutRecipes() as ComponentAccess
Removes the &lt;componenttype:minecraft:recipes&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutRecipes() as ComponentAccess;
myMCItemStackMutable.withoutRecipes();

Return Type: ComponentAccess

withoutRepairCost() as ComponentAccess
Removes the &lt;componenttype:minecraft:repair_cost&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutRepairCost() as ComponentAccess;
myMCItemStackMutable.withoutRepairCost();

Return Type: ComponentAccess

withoutStoredEnchantments() as ComponentAccess
Removes the &lt;componenttype:minecraft:stored_enchantments&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutStoredEnchantments() as ComponentAccess;
myMCItemStackMutable.withoutStoredEnchantments();

Return Type: ComponentAccess

withoutSuspiciousStewEffects() as ComponentAccess
Removes the &lt;componenttype:minecraft:suspicious_stew_effects&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutSuspiciousStewEffects() as ComponentAccess;
myMCItemStackMutable.withoutSuspiciousStewEffects();

Return Type: ComponentAccess

withoutTool() as ComponentAccess
Removes the &lt;componenttype:minecraft:tool&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutTool() as ComponentAccess;
myMCItemStackMutable.withoutTool();

Return Type: ComponentAccess

withoutTrim() as ComponentAccess
Removes the &lt;componenttype:minecraft:trim&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutTrim() as ComponentAccess;
myMCItemStackMutable.withoutTrim();

Return Type: ComponentAccess

withoutUnbreakable() as ComponentAccess
Removes the &lt;componenttype:minecraft:unbreakable&gt; from the ComponentAccess

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutUnbreakable() as ComponentAccess;
myMCItemStackMutable.withoutUnbreakable();

Return Type: ComponentAccess

withoutWritableBookContent() as ComponentAccess
Removes the &lt;componenttype:minecraft:writable_book_content&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutWritableBookContent() as ComponentAccess;
myMCItemStackMutable.withoutWritableBookContent();

Return Type: ComponentAccess

withoutWrittenBookContent() as ComponentAccess
Removes the &lt;componenttype:minecraft:written_book_content&gt; from the ComponentAccess.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withoutWrittenBookContent() as ComponentAccess;
myMCItemStackMutable.withoutWrittenBookContent();

Return Type: ComponentAccess

withPotDecorations(back as Item, left as Item, right as Item, front as Item) as ComponentAccess
Sets the &lt;componenttype:minecraft:pot_decorations&gt; of the ComponentAccess to have the given items.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withPotDecorations(back as Item, left as Item, right as Item, front as Item) as ComponentAccess;
myMCItemStackMutable.withPotDecorations(myItem, myItem, myItem, myItem);

Return Type: ComponentAccess

withPotDecorations(decorations as PotDecorations) as ComponentAccess
Sets the &lt;componenttype:minecraft:pot_decorations&gt; of the ComponentAccess to have the given PotDecorations

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withPotDecorations(decorations as PotDecorations) as ComponentAccess;
myMCItemStackMutable.withPotDecorations(myPotDecorations);

Parameters:

decorations Type: PotDecorations

Return Type: ComponentAccess

withPotionContents(potion as Potion) as ComponentAccess
Sets the &lt;componenttype:minecraft:potion_contents&gt; of the ComponentAccess to have the given Potion
and no custom effects

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withPotionContents(potion as Potion) as ComponentAccess;
myMCItemStackMutable.withPotionContents(<potion:minecraft:swiftness>);

Parameters:

potion Type: Potion - The potion to store within

Return Type: ComponentAccess

withPotionContents(potion as Potion, customEffects as List<MobEffectInstance>) as ComponentAccess
Sets the &lt;componenttype:minecraft:potion_contents&gt; of the ComponentAccess to have the given Potion
and the given MobEffectInstance effects.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withPotionContents(potion as Potion, customEffects as List<MobEffectInstance>) as ComponentAccess;
myMCItemStackMutable.withPotionContents(<potion:minecraft:swiftness>, [MobEffectInstance.of(<mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]);

Parameters:

potion Type: Potion - The potion to store within.
customEffects Type: List<MobEffectInstance> - The effects to grant upon consuming this potion.

Return Type: ComponentAccess

withPotionContents(potion as Potion, customColor as int, customEffects as List<MobEffectInstance>) as ComponentAccess
Sets the &lt;componenttype:minecraft:potion_contents&gt; of the ComponentAccess to have the given Potion
and the given MobEffectInstance effects.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withPotionContents(potion as Potion, customColor as int, customEffects as List<MobEffectInstance>) as ComponentAccess;
myMCItemStackMutable.withPotionContents(<potion:minecraft:swiftness>, 0xFFFFFF00, [MobEffectInstance.of(<mobeffect:minecraft:strength>, 20 * 20, 1, false, false, true)]);

Parameters:

potion Type: Potion - The potion to store within.
customColor Type: int - The ARGB color the potion will have.
customEffects Type: List<MobEffectInstance> - The effects to grant upon consuming this potion.

Return Type: ComponentAccess

withPotionContents(contents as PotionContents) as ComponentAccess
Sets the &lt;componenttype:minecraft:potion_contents&gt; of the ComponentAccess to have the given PotionContents

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withPotionContents(contents as PotionContents) as ComponentAccess;
myMCItemStackMutable.withPotionContents(myPotionContents);

Parameters:

contents Type: PotionContents

Return Type: ComponentAccess

withProfile(profile as ResolvableProfile) as ComponentAccess
Sets the &lt;componenttype:minecraft:profile&gt; of the ComponentAccess to have the given ResolvableProfile

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withProfile(profile as ResolvableProfile) as ComponentAccess;
myMCItemStackMutable.withProfile(myResolvableProfile);

Parameters:

Return Type: ComponentAccess

withRarity(rarity as Rarity) as ComponentAccess
Sets the &lt;componenttype:minecraft:rarity&gt; of the ComponentAccess to have the given Rarity

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withRarity(rarity as Rarity) as ComponentAccess;
myMCItemStackMutable.withRarity(<constant:minecraft:item/rarity:epic>);

Parameters:

rarity Type: Rarity - The rarity to set

Return Type: ComponentAccess

withRecipes(recipes as List<ResourceLocation>) as ComponentAccess
Sets the &lt;componenttype:minecraft:recipes&gt; of the ComponentAccess to have the given List<ResourceLocation>

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withRecipes(recipes as List<ResourceLocation>) as ComponentAccess;
myMCItemStackMutable.withRecipes(myList);

Parameters:

recipes Type: List<ResourceLocation>

Return Type: ComponentAccess

withRepairCost(cost as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:repair_cost&gt; of the ComponentAccess to have the given value.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withRepairCost(cost as int) as ComponentAccess;
myMCItemStackMutable.withRepairCost(20);

Parameters:

cost Type: int - The repair cost

Return Type: ComponentAccess

withStoredEnchantments(enchantments as ItemEnchantments) as ComponentAccess
Sets the &lt;componenttype:minecraft:stored_enchantments&gt; of the ComponentAccess to have the given ItemEnchantments

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withStoredEnchantments(enchantments as ItemEnchantments) as ComponentAccess;
myMCItemStackMutable.withStoredEnchantments(myItemEnchantments);

Parameters:

enchantments Type: ItemEnchantments

Return Type: ComponentAccess

withSuspiciousStewEffects(effects as List<Entry>) as ComponentAccess
Sets the &lt;componenttype:minecraft:suspicious_stew_effects&gt; of the ComponentAccess to have the given SuspiciousStewEffects
SuspiciousStewEffects.Entry is effectively a pair of Effect and duration.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withSuspiciousStewEffects(effects as List<Entry>) as ComponentAccess;
myMCItemStackMutable.withSuspiciousStewEffects(myList);

Parameters:

effects Type: List<SuspiciousStewEffectsEntry> - The list of effects to grant on consumption.

Return Type: ComponentAccess

withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess
Sets the &lt;componenttype:minecraft:suspicious_stew_effects&gt; of the ComponentAccess to have the given SuspiciousStewEffects

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;
myMCItemStackMutable.withSuspiciousStewEffects(mySuspiciousStewEffects);

Parameters:

suspiciousStewEffects Type: SuspiciousStewEffects

Return Type: ComponentAccess

withTool(rules as List<Rule>, defaultMiningSpeed as float, damagePerBlock as int) as ComponentAccess
Sets the &lt;componenttype:minecraft:tool&gt; of the ComponentAccess to have the given data. A Tool instance is constructed from the parameters.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withTool(rules as List<Rule>, defaultMiningSpeed as float, damagePerBlock as int) as ComponentAccess;
myMCItemStackMutable.withTool([ToolRule.minesAndDrops(<tag:blocks:minecraft:planks>, 6.0f)], 0.25f, 1);

Parameters:

rules Type: List<ToolRule> - The list of rules the new Tool instance will have
defaultMiningSpeed Type: float - The default mining speed of the new tool
damagePerBlock Type: int - The damage or durability that is dealt to the Tool after use.

Return Type: ComponentAccess

withTool(tool as Tool) as ComponentAccess
Sets the &lt;componenttype:minecraft:tool&gt; of the ComponentAccess to have the given Tool

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withTool(tool as Tool) as ComponentAccess;
myMCItemStackMutable.withTool(myTool);

Parameters:

tool Type: Tool

Return Type: ComponentAccess

withTrim(trim as ArmorTrim) as ComponentAccess
Sets the &lt;componenttype:minecraft:trim&gt; of the ComponentAccess to have the given ArmorTrim

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withTrim(trim as ArmorTrim) as ComponentAccess;
myMCItemStackMutable.withTrim(myArmorTrim);

Parameters:

trim Type: ArmorTrim

Return Type: ComponentAccess

withUnbreakable(showInTooltip as bool = true) as ComponentAccess
Sets the &lt;componenttype:minecraft:unbreakable&gt; of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withUnbreakable(showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable.withUnbreakable(myBool);

Parameters:

showInTooltip (optional) Type: bool - Whether to show that the ComponentAccess is unbreakable in a tooltip.

Default Value: true

Return Type: ComponentAccess

withUnbreakable(unbreakable as Unbreakable) as ComponentAccess
Sets the &lt;componenttype:minecraft:unbreakable&gt; of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable.

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withUnbreakable(unbreakable as Unbreakable) as ComponentAccess;
myMCItemStackMutable.withUnbreakable(myUnbreakable);

Parameters:

unbreakable Type: Unbreakable - The Unbreakable instance with the configured values.

Return Type: ComponentAccess

withWritableBookContent(pages as List<Filterable<string>>) as ComponentAccess

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withWritableBookContent(pages as List<Filterable<string>>) as ComponentAccess;
myMCItemStackMutable.withWritableBookContent(myList);

Parameters:

pages Type: List<Filterable<string>>

Return Type: ComponentAccess

withWritableBookContent(content as WritableBookContent) as ComponentAccess
Sets the &lt;componenttype:minecraft:writable_book_content&gt; of the ComponentAccess to have the given WritableBookContent

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withWritableBookContent(content as WritableBookContent) as ComponentAccess;
myMCItemStackMutable.withWritableBookContent(myWritableBookContent);

Parameters:

Return Type: ComponentAccess

withWrittenBookContent(content as WrittenBookContent) as ComponentAccess
Sets the &lt;componenttype:minecraft:written_book_content&gt; of the ComponentAccess to have the given WrittenBookContent

Returns: The new instance with the modified data.

script.zs
// MCItemStackMutable.withWrittenBookContent(content as WrittenBookContent) as ComponentAccess;
myMCItemStackMutable.withWrittenBookContent(myWrittenBookContent);

Parameters:

Return Type: ComponentAccess

Getter
Gets the data in &lt;componenttype:minecraft:writable_book_content&gt;
script.zs
// MCItemStackMutable.writableBookContent as WritableBookContent
myMCItemStackMutable.writableBookContent

Return Type: WritableBookContent

Getter
Gets the data in &lt;componenttype:minecraft:written_book_content&gt;
script.zs
// MCItemStackMutable.writtenBookContent as WrittenBookContent
myMCItemStackMutable.writtenBookContent

Return Type: WrittenBookContent