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.
import crafttweaker . api.item . MCItemStackMutable;
MCItemStackMutable
implements the following interfaces:
NeoForgeItemStack
,IItemStack
,IIngredient
,IIngredientWithAmount
,DataComponentHolder
,ComponentAccess <IItemStack >
,CommandStringDisplayable
Undocumented Interfaces IDataComponentHolderExtension
Does the ingredient contain the given ingredient? // ((ingredient as IIngredient) in MCItemStackMutable) as bool
myIIngredient in myMCItemStackMutable
Return Type:
bool
// (MCItemStackMutable == (o as Object)) as bool
myMCItemStackMutable == myObject
Return Type:
bool
Use this in contexts where machines accept more than one item to state that fact. // (MCItemStackMutable * (amount as int)) as IIngredientWithAmount
myMCItemStackMutable * myInt
Return Type:
IIngredientWithAmount
// (MCItemStackMutable | (other as IIngredient)) as IIngredientList
myMCItemStackMutable | myIIngredient
Return Type:
IIngredientList
// (MCItemStackMutable % (percentage as double)) as Percentaged<IItemStack>
myMCItemStackMutable % myDouble
Parameters:
percentage: double
Type: double
Return Type:
Percentaged <IItemStack >
Sets the amount of the ItemStack // (MCItemStackMutable * (amount as int)) as IItemStack
myMCItemStackMutable * myInt
Parameters:
amount: int
Type: int
- new amount
Return Type:
IItemStack
Adds an AttributeModifier to this IIngredient using a specific UUID. The id can be used to override an existing attribute on an ItemStack with this new modifier. You can use /ct hand attributes
to get the id 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 // MCItemStackMutable.addGlobalAttributeModifier(attribute as Attribute, id as ResourceLocation, value as double, operation as Operation, slotTypes as EquipmentSlot[]);
myMCItemStackMutable . addGlobalAttributeModifier( < attribute : minecraft:generic.attack_damage > , myResourceLocation, 10 , AttributeOperation . ADDITION, [ < constant : minecraft:equipmentslot:chest > ]);
Parameters:
value: double
Type: double
- The value of the modifier.
// MCItemStackMutable.addShiftTooltip(content as Component, showMessage as Component = null);
myMCItemStackMutable . addShiftTooltip(myComponent, myComponent);
// MCItemStackMutable.addTooltip(content as Component);
myMCItemStackMutable . addTooltip(myComponent);
Gets the amount of Items in the ItemStack // MCItemStackMutable.amount as int
myMCItemStackMutable . amount
Return Type:
int
Gets the amount of Items in the ItemStack // MCItemStackMutable.amount as int
myMCItemStackMutable . amount
Return Type:
int
// MCItemStackMutable.anyDamage() as IIngredient;
myMCItemStackMutable . anyDamage();
Return Type:
IIngredient
// MCItemStackMutable.applyComponents(map as DataComponentMap) as IItemStack;
myMCItemStackMutable . applyComponents(myDataComponentMap);
Return Type:
IItemStack
// MCItemStackMutable.applyComponents(patch as DataComponentPatch) as IItemStack;
myMCItemStackMutable . applyComponents(myDataComponentPatch);
Return Type:
IItemStack
// MCItemStackMutable.applyComponentsAndValidate(patch as DataComponentPatch) as IItemStack;
myMCItemStackMutable . applyComponentsAndValidate(myDataComponentPatch);
Return Type:
IItemStack
// MCItemStackMutable.asIData() as IData;
myMCItemStackMutable . asIData();
Return Type:
IData
// MCItemStackMutable as IData
myMCItemStackMutable as IData
Return Type:
IData
// MCItemStackMutable as IData
myMCItemStackMutable as IData
Return Type:
IData
// MCItemStackMutable.asIIngredientWithAmount() as IIngredientWithAmount;
myMCItemStackMutable . asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. // MCItemStackMutable.asIIngredientWithAmount() as IIngredientWithAmount;
myMCItemStackMutable . asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
// MCItemStackMutable as IIngredientWithAmount
myMCItemStackMutable as IIngredientWithAmount
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. // MCItemStackMutable as IIngredientWithAmount
myMCItemStackMutable as IIngredientWithAmount
Return Type:
IIngredientWithAmount
// MCItemStackMutable.asItemLike() as ItemLike;
myMCItemStackMutable . asItemLike();
Return Type:
ItemLike
// MCItemStackMutable as ItemLike
myMCItemStackMutable as ItemLike
Return Type:
ItemLike
// MCItemStackMutable as MapData
myMCItemStackMutable as MapData
Return Type:
MapData
Create a Vanilla ingredient matching this one. // MCItemStackMutable.asVanillaIngredient() as Ingredient;
myMCItemStackMutable . asVanillaIngredient();
Return Type:
Ingredient
Create a Vanilla ingredient matching this one. // MCItemStackMutable as Ingredient
myMCItemStackMutable as Ingredient
Return Type:
Ingredient
// MCItemStackMutable as Percentaged<IItemStack>
myMCItemStackMutable as Percentaged < IItemStack>
Return Type:
Percentaged <IItemStack >
Gets the data in <componenttype:minecraft:attribute_modifiers> // MCItemStackMutable.attributeModifiers as ItemAttributeModifiers
myMCItemStackMutable . attributeModifiers
Return Type:
ItemAttributeModifiers
Gets the data in <componenttype:minecraft:banner_patterns> // MCItemStackMutable.bannerPatterns as BannerPatternLayers
myMCItemStackMutable . bannerPatterns
Return Type:
BannerPatternLayers
// MCItemStackMutable.BASE_ATTACK_DAMAGE_ID as ResourceLocation
MCItemStackMutable . BASE_ATTACK_DAMAGE_ID
Return Type:
ResourceLocation
// MCItemStackMutable.BASE_ATTACK_SPEED_ID as ResourceLocation
MCItemStackMutable . BASE_ATTACK_SPEED_ID
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:base_color> // MCItemStackMutable.baseColor as DyeColor
myMCItemStackMutable . baseColor
Return Type:
DyeColor
Gets the data in <componenttype:minecraft:bees> // MCItemStackMutable.bees as List<Occupant>
myMCItemStackMutable . bees
Return Type:
List <BeehiveBlockEntityOccupant >
Gets the data in <componenttype:minecraft:block_entity_data> // MCItemStackMutable.blockEntityData as CustomData
myMCItemStackMutable . blockEntityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:block_state> // MCItemStackMutable.blockState as BlockItemStateProperties
myMCItemStackMutable . blockState
Return Type:
BlockItemStateProperties
Gets the data in <componenttype:minecraft:bucket_entity_data> // MCItemStackMutable.bucketEntityData as CustomData
myMCItemStackMutable . bucketEntityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:bundle_contents> // MCItemStackMutable.bundleContents as BundleContents
myMCItemStackMutable . bundleContents
Return Type:
BundleContents
// MCItemStackMutable.burnTime as int
myMCItemStackMutable . burnTime
Return Type:
int
Sets the burn time of this ingredient, for use in the furnace and other machines // MCItemStackMutable.burnTime = (time as int);
myMCItemStackMutable . burnTime = myInt;
Parameters:
time: int
Type: int
- the new burn time
Sets the burn time of this ingredient, for use in the furnace and other machines // MCItemStackMutable.burnTime(time as int);
myMCItemStackMutable . burnTime( 500 );
Parameters:
time: int
Type: int
- the new burn time
Gets the data in <componenttype:minecraft:can_break> // MCItemStackMutable.canBreak as AdventureModePredicate
myMCItemStackMutable . canBreak
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:can_place_on> // MCItemStackMutable.canPlaceOn as AdventureModePredicate
myMCItemStackMutable . canPlaceOn
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:charged_projectiles> // MCItemStackMutable.chargedProjectiles as ChargedProjectiles
myMCItemStackMutable . chargedProjectiles
Return Type:
ChargedProjectiles
// MCItemStackMutable.clearTooltip(leaveName as bool = false);
myMCItemStackMutable . clearTooltip(myBool);
Parameters:
leaveName: bool
(optional) Type: bool
Default Value: false
Returns the BEP to get this stack // MCItemStackMutable.commandString as string
myMCItemStackMutable . commandString
Return Type:
string
Returns the BEP to get this thingy // MCItemStackMutable.commandString as string
myMCItemStackMutable . commandString
Return Type:
string
Returns the BEP to get this thingy // MCItemStackMutable.commandString() as string;
myMCItemStackMutable . commandString();
Return Type:
string
// MCItemStackMutable.componentsPatch as DataComponentPatch
myMCItemStackMutable . componentsPatch
Return Type:
DataComponentPatch
Use this if you already have the condition from another ingredient // MCItemStackMutable.condition(condition as IIngredientCondition) as IIngredient;
myMCItemStackMutable . condition(myIIngredientCondition);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:container> // MCItemStackMutable.container as ItemContainerContents
myMCItemStackMutable . container
Return Type:
ItemContainerContents
Gets the data in <componenttype:minecraft:container_loot> // MCItemStackMutable.containerLoot as SeededContainerLoot
myMCItemStackMutable . containerLoot
Return Type:
SeededContainerLoot
Does the ingredient contain the given ingredient? // MCItemStackMutable.contains(ingredient as IIngredient) as bool;
myMCItemStackMutable . contains(( < item : minecraft:iron_ingot > | < item : minecraft:gold_ingot > ));
Return Type:
bool
// MCItemStackMutable.CRAFTTWEAKER_DATA_KEY as string
MCItemStackMutable . CRAFTTWEAKER_DATA_KEY
Return Type:
string
Gets the data in <componenttype:minecraft:creative_slot_lock> // MCItemStackMutable.creativeSlotLock as bool
myMCItemStackMutable . creativeSlotLock
Return Type:
bool
Gets the data in the <componenttype:minecraft:custom_data> // MCItemStackMutable.customData as CustomData
myMCItemStackMutable . customData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:custom_model_data> // MCItemStackMutable.customModelData as CustomModelData
myMCItemStackMutable . customModelData
Return Type:
CustomModelData
Gets the data in the <componenttype:minecraft:custom_name> A custom name is generally displayed in italics and controlled by the user. // MCItemStackMutable.customName as Component
myMCItemStackMutable . customName
Return Type:
Component
Gets the data in the <componenttype:minecraft:damage> // MCItemStackMutable.damage as int
myMCItemStackMutable . damage
Return Type:
int
Returns if the ItemStack is damageable I.E Swords and tools are damageable, sticks are not. // MCItemStackMutable.damageableItem as bool
myMCItemStackMutable . damageableItem
Return Type:
bool
Returns if the ItemStack is damaged I.E a Swords that is no at full durability is damaged. // MCItemStackMutable.damaged as bool
myMCItemStackMutable . damaged
Return Type:
bool
Gets the data in <componenttype:minecraft:debug_stick_state> // MCItemStackMutable.debugStickState as DebugStickState
myMCItemStackMutable . debugStickState
Return Type:
DebugStickState
// MCItemStackMutable.definition as Item
myMCItemStackMutable . definition
Return Type:
ItemDefinition
// MCItemStackMutable.definition() as Item;
myMCItemStackMutable . definition();
Return Type:
ItemDefinition
// MCItemStackMutable as Item
myMCItemStackMutable as Item
Return Type:
ItemDefinition
Returns the unlocalized Name of the Item in the ItemStack // MCItemStackMutable.descriptionId as string
myMCItemStackMutable . descriptionId
Return Type:
string
Gets the display name of the ItemStack // MCItemStackMutable.displayName as Component
myMCItemStackMutable . displayName
Return Type:
Component
Gets the data in <componenttype:minecraft:dye_color> // MCItemStackMutable.dyedColor as DyedItemColor
myMCItemStackMutable . dyedColor
Return Type:
DyedItemColor
Checks if this ingredient is empty. // MCItemStackMutable.empty as bool
myMCItemStackMutable . empty
Return Type:
bool
Checks if this ingredient is empty. Returns : true if empty, false otherwise
// MCItemStackMutable.empty() as bool;
myMCItemStackMutable . empty();
Return Type:
bool
Gets the data in <componenttype:minecraft:enchantment_glint_override> If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments. // MCItemStackMutable.enchantmentGlintOverride as bool
myMCItemStackMutable . enchantmentGlintOverride
Return Type:
bool
Gets the data in <componenttype:minecraft:enchantments> // MCItemStackMutable.enchantments as ItemEnchantments
myMCItemStackMutable . enchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:entity_data> // MCItemStackMutable.entityData as CustomData
myMCItemStackMutable . entityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:firework_explosion> // MCItemStackMutable.fireworkExplosion as FireworkExplosion
myMCItemStackMutable . fireworkExplosion
Return Type:
FireworkExplosion
Gets the data in <componenttype:minecraft:fireworks> // MCItemStackMutable.fireworks as Fireworks
myMCItemStackMutable . fireworks
Return Type:
Fireworks
Gets the data in <componenttype:minecraft:food> // MCItemStackMutable.food as FoodProperties
myMCItemStackMutable . food
Return Type:
FoodProperties
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.
// MCItemStackMutable.getAttributes(slotType as EquipmentSlot) as List<AttributeModifier>[Attribute];
myMCItemStackMutable . getAttributes( < constant : minecraft:equipmentslot:chest > );
Return Type:
List <AttributeModifier > [Attribute ]
// MCItemStackMutable.getBurnTime(manager as IRecipeManager<Recipe>) as int;
myMCItemStackMutable . getBurnTime(myIRecipeManager);
Return Type:
int
// MCItemStackMutable.getImmutableInternal() as ItemStack;
myMCItemStackMutable . getImmutableInternal();
Return Type:
ItemStack
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. // MCItemStackMutable.getRemainingItem(stack as IItemStack) as IItemStack;
myMCItemStackMutable . getRemainingItem( < item : minecraft:iron_ingot > );
Return Type:
IItemStack
Gets the use duration of the ItemStack for the given entity Returns : use duration
// MCItemStackMutable.getUseDuration(entity as LivingEntity) as int;
myMCItemStackMutable . getUseDuration(entity);
Return Type:
int
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.
// MCItemStackMutable.grow(amount as int = 1) as IItemStack;
myMCItemStackMutable . grow( 2 );
Parameters:
amount: int
(optional) Type: int
- The amount to grow by.
Default Value: 1
Return Type:
IItemStack
Checks whether the ComponentAccess has <componenttype:minecraft:attribute_modifiers> // MCItemStackMutable.hasAttributeModifiers as bool
myMCItemStackMutable . hasAttributeModifiers
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:banner_patterns> // MCItemStackMutable.hasBannerPatterns as bool
myMCItemStackMutable . hasBannerPatterns
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:base_color> Used for shield colouring. // MCItemStackMutable.hasBaseColor as bool
myMCItemStackMutable . hasBaseColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bees> // MCItemStackMutable.hasBees as bool
myMCItemStackMutable . hasBees
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:block_entity_data> // MCItemStackMutable.hasBlockEntityData as bool
myMCItemStackMutable . hasBlockEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:block_state> // MCItemStackMutable.hasBlockState as bool
myMCItemStackMutable . hasBlockState
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bucket_entity_data> // MCItemStackMutable.hasBucketEntityData as bool
myMCItemStackMutable . hasBucketEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bundle_contents> // MCItemStackMutable.hasBundleContents as bool
myMCItemStackMutable . hasBundleContents
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:can_break> // MCItemStackMutable.hasCanBreak as bool
myMCItemStackMutable . hasCanBreak
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:can_place_on> // MCItemStackMutable.hasCanPlaceOn as bool
myMCItemStackMutable . hasCanPlaceOn
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:charged_projectiles> This component is used for crossbows. // MCItemStackMutable.hasChargedProjectiles as bool
myMCItemStackMutable . hasChargedProjectiles
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:container> // MCItemStackMutable.hasContainer as bool
myMCItemStackMutable . hasContainer
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:container_loot> // MCItemStackMutable.hasContainerLoot as bool
myMCItemStackMutable . hasContainerLoot
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:custom_data> // MCItemStackMutable.hasCustomData as bool
myMCItemStackMutable . hasCustomData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:custom_model_data> // MCItemStackMutable.hasCustomModelData as bool
myMCItemStackMutable . hasCustomModelData
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:custom_name> // MCItemStackMutable.hasCustomName as bool
myMCItemStackMutable . hasCustomName
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:damage> // MCItemStackMutable.hasDamage as bool
myMCItemStackMutable . hasDamage
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:debug_stick_state> // MCItemStackMutable.hasDebugStickState as bool
myMCItemStackMutable . hasDebugStickState
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:dyed_color> // MCItemStackMutable.hasDyedColor as bool
myMCItemStackMutable . hasDyedColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:enchantment_glint_override> // MCItemStackMutable.hasEnchantmentGlintOverride as bool
myMCItemStackMutable . hasEnchantmentGlintOverride
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:enchantments> // MCItemStackMutable.hasEnchantments as bool
myMCItemStackMutable . hasEnchantments
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:entity_data> // MCItemStackMutable.hasEntityData as bool
myMCItemStackMutable . hasEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:firework_explosion> // MCItemStackMutable.hasFireworkExplosion as bool
myMCItemStackMutable . hasFireworkExplosion
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:fireworks> // MCItemStackMutable.hasFireworks as bool
myMCItemStackMutable . hasFireworks
Return Type:
bool
Returns true if this ItemStack has a foil effect. Foil is the glint / effect that is added to enchanted ItemStacks (and other items). // MCItemStackMutable.hasFoil as bool
myMCItemStackMutable . hasFoil
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:food> // MCItemStackMutable.hasFood as bool
myMCItemStackMutable . hasFood
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:instrument> // MCItemStackMutable.hasInstrument as bool
myMCItemStackMutable . hasInstrument
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:item_namegt; // MCItemStackMutable.hasItemName as bool
myMCItemStackMutable . hasItemName
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:lock> // MCItemStackMutable.hasLock as bool
myMCItemStackMutable . hasLock
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:lodestone_tracker> // MCItemStackMutable.hasLodestoneTracker as bool
myMCItemStackMutable . hasLodestoneTracker
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:lore> // MCItemStackMutable.hasLore as bool
myMCItemStackMutable . hasLore
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_color> // MCItemStackMutable.hasMapColor as bool
myMCItemStackMutable . hasMapColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_decorations> MapDecorations are additional elements that render on a map, such as waypoints. // MCItemStackMutable.hasMapDecorations as bool
myMCItemStackMutable . hasMapDecorations
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_id> // MCItemStackMutable.hasMapId as bool
myMCItemStackMutable . hasMapId
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_post_processing> This componenet stores additional info on the map, such as the scale or whether to lock it. // MCItemStackMutable.hasMapPostProcessing as bool
myMCItemStackMutable . hasMapPostProcessing
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:max_damage> // MCItemStackMutable.hasMaxDamage as bool
myMCItemStackMutable . hasMaxDamage
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:max_stack_size> // MCItemStackMutable.hasMaxStackSize as bool
myMCItemStackMutable . hasMaxStackSize
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:note_block_sound> // MCItemStackMutable.hasNoteBlockSound as bool
myMCItemStackMutable . hasNoteBlockSound
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:ominous_bottle_amplifier> // MCItemStackMutable.hasOminousBottleAmplifier as bool
myMCItemStackMutable . hasOminousBottleAmplifier
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:pot_decorations> // MCItemStackMutable.hasPotDecorations as bool
myMCItemStackMutable . hasPotDecorations
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:potion_contents> Stores Potion Data on an item. // MCItemStackMutable.hasPotionContents as bool
myMCItemStackMutable . hasPotionContents
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:profile> // MCItemStackMutable.hasProfile as bool
myMCItemStackMutable . hasProfile
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:rarity> // MCItemStackMutable.hasRarity as bool
myMCItemStackMutable . hasRarity
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:recipes> Used for Knowledge Books. // MCItemStackMutable.hasRecipes as bool
myMCItemStackMutable . hasRecipes
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:repair_cost> // MCItemStackMutable.hasRepairCost as bool
myMCItemStackMutable . hasRepairCost
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:stored_enchantments> 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. // MCItemStackMutable.hasStoredEnchantments as bool
myMCItemStackMutable . hasStoredEnchantments
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:suspicious_stew_effects> // MCItemStackMutable.hasSuspiciousStewEffects as bool
myMCItemStackMutable . hasSuspiciousStewEffects
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:tool> // MCItemStackMutable.hasTool as bool
myMCItemStackMutable . hasTool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:trim> // MCItemStackMutable.hasTrim as bool
myMCItemStackMutable . hasTrim
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:unbreakable> // MCItemStackMutable.hasUnbreakable as bool
myMCItemStackMutable . hasUnbreakable
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:writable_book_content> // MCItemStackMutable.hasWritableBookContent as bool
myMCItemStackMutable . hasWritableBookContent
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:written_book_content> // MCItemStackMutable.hasWrittenBookContent as bool
myMCItemStackMutable . hasWrittenBookContent
Return Type:
bool
Gets the data in <componenttype:minecraft:hide_additional_tooltip> // MCItemStackMutable.hideAdditionalTooltip as bool
myMCItemStackMutable . hideAdditionalTooltip
Return Type:
bool
Gets the data in <componenttype:minecraft:hide_tooltip> // MCItemStackMutable.hideTooltip as bool
myMCItemStackMutable . hideTooltip
Return Type:
bool
Gets the hover name of the ItemStack. This will give the raw name without the formatting that 'displayName' applies.
// MCItemStackMutable.hoverName as Component
myMCItemStackMutable . hoverName
Return Type:
Component
The backing ingredient // MCItemStackMutable.ingredient as IIngredient
myMCItemStackMutable . ingredient
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:instrument> // MCItemStackMutable.instrument as Instrument
myMCItemStackMutable . instrument
Return Type:
Instrument
Can this ItemStack be enchanted? // MCItemStackMutable.isEnchantable as bool
myMCItemStackMutable . isEnchantable
Return Type:
bool
Gets the data in <componenttype:minecraft:fire_resistant> // MCItemStackMutable.isFireResistant as bool
myMCItemStackMutable . isFireResistant
Return Type:
bool
Gets the data in <componenttype:minecraft:intangible_projectile> // MCItemStackMutable.isIntangibleProjectile as bool
myMCItemStackMutable . isIntangibleProjectile
Return Type:
bool
// MCItemStackMutable.isMutable as bool
myMCItemStackMutable . isMutable
Return Type:
bool
// MCItemStackMutable.isMutable() as bool;
myMCItemStackMutable . isMutable();
Return Type:
bool
Gets the data in the <componenttype:minecraft:custom_name> 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. // MCItemStackMutable.itemName as Component
myMCItemStackMutable . itemName
Return Type:
Component
Gets the data in <componenttype:minecraft:lock> // MCItemStackMutable.lockComponent as LockCode
myMCItemStackMutable . lockComponent
Return Type:
LockCode
Gets the data in <componenttype:minecraft:lodestone_tracker> // MCItemStackMutable.lodestoneTracker as LodestoneTracker
myMCItemStackMutable . lodestoneTracker
Return Type:
LodestoneTracker
Gets the data in the <componenttype:minecraft:lore> // MCItemStackMutable.lore as ItemLore
myMCItemStackMutable . lore
Return Type:
ItemLore
Gets the data in <componenttype:minecraft:map_color> // MCItemStackMutable.mapColor as MapItemColor
myMCItemStackMutable . mapColor
Return Type:
MapItemColor
Gets the data in <componenttype:minecraft:map_decorations> // MCItemStackMutable.mapDecorations as MapDecorations
myMCItemStackMutable . mapDecorations
Return Type:
MapDecorations
Gets the data in <componenttype:minecraft:map_id> // MCItemStackMutable.mapId as MapId
myMCItemStackMutable . mapId
Return Type:
MapId
Gets the data in <componenttype:minecraft:map_post_processing> // MCItemStackMutable.mapPostProcessing as MapPostProcessing
myMCItemStackMutable . mapPostProcessing
Return Type:
MapPostProcessing
Does the given stack match the ingredient? // MCItemStackMutable.matches(stack as IItemStack) as bool;
myMCItemStackMutable . matches( < item : minecraft:iron_ingot > );
Return Type:
bool
Returns the max damage of the ItemStack This is the max durability of the ItemStack. // MCItemStackMutable.maxDamage as int
myMCItemStackMutable . maxDamage
Return Type:
int
Gets the data in the <componenttype:minecraft:max_damage> // MCItemStackMutable.maxDamage as int
myMCItemStackMutable . maxDamage
Return Type:
int
Gets the data in the <componenttype:minecraft:max_stack_size> // MCItemStackMutable.maxStackSize as int
myMCItemStackMutable . maxStackSize
Return Type:
int
// MCItemStackMutable.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);
myMCItemStackMutable . modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
// MCItemStackMutable.modifyTooltip(function as ITooltipFunction);
myMCItemStackMutable . modifyTooltip(myITooltipFunction);
Use this in contexts where machines accept more than one item to state that fact. // MCItemStackMutable.mul(amount as int) as IIngredientWithAmount;
myMCItemStackMutable . mul(myInt);
Return Type:
IIngredientWithAmount
Gets the data in <componenttype:minecraft:note_block_sound> // MCItemStackMutable.noteBlockSound as ResourceLocation
myMCItemStackMutable . noteBlockSound
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:ominous_bottle_amplifier> // MCItemStackMutable.ominousBottleAmplifier as int
myMCItemStackMutable . ominousBottleAmplifier
Return Type:
int
// MCItemStackMutable.onlyDamaged() as IIngredient;
myMCItemStackMutable . onlyDamaged();
Return Type:
IIngredient
// MCItemStackMutable.onlyDamagedAtLeast(minDamage as int) as IIngredient;
myMCItemStackMutable . onlyDamagedAtLeast(myInt);
Return Type:
IIngredient
// MCItemStackMutable.onlyDamagedAtMost(maxDamage as int) as IIngredient;
myMCItemStackMutable . onlyDamagedAtMost(myInt);
Return Type:
IIngredient
// MCItemStackMutable.onlyIf(uid as string, function as function(t as IItemStack) as bool = null) as IIngredient;
myMCItemStackMutable . onlyIf(myString, myPredicate);
Parameters:
uid: string
Type: string
function: function(t as IItemStack ) as bool
(optional) Type: function(t as IItemStack ) as bool
Default Value: null
Return Type:
IIngredient
Gets owning mod for the Item in this IItemStack // MCItemStackMutable.owner as string
myMCItemStackMutable . owner
Return Type:
string
// MCItemStackMutable.percent(percentage as double) as Percentaged<IItemStack>;
myMCItemStackMutable . percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged <IItemStack >
Gets the data in <componenttype:minecraft:pot_decorations> // MCItemStackMutable.potDecorations as PotDecorations
myMCItemStackMutable . potDecorations
Return Type:
PotDecorations
Gets the data in <componenttype:minecraft:potion_contents> // MCItemStackMutable.potionContents as PotionContents
myMCItemStackMutable . potionContents
Return Type:
PotionContents
Gets the data in <componenttype:minecraft:profile> // MCItemStackMutable.profile as ResolvableProfile
myMCItemStackMutable . profile
Return Type:
ResolvableProfile
// MCItemStackMutable.prototype as DataComponentMap
myMCItemStackMutable . prototype
Return Type:
DataComponentMap
Gets the data in the <componenttype:minecraft:rarity> // MCItemStackMutable.rarity as Rarity
myMCItemStackMutable . rarity
Return Type:
Rarity
Gets the data in <componenttype:minecraft:recipes> // MCItemStackMutable.recipes as List<ResourceLocation>
myMCItemStackMutable . recipes
Return Type:
List <ResourceLocation >
Gets the registry name for the Item in this IItemStack // MCItemStackMutable.registryName as ResourceLocation
myMCItemStackMutable . registryName
Return Type:
ResourceLocation
// MCItemStackMutable.remove<T>(type as DataComponentType<T>) as IItemStack;
myMCItemStackMutable . remove < T>(myDataComponentType);
Return Type:
IItemStack
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. // MCItemStackMutable.removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[]);
myMCItemStackMutable . removeGlobalAttribute( < attribute : minecraft:generic.attack_damage > , [ < constant : minecraft:equipmentslot:chest > ]);
Removes all AttributeModifiers who's ID is the same as the given uuid from this IIngredient. // MCItemStackMutable.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[]);
myMCItemStackMutable . removeGlobalAttributeModifier( "8c1b5535-9f79-448b-87ae-52d81480aaa3" , [ < constant : minecraft:equipmentslot:chest > ]);
Parameters:
uuid: string
Type: string
- The unique id of the AttributeModifier to remove.
Removes all AttributeModifiers who's ID is the same as the given uuid from this IIngredient. // MCItemStackMutable.removeGlobalAttributeModifier(uuid as UUID, slotTypes as EquipmentSlot[]);
myMCItemStackMutable . removeGlobalAttributeModifier( IItemStack . BASE_ATTACK_DAMAGE_UUID, [ < constant : minecraft:equipmentslot:chest > ]);
Parameters:
uuid: UUID
Type: UUID
- The unique id of the AttributeModifier to remove.
// MCItemStackMutable.removeTooltip(regex as string);
myMCItemStackMutable . removeTooltip(myString);
Parameters:
regex: string
Type: string
Gets the data in <componenttype:minecraft:repair_cost> // MCItemStackMutable.repairCost as int
myMCItemStackMutable . repairCost
Return Type:
int
// MCItemStackMutable.reuse() as IIngredient;
myMCItemStackMutable . reuse();
Return Type:
IIngredient
Sets the burn time of this ingredient, for use in the furnace and other machines // MCItemStackMutable.setBurnTime(time as int, manager as IRecipeManager<Recipe>);
myMCItemStackMutable . setBurnTime( 500 , myIRecipeManager);
Parameters:
time: int
Type: int
- the new burn time
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.
// MCItemStackMutable.shrink(amount as int = 1) as IItemStack;
myMCItemStackMutable . shrink( 2 );
Parameters:
amount: int
(optional) Type: int
- The amount to shrink by.
Default Value: 1
Return Type:
IItemStack
Returns if the ItemStack can have an amount greater than 1 I.E Swords and tools are not stackable, sticks are. // MCItemStackMutable.stackable as bool
myMCItemStackMutable . stackable
Return Type:
bool
Gets the data in <componenttype:minecraft:stored_enchantments> // MCItemStackMutable.storedEnchantments as ItemEnchantments
myMCItemStackMutable . storedEnchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:suspicious_stew_effects> // MCItemStackMutable.suspiciousStewEffects as SuspiciousStewEffects
myMCItemStackMutable . suspiciousStewEffects
Return Type:
SuspiciousStewEffects
Gets the data in <componenttype:minecraft:tool> // MCItemStackMutable.tool as Tool
myMCItemStackMutable . tool
Return Type:
Tool
// MCItemStackMutable.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;
myMCItemStackMutable . transformCustom(myString, myFunction);
Return Type:
IIngredient
// MCItemStackMutable.transformDamage(amount as int = 1) as IIngredient;
myMCItemStackMutable . transformDamage(myInt);
Parameters:
amount: int
(optional) Type: int
Default Value: 1
Return Type:
IIngredient
// MCItemStackMutable.transformReplace(replaceWith as IItemStack) as IIngredient;
myMCItemStackMutable . transformReplace(myIItemStack);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:trim> // MCItemStackMutable.trim as ArmorTrim
myMCItemStackMutable . trim
Return Type:
ArmorTrim
Gets the data in the <componenttype:minecraft:unbreakable> // MCItemStackMutable.unbreakable as Unbreakable
myMCItemStackMutable . unbreakable
Return Type:
Unbreakable
// 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: T
Type: T
data: U
Type: U
operator: BiFunction <T , T , U >
Type: BiFunction <T , T , U >
Return Type:
IItemStack
// MCItemStackMutable.update<T>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IItemStack;
myMCItemStackMutable . update < T>(myDataComponentType, myT, myUnaryOperator);
Parameters:
defaultValue: T
Type: T
operator: UnaryOperator <T >
Type: UnaryOperator <T >
Return Type:
IItemStack
Returns true if this stack is considered a crossbow item // MCItemStackMutable.useOnRelease as bool
myMCItemStackMutable . useOnRelease
Return Type:
bool
// MCItemStackMutable.with<T>(type as DataComponentType<T>, value as T?) as IItemStack;
myMCItemStackMutable . with < T>(myDataComponentType, myT);
Return Type:
IItemStack
Sets the <componenttype:minecraft:attribute_modifiers> of the ComponentAccess to have the given ItemAttributeModifiers
Returns : The new instance with the modified data.
// 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(););
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
// MCItemStackMutable.withAttributeModifiers(modifier as Entry, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable . withAttributeModifiers(myEntry, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
// MCItemStackMutable.withAttributeModifiers(modifiers as List<Entry>, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable . withAttributeModifiers(myList, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given List<BannerPatternLayers.Layer> Returns : The new instance with the modified data.
// MCItemStackMutable.withBannerPatterns(layers as List<Layer>) as ComponentAccess;
myMCItemStackMutable . withBannerPatterns(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given BannerPatternLayers
Returns : The new instance with the modified data.
// MCItemStackMutable.withBannerPatterns(layers as BannerPatternLayers) as ComponentAccess;
myMCItemStackMutable . withBannerPatterns(myBannerPatternLayers);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:base_color> of the ComponentAccess to have the given DyeColor
Returns : The new instance with the modified data.
// MCItemStackMutable.withBaseColor(color as DyeColor) as ComponentAccess;
myMCItemStackMutable . withBaseColor(myDyeColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bees> of the ComponentAccess to have the given occupants Returns : The new instance with the modified data.
// MCItemStackMutable.withBees(occupants as List<Occupant>) as ComponentAccess;
myMCItemStackMutable . withBees(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
// MCItemStackMutable.withBlockEntityData(data as MapData) as ComponentAccess;
myMCItemStackMutable . withBlockEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
// MCItemStackMutable.withBlockEntityData(data as CustomData) as ComponentAccess;
myMCItemStackMutable . withBlockEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_state> of the ComponentAccess to have the given BlockItemStateProperties
Returns : The new instance with the modified data.
// MCItemStackMutable.withBlockState(properties as BlockItemStateProperties) as ComponentAccess;
myMCItemStackMutable . withBlockState(myBlockItemStateProperties);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
// MCItemStackMutable.withBucketEntityData(data as MapData) as ComponentAccess;
myMCItemStackMutable . withBucketEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
// MCItemStackMutable.withBucketEntityData(data as CustomData) as ComponentAccess;
myMCItemStackMutable . withBucketEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given contents Returns : The new instance with the modified data.
// MCItemStackMutable.withBundleContents(contents as List<IItemStack>) as ComponentAccess;
myMCItemStackMutable . withBundleContents([ < item : minecraft:diamond > * 64 ]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given BundleContents
Returns : The new instance with the modified data.
// MCItemStackMutable.withBundleContents(contents as BundleContents) as ComponentAccess;
myMCItemStackMutable . withBundleContents(myBundleContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_break> 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.
// MCItemStackMutable.withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable . withCanBreak( BlockPredicate . create().of( < block : minecraft:diamond_ore > ).build(), true );
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show the ability in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_break> of the ComponentAccess to have the given AdventureModePredicate
Returns : The new instance with the modified data.
// MCItemStackMutable.withCanBreak(predicate as AdventureModePredicate) as ComponentAccess;
myMCItemStackMutable . withCanBreak(myAdventureModePredicate);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_place_on> 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.
// MCItemStackMutable.withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable . withCanPlaceOn( BlockPredicate . create().of( < block : minecraft:dirt > ).build(), myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show the restriction in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_place_on> of the ComponentAccess to have the given AdventureModePredicate
Returns : The new instance with the modified data.
// MCItemStackMutable.withCanPlaceOn(predicate as AdventureModePredicate) as ComponentAccess;
myMCItemStackMutable . withCanPlaceOn(myAdventureModePredicate);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given IItemStack
Returns : The new instance with the modified data.
// MCItemStackMutable.withChargedProjectiles(item as IItemStack) as ComponentAccess;
myMCItemStackMutable . withChargedProjectiles( < item : minecraft:arrow > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given items. Returns : The new instance with the modified data.
// MCItemStackMutable.withChargedProjectiles(items as List<IItemStack>) as ComponentAccess;
myMCItemStackMutable . withChargedProjectiles([ < item : minecraft:arrow > ]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given ChargedProjectiles
Returns : The new instance with the modified data.
// MCItemStackMutable.withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as ComponentAccess;
myMCItemStackMutable . withChargedProjectiles(myChargedProjectiles);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given values. Returns : The new instance with the modified data.
// MCItemStackMutable.withContainer(contents as List<IItemStack>) as ComponentAccess;
myMCItemStackMutable . withContainer(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given ItemContainerContents
Returns : The new instance with the modified data.
// MCItemStackMutable.withContainer(contents as ItemContainerContents) as ComponentAccess;
myMCItemStackMutable . withContainer(myItemContainerContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given loot table and seed. Returns : The new instance with the modified data.
// MCItemStackMutable.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;
myMCItemStackMutable . withContainerLoot(myResourceKey, myLong);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given SeededContainerLoot
Returns : The new instance with the modified data.
// MCItemStackMutable.withContainerLoot(loot as SeededContainerLoot) as ComponentAccess;
myMCItemStackMutable . withContainerLoot(mySeededContainerLoot);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:creative_slot_lock> of the ComponentAccess to exist. Returns : The new instance with the modified data.
// MCItemStackMutable.withCreativeSlotLock() as ComponentAccess;
myMCItemStackMutable . withCreativeSlotLock();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
// MCItemStackMutable.withCustomData(customData as MapData) as ComponentAccess;
myMCItemStackMutable . withCustomData({custom_ammo_thing: 1 , owner: "Benji" });
Parameters:
customData: MapData
Type: MapData
- The MapData to set the component to.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
// MCItemStackMutable.withCustomData(customData as CustomData) as ComponentAccess;
myMCItemStackMutable . withCustomData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_model_data> of the ComponentAccess to have the given value. Returns : The new instance with the modified data.
// MCItemStackMutable.withCustomModelData(value as int) as ComponentAccess;
myMCItemStackMutable . withCustomModelData( 2 );
Parameters:
value: int
Type: int
- The value to set the CustomModelData to
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
// MCItemStackMutable.withCustomModelData(data as CustomModelData) as ComponentAccess;
myMCItemStackMutable . withCustomModelData(myCustomModelData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_name> of the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withCustomName(name as Component) as ComponentAccess;
myMCItemStackMutable . withCustomName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:damage> 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.
// MCItemStackMutable.withDamage(damage as int) as ComponentAccess;
myMCItemStackMutable . withDamage( 16 );
Parameters:
damage: int
Type: int
- The new damage of the ComponentAccess.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:debug_stick_state> of the ComponentAccess to have the given DebugStickState
Returns : The new instance with the modified data.
// MCItemStackMutable.withDebugStickState(state as DebugStickState) as ComponentAccess;
myMCItemStackMutable . withDebugStickState(myDebugStickState);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withDyedColor(rgb as int, showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable . withDyedColor( 0xFFFF00 , true );
Parameters:
rgb: int
Type: int
- The colour to dye this item with
showInTooltip: bool
(optional) Type: bool
- Whether to show this information in a tooltip
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess to have the given DyedItemColor
Returns : The new instance with the modified data.
// MCItemStackMutable.withDyedColor(color as DyedItemColor) as ComponentAccess;
myMCItemStackMutable . withDyedColor(myDyedItemColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given Enchantment
and level. Returns : The new instance with the modified data.
// MCItemStackMutable.withEnchantment(enchantment as Enchantment, level as int = 1) as ComponentAccess;
myMCItemStackMutable . withEnchantment( < enchantment : minecraft:efficiency > , 4 );
Parameters:
level: int
(optional) Type: int
- The level of the enchantment to set
Default Value: 1
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantment_glint_override> 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.
// MCItemStackMutable.withEnchantmentGlintOverride(value as bool) as ComponentAccess;
myMCItemStackMutable . withEnchantmentGlintOverride( true );
Parameters:
value: bool
Type: bool
- The value of the override, as described above
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns : The new instance with the modified data.
// MCItemStackMutable.withEnchantments(enchantments as ItemEnchantments) as ComponentAccess;
myMCItemStackMutable . withEnchantments(myItemEnchantments);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
// MCItemStackMutable.withEntityData(data as MapData) as ComponentAccess;
myMCItemStackMutable . withEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
// MCItemStackMutable.withEntityData(data as CustomData) as ComponentAccess;
myMCItemStackMutable . withEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fire_resistant> of the ComponentAccess to exist. Returns : The new instance with the modified data.
// MCItemStackMutable.withFireResistant() as ComponentAccess;
myMCItemStackMutable . withFireResistant();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:firework_explosion> of the ComponentAccess to have the given FireworkExplosion
Returns : The new instance with the modified data.
// MCItemStackMutable.withFireworkExplosion(explosion as FireworkExplosion) as ComponentAccess;
myMCItemStackMutable . withFireworkExplosion(myFireworkExplosion);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given duration and explosions. Returns : The new instance with the modified data.
// MCItemStackMutable.withFireworks(flightDuration as int, explosions as List<FireworkExplosion>) as ComponentAccess;
myMCItemStackMutable . withFireworks(myInt, myList);
Parameters:
flightDuration: int
Type: int
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given Fireworks
Returns : The new instance with the modified data.
// MCItemStackMutable.withFireworks(fireworks as Fireworks) as ComponentAccess;
myMCItemStackMutable . withFireworks(myFireworks);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:food> of the ComponentAccess to have the given FoodProperties
Returns : The new instance with the modified data.
// MCItemStackMutable.withFood(food as FoodProperties) as ComponentAccess;
myMCItemStackMutable . withFood(myFoodProperties);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_additional_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
// MCItemStackMutable.withHideAdditionalTooltip() as ComponentAccess;
myMCItemStackMutable . withHideAdditionalTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
// MCItemStackMutable.withHideTooltip() as ComponentAccess;
myMCItemStackMutable . withHideTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:instrument> of the ComponentAccess to have the given Instrument
Returns : The new instance with the modified data.
// MCItemStackMutable.withInstrument(instrument as Instrument) as ComponentAccess;
myMCItemStackMutable . withInstrument(myInstrument);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:intangible_projectile> of the ComponentAccess to exist. Returns : The new instance with the modified data.
// MCItemStackMutable.withIntangibleProjectile() as ComponentAccess;
myMCItemStackMutable . withIntangibleProjectile();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:item_name> of the ComponentAccess to have the given Component
Returns : The new instance with the modified data.
// MCItemStackMutable.withItemName(name as Component) as ComponentAccess;
myMCItemStackMutable . withItemName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
// MCItemStackMutable.withJsonComponent(type as DataComponentType<T>, value as IData) as IItemStack;
myMCItemStackMutable . withJsonComponent(myDataComponentType, myIData);
Return Type:
IItemStack
// MCItemStackMutable.withJsonComponents(value as IData) as IItemStack;
myMCItemStackMutable . withJsonComponents(myIData);
Return Type:
IItemStack
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given string. Returns : The new instance with the modified data.
// MCItemStackMutable.withLock(code as string) as ComponentAccess;
myMCItemStackMutable . withLock(myString);
Parameters:
code: string
Type: string
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given LockCode
Returns : The new instance with the modified data.
// MCItemStackMutable.withLock(lock as LockCode) as ComponentAccess;
myMCItemStackMutable . withLock(myLockCode);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lodestone_tracker> of the ComponentAccess to have the given LodestoneTracker
Returns : The new instance with the modified data.
// MCItemStackMutable.withLodestoneTracker(tracker as LodestoneTracker) as ComponentAccess;
myMCItemStackMutable . withLodestoneTracker(myLodestoneTracker);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given stdlib.List< Component
> Returns : The new instance with the modified data.
// 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: List <Component >
Type: List <Component >
- The list of Components to add as lore.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given ItemLore
Returns : The new instance with the modified data.
// MCItemStackMutable.withLore(lore as ItemLore) as ComponentAccess;
myMCItemStackMutable . withLore(myItemLore);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withMapColor(rgb as int) as ComponentAccess;
myMCItemStackMutable . withMapColor( 0xFF0000 );
Parameters:
rgb: int
Type: int
- The new map colour
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess to have the given MapItemColor
Returns : The new instance with the modified data.
// MCItemStackMutable.withMapColor(color as MapItemColor) as ComponentAccess;
myMCItemStackMutable . withMapColor(myMapItemColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given values. Returns : The new instance with the modified data.
// MCItemStackMutable.withMapDecorations(decorations as Entry[string]) as ComponentAccess;
myMCItemStackMutable . withMapDecorations(myMap);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given MapDecorations
Returns : The new instance with the modified data.
// MCItemStackMutable.withMapDecorations(decorations as MapDecorations) as ComponentAccess;
myMCItemStackMutable . withMapDecorations(myMapDecorations);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_id> 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.
// MCItemStackMutable.withMapId(id as int) as ComponentAccess;
myMCItemStackMutable . withMapId(myInt);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given MapId
Returns : The new instance with the modified data.
// MCItemStackMutable.withMapId(mapId as MapId) as ComponentAccess;
myMCItemStackMutable . withMapId(myMapId);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_post_processing> of the ComponentAccess to have the given MapPostProcessing
Returns : The new instance with the modified data.
// MCItemStackMutable.withMapPostProcessing(value as MapPostProcessing) as ComponentAccess;
myMCItemStackMutable . withMapPostProcessing(myMapPostProcessing);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:max_damage> 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.
// MCItemStackMutable.withMaxDamage(maxDamage as int) as ComponentAccess;
myMCItemStackMutable . withMaxDamage( 1024 );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:stack_size> 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.
// MCItemStackMutable.withMaxStackSize(maxStackSize as int) as ComponentAccess;
myMCItemStackMutable . withMaxStackSize( 16 );
Parameters:
maxStackSize: int
Type: int
- The new maxStackSize of the ComponentAccess.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:note_block_sound> of the ComponentAccess to have the given ResourceLocation
Returns : The new instance with the modified data.
// MCItemStackMutable.withNoteBlockSound(sound as ResourceLocation) as ComponentAccess;
myMCItemStackMutable . withNoteBlockSound(myResourceLocation);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:ominous_bottle_amplifier> of the ComponentAccess to have the given amplifier. Returns : The new instance with the modified data.
// MCItemStackMutable.withOminousBottleAmplifier(amplifier as int) as ComponentAccess;
myMCItemStackMutable . withOminousBottleAmplifier(myInt);
Return Type:
ComponentAccess
// MCItemStackMutable.without<T>(type as DataComponentType<T>) as IItemStack;
myMCItemStackMutable . without < T>(myDataComponentType);
Return Type:
IItemStack
Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutAttributeModifiers() as ComponentAccess;
myMCItemStackMutable . withoutAttributeModifiers();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBannerPatterns() as ComponentAccess;
myMCItemStackMutable . withoutBannerPatterns();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:base_color> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBaseColor() as ComponentAccess;
myMCItemStackMutable . withoutBaseColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bees> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBees() as ComponentAccess;
myMCItemStackMutable . withoutBees();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBlockEntityData() as ComponentAccess;
myMCItemStackMutable . withoutBlockEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_state> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBlockState() as ComponentAccess;
myMCItemStackMutable . withoutBlockState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBucketEntityData() as ComponentAccess;
myMCItemStackMutable . withoutBucketEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutBundleContents() as ComponentAccess;
myMCItemStackMutable . withoutBundleContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_break> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutCanBreak() as ComponentAccess;
myMCItemStackMutable . withoutCanBreak();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutCanPlaceOn() as ComponentAccess;
myMCItemStackMutable . withoutCanPlaceOn();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutChargedProjectiles() as ComponentAccess;
myMCItemStackMutable . withoutChargedProjectiles();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutContainer() as ComponentAccess;
myMCItemStackMutable . withoutContainer();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container_loot> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutContainerLoot() as ComponentAccess;
myMCItemStackMutable . withoutContainerLoot();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutCreativeSlotLock() as ComponentAccess;
myMCItemStackMutable . withoutCreativeSlotLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_data> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutCustomData() as ComponentAccess;
myMCItemStackMutable . withoutCustomData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutCustomModelData() as ComponentAccess;
myMCItemStackMutable . withoutCustomModelData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_name> from the ComponentAccess Returns : The new instance with the modified data.
// MCItemStackMutable.withoutCustomName() as ComponentAccess;
myMCItemStackMutable . withoutCustomName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:damage> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutDamage() as ComponentAccess;
myMCItemStackMutable . withoutDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutDebugStickState() as ComponentAccess;
myMCItemStackMutable . withoutDebugStickState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutDyedColor() as ComponentAccess;
myMCItemStackMutable . withoutDyedColor();
Return Type:
ComponentAccess
Removes the Enchantment
from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutEnchantment(enchantment as Enchantment) as ComponentAccess;
myMCItemStackMutable . withoutEnchantment( < enchantment : minecraft:mending > );
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantment_glint_override> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutEnchantmentGlintOverride() as ComponentAccess;
myMCItemStackMutable . withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutEnchantments() as ComponentAccess;
myMCItemStackMutable . withoutEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutEntityDate() as ComponentAccess;
myMCItemStackMutable . withoutEntityDate();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutFireResistant() as ComponentAccess;
myMCItemStackMutable . withoutFireResistant();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutFireworkExplosion() as ComponentAccess;
myMCItemStackMutable . withoutFireworkExplosion();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fireworks> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutFireworks() as ComponentAccess;
myMCItemStackMutable . withoutFireworks();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:food> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutFood() as ComponentAccess;
myMCItemStackMutable . withoutFood();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutHideAdditionalTooltip() as ComponentAccess;
myMCItemStackMutable . withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutHideTooltip() as ComponentAccess;
myMCItemStackMutable . withoutHideTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:instrument> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutInstrument() as ComponentAccess;
myMCItemStackMutable . withoutInstrument();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutIntangibleProjectile() as ComponentAccess;
myMCItemStackMutable . withoutIntangibleProjectile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:item_name> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutItemName() as ComponentAccess;
myMCItemStackMutable . withoutItemName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lock> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutLock() as ComponentAccess;
myMCItemStackMutable . withoutLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutLodestoneTracker() as ComponentAccess;
myMCItemStackMutable . withoutLodestoneTracker();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lore> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutLore() as ComponentAccess;
myMCItemStackMutable . withoutLore();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_color> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutMapColor() as ComponentAccess;
myMCItemStackMutable . withoutMapColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutMapDecorations() as ComponentAccess;
myMCItemStackMutable . withoutMapDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_id> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutMapId() as ComponentAccess;
myMCItemStackMutable . withoutMapId();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutMapPostProcessing() as ComponentAccess;
myMCItemStackMutable . withoutMapPostProcessing();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:max_damage> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutMaxDamage() as ComponentAccess;
myMCItemStackMutable . withoutMaxDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stack_size> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutMaxStackSize() as ComponentAccess;
myMCItemStackMutable . withoutMaxStackSize();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutNoteBlockSound() as ComponentAccess;
myMCItemStackMutable . withoutNoteBlockSound();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutOminousBottleAmplifier() as ComponentAccess;
myMCItemStackMutable . withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutPotDecorations() as ComponentAccess;
myMCItemStackMutable . withoutPotDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutPotionContents() as ComponentAccess;
myMCItemStackMutable . withoutPotionContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:profile> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutProfile() as ComponentAccess;
myMCItemStackMutable . withoutProfile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:rarity> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutRarity() as ComponentAccess;
myMCItemStackMutable . withoutRarity();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:recipes> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutRecipes() as ComponentAccess;
myMCItemStackMutable . withoutRecipes();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutRepairCost() as ComponentAccess;
myMCItemStackMutable . withoutRepairCost();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutStoredEnchantments() as ComponentAccess;
myMCItemStackMutable . withoutStoredEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutSuspiciousStewEffects() as ComponentAccess;
myMCItemStackMutable . withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:tool> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutTool() as ComponentAccess;
myMCItemStackMutable . withoutTool();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:trim> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutTrim() as ComponentAccess;
myMCItemStackMutable . withoutTrim();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess Returns : The new instance with the modified data.
// MCItemStackMutable.withoutUnbreakable() as ComponentAccess;
myMCItemStackMutable . withoutUnbreakable();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutWritableBookContent() as ComponentAccess;
myMCItemStackMutable . withoutWritableBookContent();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
// MCItemStackMutable.withoutWrittenBookContent() as ComponentAccess;
myMCItemStackMutable . withoutWrittenBookContent();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given items. Returns : The new instance with the modified data.
// 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
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given PotDecorations
Returns : The new instance with the modified data.
// MCItemStackMutable.withPotDecorations(decorations as PotDecorations) as ComponentAccess;
myMCItemStackMutable . withPotDecorations(myPotDecorations);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and no custom effects Returns : The new instance with the modified data.
// MCItemStackMutable.withPotionContents(potion as Potion) as ComponentAccess;
myMCItemStackMutable . withPotionContents( < potion : minecraft:swiftness > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and the given MobEffectInstance
effects. Returns : The new instance with the modified data.
// 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 )]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and the given MobEffectInstance
effects. Returns : The new instance with the modified data.
// 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:
customColor: int
Type: int
- The ARGB color the potion will have.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given PotionContents
Returns : The new instance with the modified data.
// MCItemStackMutable.withPotionContents(contents as PotionContents) as ComponentAccess;
myMCItemStackMutable . withPotionContents(myPotionContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:profile> of the ComponentAccess to have the given ResolvableProfile
Returns : The new instance with the modified data.
// MCItemStackMutable.withProfile(profile as ResolvableProfile) as ComponentAccess;
myMCItemStackMutable . withProfile(myResolvableProfile);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:rarity> of the ComponentAccess to have the given Rarity
Returns : The new instance with the modified data.
// MCItemStackMutable.withRarity(rarity as Rarity) as ComponentAccess;
myMCItemStackMutable . withRarity( < constant : minecraft:item/rarity:epic > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:recipes> of the ComponentAccess to have the given List<ResourceLocation> Returns : The new instance with the modified data.
// MCItemStackMutable.withRecipes(recipes as List<ResourceLocation>) as ComponentAccess;
myMCItemStackMutable . withRecipes(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:repair_cost> of the ComponentAccess to have the given value. Returns : The new instance with the modified data.
// MCItemStackMutable.withRepairCost(cost as int) as ComponentAccess;
myMCItemStackMutable . withRepairCost( 20 );
Parameters:
cost: int
Type: int
- The repair cost
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:stored_enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns : The new instance with the modified data.
// MCItemStackMutable.withStoredEnchantments(enchantments as ItemEnchantments) as ComponentAccess;
myMCItemStackMutable . withStoredEnchantments(myItemEnchantments);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:suspicious_stew_effects> 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.
// MCItemStackMutable.withSuspiciousStewEffects(effects as List<Entry>) as ComponentAccess;
myMCItemStackMutable . withSuspiciousStewEffects(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
Returns : The new instance with the modified data.
// MCItemStackMutable.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;
myMCItemStackMutable . withSuspiciousStewEffects(mySuspiciousStewEffects);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given data. A Tool
instance is constructed from the parameters. Returns : The new instance with the modified data.
// 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: List <ToolRule >
Type: List <ToolRule >
- The list of rules the new Tool instance will have defaultMiningSpeed: float
Type: float
- The default mining speed of the new tool
damagePerBlock: int
Type: int
- The damage or durability that is dealt to the Tool after use.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given Tool
Returns : The new instance with the modified data.
// MCItemStackMutable.withTool(tool as Tool) as ComponentAccess;
myMCItemStackMutable . withTool(myTool);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:trim> of the ComponentAccess to have the given ArmorTrim
Returns : The new instance with the modified data.
// MCItemStackMutable.withTrim(trim as ArmorTrim) as ComponentAccess;
myMCItemStackMutable . withTrim(myArmorTrim);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable. Returns : The new instance with the modified data.
// MCItemStackMutable.withUnbreakable(showInTooltip as bool = true) as ComponentAccess;
myMCItemStackMutable . withUnbreakable(myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show that the ComponentAccess is unbreakable in a tooltip.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable. Returns : The new instance with the modified data.
// MCItemStackMutable.withUnbreakable(unbreakable as Unbreakable) as ComponentAccess;
myMCItemStackMutable . withUnbreakable(myUnbreakable);
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
// MCItemStackMutable.withWritableBookContent(pages as List<Filterable<string>>) as ComponentAccess;
myMCItemStackMutable . withWritableBookContent(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:writable_book_content> of the ComponentAccess to have the given WritableBookContent
Returns : The new instance with the modified data.
// MCItemStackMutable.withWritableBookContent(content as WritableBookContent) as ComponentAccess;
myMCItemStackMutable . withWritableBookContent(myWritableBookContent);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:written_book_content> of the ComponentAccess to have the given WrittenBookContent
Returns : The new instance with the modified data.
// MCItemStackMutable.withWrittenBookContent(content as WrittenBookContent) as ComponentAccess;
myMCItemStackMutable . withWrittenBookContent(myWrittenBookContent);
Return Type:
ComponentAccess
Gets the data in <componenttype:minecraft:writable_book_content> // MCItemStackMutable.writableBookContent as WritableBookContent
myMCItemStackMutable . writableBookContent
Return Type:
WritableBookContent
Gets the data in <componenttype:minecraft:written_book_content> // MCItemStackMutable.writtenBookContent as WrittenBookContent
myMCItemStackMutable . writtenBookContent
Return Type:
WrittenBookContent