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:
FabricItemStack
,IItemStack
,IIngredient
,IIngredientWithAmount
,DataComponentHolder
,ComponentAccess <IItemStack >
,CommandStringDisplayable
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. myMCItemStackMutable * myInt
Return Type:
IIngredientWithAmount
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 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
myMCItemStackMutable . anyDamage();
Return Type:
IIngredient
myMCItemStackMutable . applyComponents(myDataComponentMap);
Return Type:
IItemStack
myMCItemStackMutable . applyComponents(myDataComponentPatch);
Return Type:
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
Used implicitly when a machine can accept more than one item but you only provide one. myMCItemStackMutable . asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. myMCItemStackMutable as IIngredientWithAmount
Return Type:
IIngredientWithAmount
// MCItemStackMutable.asItemLike() as ItemLike ; myMCItemStackMutable . asItemLike();
Return Type:
ItemLike
myMCItemStackMutable as ItemLike
Return Type:
ItemLike
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. myMCItemStackMutable as Ingredient
Return Type:
Ingredient
Gets the data in <componenttype:minecraft:attribute_modifiers> myMCItemStackMutable . attributeModifiers
Return Type:
ItemAttributeModifiers
Gets the data in <componenttype:minecraft:banner_patterns> myMCItemStackMutable . bannerPatterns
Return Type:
BannerPatternLayers
Gets the data in <componenttype:minecraft:base_color> // MCItemStackMutable.baseColor as DyeColor myMCItemStackMutable . baseColor
Return Type:
DyeColor
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> 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> 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> myMCItemStackMutable . canBreak
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:can_place_on> myMCItemStackMutable . canPlaceOn
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:charged_projectiles> 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
Use this if you already have the condition from another ingredient myMCItemStackMutable . condition(myIIngredientCondition);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:container> myMCItemStackMutable . container
Return Type:
ItemContainerContents
Gets the data in <componenttype:minecraft:container_loot> 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> myMCItemStackMutable . customData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:custom_model_data> 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> myMCItemStackMutable . debugStickState
Return Type:
DebugStickState
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> 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> myMCItemStackMutable . enchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:entity_data> myMCItemStackMutable . entityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:firework_explosion> myMCItemStackMutable . fireworkExplosion
Return Type:
FireworkExplosion
Gets the data in <componenttype:minecraft:fireworks> myMCItemStackMutable . fireworks
Return Type:
Fireworks
Gets the data in <componenttype:minecraft:food> 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.
myMCItemStackMutable . getAttributes( < constant : minecraft:equipmentslot:chest > );
Return Type:
List <AttributeModifier > [Attribute ]
// 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. 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.
myMCItemStackMutable . hoverName
Return Type:
Component
The backing ingredient myMCItemStackMutable . ingredient
Return Type:
IIngredient
Gets the data in <componenttype:minecraft: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. 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> myMCItemStackMutable . lodestoneTracker
Return Type:
LodestoneTracker
Gets the data in the <componenttype:minecraft:lore> myMCItemStackMutable . lore
Return Type:
ItemLore
Gets the data in <componenttype:minecraft:map_color> myMCItemStackMutable . mapColor
Return Type:
MapItemColor
Gets the data in <componenttype:minecraft:map_decorations> 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> 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
myMCItemStackMutable . modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
myMCItemStackMutable . modifyTooltip(myITooltipFunction);
Use this in contexts where machines accept more than one item to state that fact. myMCItemStackMutable . mul(myInt);
Return Type:
IIngredientWithAmount
Gets the data in <componenttype:minecraft:note_block_sound> myMCItemStackMutable . noteBlockSound
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:ominous_bottle_amplifier> // MCItemStackMutable.ominousBottleAmplifier as int
myMCItemStackMutable . ominousBottleAmplifier
Return Type:
int
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
myMCItemStackMutable . percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged <IItemStack >
Gets the data in <componenttype:minecraft:pot_decorations> myMCItemStackMutable . potDecorations
Return Type:
PotDecorations
Gets the data in <componenttype:minecraft:potion_contents> myMCItemStackMutable . potionContents
Return Type:
PotionContents
Gets the data in <componenttype:minecraft:profile> myMCItemStackMutable . profile
Return Type:
ResolvableProfile
Gets the data in the <componenttype:minecraft:rarity> // MCItemStackMutable.rarity as Rarity myMCItemStackMutable . rarity
Return Type:
Rarity
Gets the data in <componenttype:minecraft:recipes> myMCItemStackMutable . recipes
Return Type:
List <ResourceLocation >
Gets the registry name for the Item in this IItemStack myMCItemStackMutable . registryName
Return Type:
ResourceLocation
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. 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
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> myMCItemStackMutable . storedEnchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:suspicious_stew_effects> myMCItemStackMutable . suspiciousStewEffects
Return Type:
SuspiciousStewEffects
Gets the data in <componenttype:minecraft:tool> // MCItemStackMutable.tool as Tool myMCItemStackMutable . tool
Return Type:
Tool
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
myMCItemStackMutable . transformReplace(myIItemStack);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:trim> myMCItemStackMutable . trim
Return Type:
ArmorTrim
Gets the data in the <componenttype:minecraft: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
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
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.
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.
myMCItemStackMutable . withAttributeModifiers(myEntry, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
myMCItemStackMutable . withCustomModelData(myCustomModelData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_name> of the ComponentAccess. Returns : The new instance with the modified data.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
myMCItemStackMutable . withHideAdditionalTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
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.
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.
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.
myMCItemStackMutable . withItemName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
myMCItemStackMutable . withJsonComponent(myDataComponentType, myIData);
Return Type:
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.
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.
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.
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.
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.
myMCItemStackMutable . withLore(myItemLore);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess. Returns : The new instance with the modified data.
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.
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.
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.
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.
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.
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.
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.
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.
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
myMCItemStackMutable . without < T>(myDataComponentType);
Return Type:
IItemStack
Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutAttributeModifiers();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBannerPatterns();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:base_color> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBaseColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bees> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBees();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBlockEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_state> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBlockState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBucketEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutBundleContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_break> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutCanBreak();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutCanPlaceOn();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutChargedProjectiles();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutContainer();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container_loot> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutContainerLoot();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutCreativeSlotLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_data> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutCustomData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutCustomModelData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_name> from the ComponentAccess Returns : The new instance with the modified data.
myMCItemStackMutable . withoutCustomName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:damage> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutDebugStickState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutDyedColor();
Return Type:
ComponentAccess
Removes the Enchantment
from the ComponentAccess. Returns : The new instance with the modified data.
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.
myMCItemStackMutable . withoutEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutEntityDate();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutFireResistant();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutFireworkExplosion();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fireworks> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutFireworks();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:food> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutFood();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutHideTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:instrument> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutInstrument();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutIntangibleProjectile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:item_name> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutItemName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lock> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutLodestoneTracker();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lore> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutLore();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_color> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutMapColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutMapDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_id> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutMapId();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutMapPostProcessing();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:max_damage> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutMaxDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stack_size> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutMaxStackSize();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutNoteBlockSound();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutPotDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutPotionContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:profile> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutProfile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:rarity> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutRarity();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:recipes> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutRecipes();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutRepairCost();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutStoredEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:tool> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutTool();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:trim> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutTrim();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess Returns : The new instance with the modified data.
myMCItemStackMutable . withoutUnbreakable();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
myMCItemStackMutable . withoutWritableBookContent();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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< ToolRule >, 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.
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.
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.
myMCItemStackMutable . withUnbreakable(myUnbreakable);
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
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.
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.
myMCItemStackMutable . withWrittenBookContent(myWrittenBookContent);
Return Type:
ComponentAccess
Gets the data in <componenttype:minecraft:writable_book_content> myMCItemStackMutable . writableBookContent
Return Type:
WritableBookContent
Gets the data in <componenttype:minecraft:written_book_content> myMCItemStackMutable . writtenBookContent
Return Type:
WrittenBookContent