MCItemStackMutable
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.item.MCItemStackMutable;
Implements
MCItemStackMutable
implements the following interfaces:
NeoForgeItemStack
,IItemStack
,IIngredient
,IIngredientWithAmount
,DataComponentHolder
,ComponentAccess<IItemStack>
,CommandStringDisplayable
Undocumented Interfaces
IDataComponentHolderExtension
Operators
myIIngredient in myMCItemStackMutable
Parameters:
Return Type:
bool
// (MCItemStackMutable == (o as Object)) as boolmyMCItemStackMutable == myObject
Parameters:
o: Object
Type: Object
Return Type:
bool
// (MCItemStackMutable * (amount as int)) as IIngredientWithAmountmyMCItemStackMutable * myInt
Parameters:
amount: int
Type: int
Return Type:
IIngredientWithAmount
myMCItemStackMutable | myIIngredient
Parameters:
other: IIngredient
Type: IIngredient
Return Type:
IIngredientList
myMCItemStackMutable % myDouble
Parameters:
percentage: double
Type: double
Return Type:
Percentaged<IItemStack>
// (MCItemStackMutable * (amount as int)) as IItemStackmyMCItemStackMutable * myInt
Parameters:
amount: int
Type: int
- new amount
Return Type:
IItemStack
Members
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, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myMCItemStackMutable.addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>, "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>]);
Parameters:
name: string
Type: string
- The name of the modifier. value: double
Type: double
- The value of the modifier. The UUID can be used to override an existing attribute on an ItemStack with this new modifier. You can use
/ct hand attributes
to get the UUID of the attributes on an ItemStack.Attributes added with this method appear on all ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to have the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withAttributeModifier
// MCItemStackMutable.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myMCItemStackMutable.addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>, "8c1b5535-9f79-448b-87ae-52d81480aaa3", "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>]);
Parameters:
uuid: string
Type: string
- The unique identifier of the modifier to replace. name: string
Type: string
- The name of the modifier. value: double
Type: double
- The value of the modifier. The UUID can be used to override an existing attribute on an ItemStack with this new modifier. You can use
/ct hand attributes
to get the UUID of the attributes on an ItemStack.Attributes added with this method appear on all ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to have the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withAttributeModifier
// MCItemStackMutable.addGlobalAttributeModifier(attribute as Attribute, uuid as UUID, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myMCItemStackMutable.addGlobalAttributeModifier(<attribute:minecraft:generic.attack_damage>, IItemStack.BASE_ATTACK_DAMAGE_UUID, "Extra Power", 10, AttributeOperation.ADDITION, [<constant:minecraft:equipmentslot:chest>]);
Parameters:
uuid: UUID
Type: UUID
- The unique identifier of the modifier to replace. name: string
Type: string
- The name of the modifier. value: double
Type: double
- The value of the modifier. // MCItemStackMutable.amount as intmyMCItemStackMutable.amount
Return Type:
int
// MCItemStackMutable.amount as intmyMCItemStackMutable.amount
Return Type:
int
myMCItemStackMutable.applyComponents(myDataComponentMap);
Parameters:
map: DataComponentMap
Type: DataComponentMap
Return Type:
IItemStack
myMCItemStackMutable.applyComponents(myDataComponentPatch);
Parameters:
patch: DataComponentPatch
Type: DataComponentPatch
Return Type:
IItemStack
myMCItemStackMutable.applyComponentsAndValidate(myDataComponentPatch);
Parameters:
patch: DataComponentPatch
Type: DataComponentPatch
Return Type:
IItemStack
myMCItemStackMutable.asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
// MCItemStackMutable as IIngredientWithAmountmyMCItemStackMutable as IIngredientWithAmount
Return Type:
IIngredientWithAmount
// MCItemStackMutable as IIngredientWithAmountmyMCItemStackMutable as IIngredientWithAmount
Return Type:
IIngredientWithAmount
myMCItemStackMutable.asVanillaIngredient();
Return Type:
Ingredient
// MCItemStackMutable as IngredientmyMCItemStackMutable as Ingredient
Return Type:
Ingredient
myMCItemStackMutable as Percentaged<IItemStack>
Return Type:
Percentaged<IItemStack>
// MCItemStackMutable.attributeModifiers as ItemAttributeModifiersmyMCItemStackMutable.attributeModifiers
Return Type:
ItemAttributeModifiers
// MCItemStackMutable.bannerPatterns as BannerPatternLayersmyMCItemStackMutable.bannerPatterns
Return Type:
BannerPatternLayers
// MCItemStackMutable.BASE_ATTACK_DAMAGE_UUID as UUIDMCItemStackMutable.BASE_ATTACK_DAMAGE_UUID
Return Type:
UUID
// MCItemStackMutable.BASE_ATTACK_SPEED_UUID as UUIDMCItemStackMutable.BASE_ATTACK_SPEED_UUID
Return Type:
UUID
myMCItemStackMutable.bees
Return Type:
List<BeehiveBlockEntityOccupant>
// MCItemStackMutable.blockEntityData as CustomDatamyMCItemStackMutable.blockEntityData
Return Type:
CustomData
// MCItemStackMutable.blockState as BlockItemStatePropertiesmyMCItemStackMutable.blockState
Return Type:
BlockItemStateProperties
// MCItemStackMutable.bucketEntityData as CustomDatamyMCItemStackMutable.bucketEntityData
Return Type:
CustomData
// MCItemStackMutable.bundleContents as BundleContentsmyMCItemStackMutable.bundleContents
Return Type:
BundleContents
// MCItemStackMutable.burnTime as intmyMCItemStackMutable.burnTime
Return Type:
int
// MCItemStackMutable.burnTime = (time as int);myMCItemStackMutable.burnTime = myInt;
Parameters:
time: int
Type: int
- the new burn time // MCItemStackMutable.burnTime(time as int);myMCItemStackMutable.burnTime(500);
Parameters:
time: int
Type: int
- the new burn time // MCItemStackMutable.canBreak as AdventureModePredicatemyMCItemStackMutable.canBreak
Return Type:
AdventureModePredicate
// MCItemStackMutable.canPlaceOn as AdventureModePredicatemyMCItemStackMutable.canPlaceOn
Return Type:
AdventureModePredicate
// MCItemStackMutable.chargedProjectiles as ChargedProjectilesmyMCItemStackMutable.chargedProjectiles
Return Type:
ChargedProjectiles
// MCItemStackMutable.clearTooltip(leaveName as bool = false);myMCItemStackMutable.clearTooltip(myBool);
Parameters:
leaveName: bool
(optional) Type: bool
Default Value: false
// MCItemStackMutable.commandString as stringmyMCItemStackMutable.commandString
Return Type:
string
// MCItemStackMutable.commandString as stringmyMCItemStackMutable.commandString
Return Type:
string
// MCItemStackMutable.commandString() as string;myMCItemStackMutable.commandString();
Return Type:
string
// MCItemStackMutable.componentsPatch as DataComponentPatchmyMCItemStackMutable.componentsPatch
Return Type:
DataComponentPatch
myMCItemStackMutable.condition(myIIngredientCondition);
Parameters:
condition: IIngredientCondition
Type: IIngredientCondition
Return Type:
IIngredient
// MCItemStackMutable.container as ItemContainerContentsmyMCItemStackMutable.container
Return Type:
ItemContainerContents
// MCItemStackMutable.containerLoot as SeededContainerLootmyMCItemStackMutable.containerLoot
Return Type:
SeededContainerLoot
myMCItemStackMutable.contains((<item:minecraft:iron_ingot> | <item:minecraft:gold_ingot>));
Parameters:
Return Type:
bool
// MCItemStackMutable.CRAFTTWEAKER_DATA_KEY as stringMCItemStackMutable.CRAFTTWEAKER_DATA_KEY
Return Type:
string
// MCItemStackMutable.creativeSlotLock as boolmyMCItemStackMutable.creativeSlotLock
Return Type:
bool
// MCItemStackMutable.customData as CustomDatamyMCItemStackMutable.customData
Return Type:
CustomData
// MCItemStackMutable.customModelData as CustomModelDatamyMCItemStackMutable.customModelData
Return Type:
CustomModelData
// MCItemStackMutable.damage as intmyMCItemStackMutable.damage
Return Type:
int
// MCItemStackMutable.damageableItem as boolmyMCItemStackMutable.damageableItem
Return Type:
bool
// MCItemStackMutable.damaged as boolmyMCItemStackMutable.damaged
Return Type:
bool
// MCItemStackMutable.debugStickState as DebugStickStatemyMCItemStackMutable.debugStickState
Return Type:
DebugStickState
// MCItemStackMutable.definition as ItemDefinitionmyMCItemStackMutable.definition
Return Type:
ItemDefinition
// MCItemStackMutable as ItemDefinitionmyMCItemStackMutable as Item
Return Type:
ItemDefinition
// MCItemStackMutable.descriptionId as stringmyMCItemStackMutable.descriptionId
Return Type:
string
// MCItemStackMutable.dyedColor as DyedItemColormyMCItemStackMutable.dyedColor
Return Type:
DyedItemColor
// MCItemStackMutable.empty as boolmyMCItemStackMutable.empty
Return Type:
bool
Returns: true if empty, false otherwise
// MCItemStackMutable.empty() as bool;myMCItemStackMutable.empty();
Return Type:
bool
If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
// MCItemStackMutable.enchantmentGlintOverride as boolmyMCItemStackMutable.enchantmentGlintOverride
Return Type:
bool
// MCItemStackMutable.enchantments as ItemEnchantmentsmyMCItemStackMutable.enchantments
Return Type:
ItemEnchantments
// MCItemStackMutable.entityData as CustomDatamyMCItemStackMutable.entityData
Return Type:
CustomData
// MCItemStackMutable.fireworkExplosion as FireworkExplosionmyMCItemStackMutable.fireworkExplosion
Return Type:
FireworkExplosion
// MCItemStackMutable.food as FoodPropertiesmyMCItemStackMutable.food
Return Type:
FoodProperties
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>);
Parameters:
Return Type:
List<AttributeModifier>[Attribute]
myMCItemStackMutable.getBurnTime(myIRecipeManager);
Parameters:
manager: IRecipeManager<Recipe>
Type: IRecipeManager<Recipe>
Return Type:
int
myMCItemStackMutable.getRemainingItem(<item:minecraft:iron_ingot>);
Parameters:
Return Type:
IItemStack
Returns: This IItemStack if mutable, a new one with the new amount otherwise.
myMCItemStackMutable.grow(2);
Parameters:
amount: int
(optional) Type: int
- The amount to grow by.
Default Value: 1
Return Type:
IItemStack
// MCItemStackMutable.hasAttributeModifiers as boolmyMCItemStackMutable.hasAttributeModifiers
Return Type:
bool
// MCItemStackMutable.hasBannerPatterns as boolmyMCItemStackMutable.hasBannerPatterns
Return Type:
bool
Used for shield colouring.
// MCItemStackMutable.hasBaseColor as boolmyMCItemStackMutable.hasBaseColor
Return Type:
bool
// MCItemStackMutable.hasBees as boolmyMCItemStackMutable.hasBees
Return Type:
bool
// MCItemStackMutable.hasBlockEntityData as boolmyMCItemStackMutable.hasBlockEntityData
Return Type:
bool
// MCItemStackMutable.hasBlockState as boolmyMCItemStackMutable.hasBlockState
Return Type:
bool
// MCItemStackMutable.hasBucketEntityData as boolmyMCItemStackMutable.hasBucketEntityData
Return Type:
bool
// MCItemStackMutable.hasBundleContents as boolmyMCItemStackMutable.hasBundleContents
Return Type:
bool
// MCItemStackMutable.hasCanBreak as boolmyMCItemStackMutable.hasCanBreak
Return Type:
bool
// MCItemStackMutable.hasCanPlaceOn as boolmyMCItemStackMutable.hasCanPlaceOn
Return Type:
bool
This component is used for crossbows.
// MCItemStackMutable.hasChargedProjectiles as boolmyMCItemStackMutable.hasChargedProjectiles
Return Type:
bool
// MCItemStackMutable.hasContainer as boolmyMCItemStackMutable.hasContainer
Return Type:
bool
// MCItemStackMutable.hasContainerLoot as boolmyMCItemStackMutable.hasContainerLoot
Return Type:
bool
// MCItemStackMutable.hasCustomData as boolmyMCItemStackMutable.hasCustomData
Return Type:
bool
// MCItemStackMutable.hasCustomModelData as boolmyMCItemStackMutable.hasCustomModelData
Return Type:
bool
// MCItemStackMutable.hasCustomName as boolmyMCItemStackMutable.hasCustomName
Return Type:
bool
// MCItemStackMutable.hasDamage as boolmyMCItemStackMutable.hasDamage
Return Type:
bool
// MCItemStackMutable.hasDebugStickState as boolmyMCItemStackMutable.hasDebugStickState
Return Type:
bool
// MCItemStackMutable.hasDyedColor as boolmyMCItemStackMutable.hasDyedColor
Return Type:
bool
// MCItemStackMutable.hasEnchantmentGlintOverride as boolmyMCItemStackMutable.hasEnchantmentGlintOverride
Return Type:
bool
// MCItemStackMutable.hasEnchantments as boolmyMCItemStackMutable.hasEnchantments
Return Type:
bool
// MCItemStackMutable.hasEntityData as boolmyMCItemStackMutable.hasEntityData
Return Type:
bool
// MCItemStackMutable.hasFireworkExplosion as boolmyMCItemStackMutable.hasFireworkExplosion
Return Type:
bool
// MCItemStackMutable.hasFireworks as boolmyMCItemStackMutable.hasFireworks
Return Type:
bool
Foil is the glint / effect that is added to enchanted ItemStacks (and other items).
// MCItemStackMutable.hasFoil as boolmyMCItemStackMutable.hasFoil
Return Type:
bool
// MCItemStackMutable.hasFood as boolmyMCItemStackMutable.hasFood
Return Type:
bool
// MCItemStackMutable.hasInstrument as boolmyMCItemStackMutable.hasInstrument
Return Type:
bool
// MCItemStackMutable.hasItemName as boolmyMCItemStackMutable.hasItemName
Return Type:
bool
// MCItemStackMutable.hasLock as boolmyMCItemStackMutable.hasLock
Return Type:
bool
// MCItemStackMutable.hasLodestoneTracker as boolmyMCItemStackMutable.hasLodestoneTracker
Return Type:
bool
// MCItemStackMutable.hasLore as boolmyMCItemStackMutable.hasLore
Return Type:
bool
// MCItemStackMutable.hasMapColor as boolmyMCItemStackMutable.hasMapColor
Return Type:
bool
MapDecorations are additional elements that render on a map, such as waypoints.
// MCItemStackMutable.hasMapDecorations as boolmyMCItemStackMutable.hasMapDecorations
Return Type:
bool
// MCItemStackMutable.hasMapId as boolmyMCItemStackMutable.hasMapId
Return Type:
bool
This componenet stores additional info on the map, such as the scale or whether to lock it.
// MCItemStackMutable.hasMapPostProcessing as boolmyMCItemStackMutable.hasMapPostProcessing
Return Type:
bool
// MCItemStackMutable.hasMaxDamage as boolmyMCItemStackMutable.hasMaxDamage
Return Type:
bool
// MCItemStackMutable.hasMaxStackSize as boolmyMCItemStackMutable.hasMaxStackSize
Return Type:
bool
// MCItemStackMutable.hasNoteBlockSound as boolmyMCItemStackMutable.hasNoteBlockSound
Return Type:
bool
// MCItemStackMutable.hasOminousBottleAmplifier as boolmyMCItemStackMutable.hasOminousBottleAmplifier
Return Type:
bool
// MCItemStackMutable.hasPotDecorations as boolmyMCItemStackMutable.hasPotDecorations
Return Type:
bool
Stores Potion Data on an item.
// MCItemStackMutable.hasPotionContents as boolmyMCItemStackMutable.hasPotionContents
Return Type:
bool
// MCItemStackMutable.hasProfile as boolmyMCItemStackMutable.hasProfile
Return Type:
bool
// MCItemStackMutable.hasRarity as boolmyMCItemStackMutable.hasRarity
Return Type:
bool
Used for Knowledge Books.
// MCItemStackMutable.hasRecipes as boolmyMCItemStackMutable.hasRecipes
Return Type:
bool
// MCItemStackMutable.hasRepairCost as boolmyMCItemStackMutable.hasRepairCost
Return Type:
bool
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 boolmyMCItemStackMutable.hasStoredEnchantments
Return Type:
bool
// MCItemStackMutable.hasSuspiciousStewEffects as boolmyMCItemStackMutable.hasSuspiciousStewEffects
Return Type:
bool
// MCItemStackMutable.hasTool as boolmyMCItemStackMutable.hasTool
Return Type:
bool
// MCItemStackMutable.hasTrim as boolmyMCItemStackMutable.hasTrim
Return Type:
bool
// MCItemStackMutable.hasUnbreakable as boolmyMCItemStackMutable.hasUnbreakable
Return Type:
bool
// MCItemStackMutable.hasWritableBookContent as boolmyMCItemStackMutable.hasWritableBookContent
Return Type:
bool
// MCItemStackMutable.hasWrittenBookContent as boolmyMCItemStackMutable.hasWrittenBookContent
Return Type:
bool
// MCItemStackMutable.hideAdditionalTooltip as boolmyMCItemStackMutable.hideAdditionalTooltip
Return Type:
bool
// MCItemStackMutable.hideTooltip as boolmyMCItemStackMutable.hideTooltip
Return Type:
bool
// MCItemStackMutable.ingredient as IIngredientmyMCItemStackMutable.ingredient
Return Type:
IIngredient
// MCItemStackMutable.instrument as InstrumentmyMCItemStackMutable.instrument
Return Type:
Instrument
// MCItemStackMutable.isEnchantable as boolmyMCItemStackMutable.isEnchantable
Return Type:
bool
// MCItemStackMutable.isFireResistant as boolmyMCItemStackMutable.isFireResistant
Return Type:
bool
// MCItemStackMutable.isIntangibleProjectile as boolmyMCItemStackMutable.isIntangibleProjectile
Return Type:
bool
// MCItemStackMutable.isMutable as boolmyMCItemStackMutable.isMutable
Return Type:
bool
// MCItemStackMutable.isMutable() as bool;myMCItemStackMutable.isMutable();
Return Type:
bool
// MCItemStackMutable.lodestoneTracker as LodestoneTrackermyMCItemStackMutable.lodestoneTracker
Return Type:
LodestoneTracker
// MCItemStackMutable.mapColor as MapItemColormyMCItemStackMutable.mapColor
Return Type:
MapItemColor
// MCItemStackMutable.mapDecorations as MapDecorationsmyMCItemStackMutable.mapDecorations
Return Type:
MapDecorations
// MCItemStackMutable.mapPostProcessing as MapPostProcessingmyMCItemStackMutable.mapPostProcessing
Return Type:
MapPostProcessing
myMCItemStackMutable.matches(<item:minecraft:iron_ingot>);
Parameters:
Return Type:
bool
// MCItemStackMutable.maxDamage as intmyMCItemStackMutable.maxDamage
Return Type:
int
// MCItemStackMutable.maxDamage as intmyMCItemStackMutable.maxDamage
Return Type:
int
// MCItemStackMutable.maxStackSize as intmyMCItemStackMutable.maxStackSize
Return Type:
int
// MCItemStackMutable.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);myMCItemStackMutable.modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
Parameters:
shiftedFunction: ITooltipFunction
Type: ITooltipFunction
myMCItemStackMutable.modifyTooltip(myITooltipFunction);
Parameters:
function: ITooltipFunction
Type: ITooltipFunction
myMCItemStackMutable.mul(myInt);
Parameters:
amount: int
Type: int
Return Type:
IIngredientWithAmount
// MCItemStackMutable.noteBlockSound as ResourceLocationmyMCItemStackMutable.noteBlockSound
Return Type:
ResourceLocation
// MCItemStackMutable.ominousBottleAmplifier as intmyMCItemStackMutable.ominousBottleAmplifier
Return Type:
int
myMCItemStackMutable.onlyDamagedAtLeast(myInt);
Parameters:
minDamage: int
Type: int
Return Type:
IIngredient
myMCItemStackMutable.onlyDamagedAtMost(myInt);
Parameters:
maxDamage: int
Type: int
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
// MCItemStackMutable.owner as stringmyMCItemStackMutable.owner
Return Type:
string
myMCItemStackMutable.percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged<IItemStack>
// MCItemStackMutable.potDecorations as PotDecorationsmyMCItemStackMutable.potDecorations
Return Type:
PotDecorations
// MCItemStackMutable.potionContents as PotionContentsmyMCItemStackMutable.potionContents
Return Type:
PotionContents
// MCItemStackMutable.profile as ResolvableProfilemyMCItemStackMutable.profile
Return Type:
ResolvableProfile
// MCItemStackMutable.prototype as DataComponentMapmyMCItemStackMutable.prototype
Return Type:
DataComponentMap
myMCItemStackMutable.recipes
Return Type:
List<ResourceLocation>
// MCItemStackMutable.registryName as ResourceLocationmyMCItemStackMutable.registryName
Return Type:
ResourceLocation
myMCItemStackMutable.remove<T>(myDataComponentType);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
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>]);
Parameters:
myMCItemStackMutable.removeGlobalAttributeModifier("8c1b5535-9f79-448b-87ae-52d81480aaa3", [<constant:minecraft:equipmentslot:chest>]);
Parameters:
uuid: string
Type: string
- The unique id of the AttributeModifier to remove. 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
// MCItemStackMutable.repairCost as intmyMCItemStackMutable.repairCost
Return Type:
int
myMCItemStackMutable.setBurnTime(500, myIRecipeManager);
Parameters:
time: int
Type: int
- the new burn time manager: IRecipeManager<Recipe>
Type: IRecipeManager<Recipe>
Returns: This IItemStack if mutable, a new one with the new amount otherwise.
myMCItemStackMutable.shrink(2);
Parameters:
amount: int
(optional) Type: int
- The amount to shrink by.
Default Value: 1
Return Type:
IItemStack
// MCItemStackMutable.stackable as boolmyMCItemStackMutable.stackable
Return Type:
bool
// MCItemStackMutable.storedEnchantments as ItemEnchantmentsmyMCItemStackMutable.storedEnchantments
Return Type:
ItemEnchantments
// MCItemStackMutable.suspiciousStewEffects as SuspiciousStewEffectsmyMCItemStackMutable.suspiciousStewEffects
Return Type:
SuspiciousStewEffects
// MCItemStackMutable.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;myMCItemStackMutable.transformCustom(myString, myFunction);
Parameters:
uid: string
Type: string
function: function(r as IItemStack) as IItemStack
(optional) Type: function(r as IItemStack) as IItemStack
Default Value: null
Return Type:
IIngredient
myMCItemStackMutable.transformDamage(myInt);
Parameters:
amount: int
(optional) Type: int
Default Value: 1
Return Type:
IIngredient
myMCItemStackMutable.transformReplace(myIItemStack);
Parameters:
replaceWith: IItemStack
Type: IItemStack
Return Type:
IIngredient
// MCItemStackMutable.unbreakable as UnbreakablemyMCItemStackMutable.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:
type: DataComponentType<T>
Type: DataComponentType<T>
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:
type: DataComponentType<T>
Type: DataComponentType<T>
defaultValue: T
Type: T
operator: UnaryOperator<T>
Type: UnaryOperator<T>
Return Type:
IItemStack
// MCItemStackMutable.useDuration as intmyMCItemStackMutable.useDuration
Return Type:
int
// MCItemStackMutable.useOnRelease as boolmyMCItemStackMutable.useOnRelease
Return Type:
bool
myMCItemStackMutable.with<T>(myDataComponentType, myT);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
value: T?
Type: T?
Return Type:
IItemStack
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(););
Parameters:
modifiers: ItemAttributeModifiers
Type: ItemAttributeModifiers
- The attributes to give to the item.
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// MCItemStackMutable.withAttributeModifiers(modifier as ItemAttributeModifiersEntry, showInTooltip as bool = true) as ComponentAccess;myMCItemStackMutable.withAttributeModifiers(myEntry, myBool);
Parameters:
modifier: ItemAttributeModifiersEntry
Type: ItemAttributeModifiersEntry
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
// MCItemStackMutable.withAttributeModifiers(modifiers as List<ItemAttributeModifiersEntry>, showInTooltip as bool = true) as ComponentAccess;myMCItemStackMutable.withAttributeModifiers(myList, myBool);
Parameters:
modifiers: List<ItemAttributeModifiersEntry>
Type: List<ItemAttributeModifiersEntry>
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// MCItemStackMutable.withBannerPatterns(layers as List<BannerPatternLayersLayer>) as ComponentAccess;myMCItemStackMutable.withBannerPatterns(myList);
Parameters:
layers: List<BannerPatternLayersLayer>
Type: List<BannerPatternLayersLayer>
Return Type:
ComponentAccess
BannerPatternLayers
Returns: The new instance with the modified data.
myMCItemStackMutable.withBannerPatterns(myBannerPatternLayers);
Parameters:
layers: BannerPatternLayers
Type: BannerPatternLayers
Return Type:
ComponentAccess
DyeColor
Returns: The new instance with the modified data.
myMCItemStackMutable.withBaseColor(myDyeColor);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withBees(myList);
Parameters:
occupants: List<BeehiveBlockEntityOccupant>
Type: List<BeehiveBlockEntityOccupant>
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myMCItemStackMutable.withBlockEntityData(myMapData);
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myMCItemStackMutable.withBlockEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
BlockItemStateProperties
Returns: The new instance with the modified data.
myMCItemStackMutable.withBlockState(myBlockItemStateProperties);
Parameters:
properties: BlockItemStateProperties
Type: BlockItemStateProperties
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myMCItemStackMutable.withBucketEntityData(myMapData);
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myMCItemStackMutable.withBucketEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withBundleContents([<item:minecraft:diamond> * 64]);
Parameters:
Return Type:
ComponentAccess
BundleContents
Returns: The new instance with the modified data.
myMCItemStackMutable.withBundleContents(myBundleContents);
Parameters:
contents: BundleContents
Type: BundleContents
Return Type:
ComponentAccess
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:
predicates: List<BlockPredicate>
Type: List<BlockPredicate>
- The collection of predicates to test for showInTooltip: bool
(optional) Type: bool
- Whether to show the ability in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
AdventureModePredicate
Returns: The new instance with the modified data.
myMCItemStackMutable.withCanBreak(myAdventureModePredicate);
Parameters:
predicate: AdventureModePredicate
Type: AdventureModePredicate
- The adventure mode predicate to use to determine whether the item can be used to break a block.
Return Type:
ComponentAccess
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:
predicates: List<BlockPredicate>
Type: List<BlockPredicate>
- The collection of predicates to test for showInTooltip: bool
(optional) Type: bool
- Whether to show the restriction in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
AdventureModePredicate
Returns: The new instance with the modified data.
myMCItemStackMutable.withCanPlaceOn(myAdventureModePredicate);
Parameters:
predicate: AdventureModePredicate
Type: AdventureModePredicate
- The adventure mode predicate to use to determine whether the current block can be placed on another block.
Return Type:
ComponentAccess
IItemStack
Returns: The new instance with the modified data.
myMCItemStackMutable.withChargedProjectiles(<item:minecraft:arrow>);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withChargedProjectiles([<item:minecraft:arrow>]);
Parameters:
Return Type:
ComponentAccess
ChargedProjectiles
Returns: The new instance with the modified data.
// MCItemStackMutable.withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as ComponentAccess;myMCItemStackMutable.withChargedProjectiles(myChargedProjectiles);
Parameters:
chargedProjectiles: ChargedProjectiles
Type: ChargedProjectiles
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withContainer(myList);
Parameters:
contents: List<IItemStack>
Type: List<IItemStack>
Return Type:
ComponentAccess
ItemContainerContents
Returns: The new instance with the modified data.
myMCItemStackMutable.withContainer(myItemContainerContents);
Parameters:
contents: ItemContainerContents
Type: ItemContainerContents
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// MCItemStackMutable.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;myMCItemStackMutable.withContainerLoot(myResourceKey, myLong);
Parameters:
lootTable: ResourceKey<LootTable>
Type: ResourceKey<LootTable>
seed: long
Type: long
Return Type:
ComponentAccess
SeededContainerLoot
Returns: The new instance with the modified data.
myMCItemStackMutable.withContainerLoot(mySeededContainerLoot);
Parameters:
loot: SeededContainerLoot
Type: SeededContainerLoot
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withCreativeSlotLock();
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myMCItemStackMutable.withCustomData({custom_ammo_thing: 1, owner: "Benji"});
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myMCItemStackMutable.withCustomData(myCustomData);
Parameters:
customData: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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);
Parameters:
data: CustomModelData
Type: CustomModelData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withCustomName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
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
DebugStickState
Returns: The new instance with the modified data.
myMCItemStackMutable.withDebugStickState(myDebugStickState);
Parameters:
state: DebugStickState
Type: DebugStickState
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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
DyedItemColor
Returns: The new instance with the modified data.
myMCItemStackMutable.withDyedColor(myDyedItemColor);
Parameters:
color: DyedItemColor
Type: DyedItemColor
Return Type:
ComponentAccess
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
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.
myMCItemStackMutable.withEnchantmentGlintOverride(true);
Parameters:
value: bool
Type: bool
- The value of the override, as described above
Return Type:
ComponentAccess
ItemEnchantments
Returns: The new instance with the modified data.
myMCItemStackMutable.withEnchantments(myItemEnchantments);
Parameters:
enchantments: ItemEnchantments
Type: ItemEnchantments
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myMCItemStackMutable.withEntityData(myMapData);
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myMCItemStackMutable.withEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withFireResistant();
Return Type:
ComponentAccess
FireworkExplosion
Returns: The new instance with the modified data.
myMCItemStackMutable.withFireworkExplosion(myFireworkExplosion);
Parameters:
explosion: FireworkExplosion
Type: FireworkExplosion
Return Type:
ComponentAccess
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
explosions: List<FireworkExplosion>
Type: List<FireworkExplosion>
Return Type:
ComponentAccess
Fireworks
Returns: The new instance with the modified data.
myMCItemStackMutable.withFireworks(myFireworks);
Return Type:
ComponentAccess
FoodProperties
Returns: The new instance with the modified data.
myMCItemStackMutable.withFood(myFoodProperties);
Parameters:
food: FoodProperties
Type: FoodProperties
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withHideTooltip();
Return Type:
ComponentAccess
Instrument
Returns: The new instance with the modified data.
myMCItemStackMutable.withInstrument(myInstrument);
Parameters:
instrument: Instrument
Type: Instrument
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withIntangibleProjectile();
Return Type:
ComponentAccess
Component
Returns: The new instance with the modified data.
myMCItemStackMutable.withItemName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
// MCItemStackMutable.withJsonComponent(type as DataComponentType<T>, value as IData) as IItemStack;myMCItemStackMutable.withJsonComponent(myDataComponentType, myIData);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
myMCItemStackMutable.withJsonComponents(myIData);
Return Type:
IItemStack
Returns: The new instance with the modified data.
myMCItemStackMutable.withLock(myString);
Parameters:
code: string
Type: string
Return Type:
ComponentAccess
LockCode
Returns: The new instance with the modified data.
myMCItemStackMutable.withLock(myLockCode);
Return Type:
ComponentAccess
LodestoneTracker
Returns: The new instance with the modified data.
myMCItemStackMutable.withLodestoneTracker(myLodestoneTracker);
Parameters:
tracker: LodestoneTracker
Type: LodestoneTracker
Return Type:
ComponentAccess
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:
Return Type:
ComponentAccess
ItemLore
Returns: The new instance with the modified data.
myMCItemStackMutable.withLore(myItemLore);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withMapColor(0xFF0000);
Parameters:
rgb: int
Type: int
- The new map colour
Return Type:
ComponentAccess
MapItemColor
Returns: The new instance with the modified data.
myMCItemStackMutable.withMapColor(myMapItemColor);
Parameters:
color: MapItemColor
Type: MapItemColor
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// MCItemStackMutable.withMapDecorations(decorations as MapDecorationsEntry[string]) as ComponentAccess;myMCItemStackMutable.withMapDecorations(myMap);
Parameters:
decorations: MapDecorationsEntry[string]
Type: MapDecorationsEntry[string]
Return Type:
ComponentAccess
MapDecorations
Returns: The new instance with the modified data.
myMCItemStackMutable.withMapDecorations(myMapDecorations);
Parameters:
decorations: MapDecorations
Type: MapDecorations
Return Type:
ComponentAccess
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);
Parameters:
id: int
Type: int
Return Type:
ComponentAccess
MapId
Returns: The new instance with the modified data.
myMCItemStackMutable.withMapId(myMapId);
Return Type:
ComponentAccess
MapPostProcessing
Returns: The new instance with the modified data.
myMCItemStackMutable.withMapPostProcessing(myMapPostProcessing);
Parameters:
value: MapPostProcessing
Type: MapPostProcessing
Return Type:
ComponentAccess
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);
Parameters:
maxDamage: int
Type: int
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withMaxStackSize(16);
Parameters:
maxStackSize: int
Type: int
- The new maxStackSize of the ComponentAccess.
Return Type:
ComponentAccess
ResourceLocation
Returns: The new instance with the modified data.
myMCItemStackMutable.withNoteBlockSound(myResourceLocation);
Parameters:
sound: ResourceLocation
Type: ResourceLocation
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withOminousBottleAmplifier(myInt);
Parameters:
amplifier: int
Type: int
Return Type:
ComponentAccess
myMCItemStackMutable.without<T>(myDataComponentType);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutAttributeModifiers();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBannerPatterns();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBaseColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBees();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBlockEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBlockState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBucketEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutBundleContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutCanBreak();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutCanPlaceOn();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutChargedProjectiles();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutContainer();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutContainerLoot();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutCreativeSlotLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutCustomData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutCustomModelData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutCustomName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutDebugStickState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutDyedColor();
Return Type:
ComponentAccess
Enchantment
from the ComponentAccess.Returns: The new instance with the modified data.
myMCItemStackMutable.withoutEnchantment(<enchantment:minecraft:mending>);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutEntityDate();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutFireResistant();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutFireworkExplosion();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutFireworks();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutFood();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutHideTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutInstrument();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutIntangibleProjectile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutItemName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutLodestoneTracker();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutLore();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutMapColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutMapDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutMapId();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutMapPostProcessing();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutMaxDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutMaxStackSize();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutNoteBlockSound();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutPotDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutPotionContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutProfile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutRarity();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutRecipes();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutRepairCost();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutStoredEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutTool();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutTrim();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutUnbreakable();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutWritableBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withoutWrittenBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// MCItemStackMutable.withPotDecorations(back as ItemDefinition, left as ItemDefinition, right as ItemDefinition, front as ItemDefinition) as ComponentAccess;myMCItemStackMutable.withPotDecorations(myItem, myItem, myItem, myItem);
Parameters:
back: ItemDefinition
Type: ItemDefinition
left: ItemDefinition
Type: ItemDefinition
right: ItemDefinition
Type: ItemDefinition
front: ItemDefinition
Type: ItemDefinition
Return Type:
ComponentAccess
PotDecorations
Returns: The new instance with the modified data.
myMCItemStackMutable.withPotDecorations(myPotDecorations);
Parameters:
decorations: PotDecorations
Type: PotDecorations
Return Type:
ComponentAccess
Potion
and no custom effects
Returns: The new instance with the modified data.
myMCItemStackMutable.withPotionContents(<potion:minecraft:swiftness>);
Return Type:
ComponentAccess
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)]);
Parameters:
customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
- The effects to grant upon consuming this potion.
Return Type:
ComponentAccess
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. customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
- The effects to grant upon consuming this potion.
Return Type:
ComponentAccess
PotionContents
Returns: The new instance with the modified data.
myMCItemStackMutable.withPotionContents(myPotionContents);
Parameters:
contents: PotionContents
Type: PotionContents
Return Type:
ComponentAccess
ResolvableProfile
Returns: The new instance with the modified data.
myMCItemStackMutable.withProfile(myResolvableProfile);
Parameters:
profile: ResolvableProfile
Type: ResolvableProfile
Return Type:
ComponentAccess
Rarity
Returns: The new instance with the modified data.
myMCItemStackMutable.withRarity(<constant:minecraft:item/rarity:epic>);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withRecipes(myList);
Parameters:
recipes: List<ResourceLocation>
Type: List<ResourceLocation>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myMCItemStackMutable.withRepairCost(20);
Parameters:
cost: int
Type: int
- The repair cost
Return Type:
ComponentAccess
ItemEnchantments
Returns: The new instance with the modified data.
myMCItemStackMutable.withStoredEnchantments(myItemEnchantments);
Parameters:
enchantments: ItemEnchantments
Type: ItemEnchantments
Return Type:
ComponentAccess
SuspiciousStewEffects
SuspiciousStewEffects.Entry is effectively a pair of Effect and duration.
Returns: The new instance with the modified data.
// MCItemStackMutable.withSuspiciousStewEffects(effects as List<SuspiciousStewEffectsEntry>) as ComponentAccess;myMCItemStackMutable.withSuspiciousStewEffects(myList);
Parameters:
effects: List<SuspiciousStewEffectsEntry>
Type: List<SuspiciousStewEffectsEntry>
- The list of effects to grant on consumption.
Return Type:
ComponentAccess
SuspiciousStewEffects
Returns: The new instance with the modified data.
// MCItemStackMutable.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;myMCItemStackMutable.withSuspiciousStewEffects(mySuspiciousStewEffects);
Parameters:
suspiciousStewEffects: SuspiciousStewEffects
Type: SuspiciousStewEffects
Return Type:
ComponentAccess
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:
Return Type:
ComponentAccess
Tool
Returns: The new instance with the modified data.
myMCItemStackMutable.withTool(myTool);
Return Type:
ComponentAccess
ArmorTrim
Returns: The new instance with the modified data.
myMCItemStackMutable.withTrim(myArmorTrim);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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
Returns: The new instance with the modified data.
myMCItemStackMutable.withUnbreakable(myUnbreakable);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// MCItemStackMutable.withWritableBookContent(pages as List<Filterable<string>>) as ComponentAccess;myMCItemStackMutable.withWritableBookContent(myList);
Parameters:
pages: List<Filterable<string>>
Type: List<Filterable<string>>
Return Type:
ComponentAccess
WritableBookContent
Returns: The new instance with the modified data.
myMCItemStackMutable.withWritableBookContent(myWritableBookContent);
Parameters:
content: WritableBookContent
Type: WritableBookContent
Return Type:
ComponentAccess
WrittenBookContent
Returns: The new instance with the modified data.
myMCItemStackMutable.withWrittenBookContent(myWrittenBookContent);
Parameters:
content: WrittenBookContent
Type: WrittenBookContent
Return Type:
ComponentAccess
// MCItemStackMutable.writableBookContent as WritableBookContentmyMCItemStackMutable.writableBookContent
Return Type:
WritableBookContent
// MCItemStackMutable.writtenBookContent as WrittenBookContentmyMCItemStackMutable.writtenBookContent
Return Type:
WrittenBookContent