IItemStack
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.IItemStack;
Implements
IItemStack
implements the following interfaces:
IIngredient
,IIngredientWithAmount
,DataComponentHolder
,ComponentAccess<IItemStack>
,CommandStringDisplayable
Undocumented Interfaces
IDataComponentHolderExtension
Operators
myIIngredient in myIItemStack
Parameters:
Return Type:
bool
// (IItemStack * (amount as int)) as IIngredientWithAmountmyIItemStack * myInt
Parameters:
amount: int
Type: int
Return Type:
IIngredientWithAmount
myIItemStack | myIIngredient
Parameters:
other: IIngredient
Type: IIngredient
Return Type:
IIngredientList
myIItemStack % myDouble
Parameters:
percentage: double
Type: double
Return Type:
Percentaged<IItemStack>
// (IItemStack * (amount as int)) as IItemStackmyIItemStack * 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
// IItemStack.addGlobalAttributeModifier(attribute as Attribute, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myIItemStack.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
// IItemStack.addGlobalAttributeModifier(attribute as Attribute, uuid as string, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myIItemStack.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
// IItemStack.addGlobalAttributeModifier(attribute as Attribute, uuid as UUID, name as string, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myIItemStack.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. // IItemStack.amount as intmyIItemStack.amount
Return Type:
int
myIItemStack.applyComponents(myDataComponentMap);
Parameters:
map: DataComponentMap
Type: DataComponentMap
Return Type:
IItemStack
myIItemStack.applyComponents(myDataComponentPatch);
Parameters:
patch: DataComponentPatch
Type: DataComponentPatch
Return Type:
IItemStack
myIItemStack.applyComponentsAndValidate(myDataComponentPatch);
Parameters:
patch: DataComponentPatch
Type: DataComponentPatch
Return Type:
IItemStack
// IItemStack as IIngredientWithAmountmyIItemStack as IIngredientWithAmount
Return Type:
IIngredientWithAmount
myIItemStack as Percentaged<IItemStack>
Return Type:
Percentaged<IItemStack>
// IItemStack.attributeModifiers as ItemAttributeModifiersmyIItemStack.attributeModifiers
Return Type:
ItemAttributeModifiers
// IItemStack.bannerPatterns as BannerPatternLayersmyIItemStack.bannerPatterns
Return Type:
BannerPatternLayers
// IItemStack.BASE_ATTACK_DAMAGE_UUID as UUIDIItemStack.BASE_ATTACK_DAMAGE_UUID
Return Type:
UUID
// IItemStack.BASE_ATTACK_SPEED_UUID as UUIDIItemStack.BASE_ATTACK_SPEED_UUID
Return Type:
UUID
// IItemStack.baseColor as DyeColormyIItemStack.baseColor
Return Type:
DyeColor
myIItemStack.bees
Return Type:
List<BeehiveBlockEntityOccupant>
// IItemStack.blockEntityData as CustomDatamyIItemStack.blockEntityData
Return Type:
CustomData
// IItemStack.blockState as BlockItemStatePropertiesmyIItemStack.blockState
Return Type:
BlockItemStateProperties
// IItemStack.bucketEntityData as CustomDatamyIItemStack.bucketEntityData
Return Type:
CustomData
// IItemStack.bundleContents as BundleContentsmyIItemStack.bundleContents
Return Type:
BundleContents
// IItemStack.burnTime as intmyIItemStack.burnTime
Return Type:
int
// IItemStack.burnTime = (time as int);myIItemStack.burnTime = myInt;
Parameters:
time: int
Type: int
- the new burn time // IItemStack.burnTime(time as int);myIItemStack.burnTime(500);
Parameters:
time: int
Type: int
- the new burn time // IItemStack.canBreak as AdventureModePredicatemyIItemStack.canBreak
Return Type:
AdventureModePredicate
// IItemStack.canPlaceOn as AdventureModePredicatemyIItemStack.canPlaceOn
Return Type:
AdventureModePredicate
// IItemStack.chargedProjectiles as ChargedProjectilesmyIItemStack.chargedProjectiles
Return Type:
ChargedProjectiles
// IItemStack.clearTooltip(leaveName as bool = false);myIItemStack.clearTooltip(myBool);
Parameters:
leaveName: bool
(optional) Type: bool
Default Value: false
// IItemStack.componentsPatch as DataComponentPatchmyIItemStack.componentsPatch
Return Type:
DataComponentPatch
// IItemStack.container as ItemContainerContentsmyIItemStack.container
Return Type:
ItemContainerContents
// IItemStack.containerLoot as SeededContainerLootmyIItemStack.containerLoot
Return Type:
SeededContainerLoot
myIItemStack.contains((<item:minecraft:iron_ingot> | <item:minecraft:gold_ingot>));
Parameters:
Return Type:
bool
// IItemStack.CRAFTTWEAKER_DATA_KEY as stringIItemStack.CRAFTTWEAKER_DATA_KEY
Return Type:
string
// IItemStack.creativeSlotLock as boolmyIItemStack.creativeSlotLock
Return Type:
bool
// IItemStack.customData as CustomDatamyIItemStack.customData
Return Type:
CustomData
// IItemStack.customModelData as CustomModelDatamyIItemStack.customModelData
Return Type:
CustomModelData
// IItemStack.damage as intmyIItemStack.damage
Return Type:
int
// IItemStack.damageableItem as boolmyIItemStack.damageableItem
Return Type:
bool
// IItemStack.damaged as boolmyIItemStack.damaged
Return Type:
bool
// IItemStack.debugStickState as DebugStickStatemyIItemStack.debugStickState
Return Type:
DebugStickState
// IItemStack.definition as ItemDefinitionmyIItemStack.definition
Return Type:
ItemDefinition
// IItemStack as ItemDefinitionmyIItemStack as Item
Return Type:
ItemDefinition
// IItemStack.descriptionId as stringmyIItemStack.descriptionId
Return Type:
string
// IItemStack.dyedColor as DyedItemColormyIItemStack.dyedColor
Return Type:
DyedItemColor
If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
// IItemStack.enchantmentGlintOverride as boolmyIItemStack.enchantmentGlintOverride
Return Type:
bool
// IItemStack.enchantments as ItemEnchantmentsmyIItemStack.enchantments
Return Type:
ItemEnchantments
// IItemStack.entityData as CustomDatamyIItemStack.entityData
Return Type:
CustomData
// IItemStack.fireworkExplosion as FireworkExplosionmyIItemStack.fireworkExplosion
Return Type:
FireworkExplosion
// IItemStack.food as FoodPropertiesmyIItemStack.food
Return Type:
FoodProperties
Returns: A Map of Attribute to a List of AttributeModifier for the given EquipmentSlot.
myIItemStack.getAttributes(<constant:minecraft:equipmentslot:chest>);
Parameters:
Return Type:
List<AttributeModifier>[Attribute]
myIItemStack.getRemainingItem(<item:minecraft:iron_ingot>);
Parameters:
Return Type:
IItemStack
Returns: This IItemStack if mutable, a new one with the new amount otherwise.
myIItemStack.grow(2);
Parameters:
amount: int
(optional) Type: int
- The amount to grow by.
Default Value: 1
Return Type:
IItemStack
// IItemStack.hasAttributeModifiers as boolmyIItemStack.hasAttributeModifiers
Return Type:
bool
// IItemStack.hasBannerPatterns as boolmyIItemStack.hasBannerPatterns
Return Type:
bool
// IItemStack.hasBaseColor as boolmyIItemStack.hasBaseColor
Return Type:
bool
// IItemStack.hasBees as boolmyIItemStack.hasBees
Return Type:
bool
// IItemStack.hasBlockEntityData as boolmyIItemStack.hasBlockEntityData
Return Type:
bool
// IItemStack.hasBlockState as boolmyIItemStack.hasBlockState
Return Type:
bool
// IItemStack.hasBucketEntityData as boolmyIItemStack.hasBucketEntityData
Return Type:
bool
// IItemStack.hasBundleContents as boolmyIItemStack.hasBundleContents
Return Type:
bool
// IItemStack.hasCanBreak as boolmyIItemStack.hasCanBreak
Return Type:
bool
// IItemStack.hasCanPlaceOn as boolmyIItemStack.hasCanPlaceOn
Return Type:
bool
// IItemStack.hasChargedProjectiles as boolmyIItemStack.hasChargedProjectiles
Return Type:
bool
// IItemStack.hasContainer as boolmyIItemStack.hasContainer
Return Type:
bool
// IItemStack.hasContainerLoot as boolmyIItemStack.hasContainerLoot
Return Type:
bool
// IItemStack.hasCustomData as boolmyIItemStack.hasCustomData
Return Type:
bool
// IItemStack.hasCustomModelData as boolmyIItemStack.hasCustomModelData
Return Type:
bool
// IItemStack.hasCustomName as boolmyIItemStack.hasCustomName
Return Type:
bool
// IItemStack.hasDamage as boolmyIItemStack.hasDamage
Return Type:
bool
// IItemStack.hasDebugStickState as boolmyIItemStack.hasDebugStickState
Return Type:
bool
// IItemStack.hasDyedColor as boolmyIItemStack.hasDyedColor
Return Type:
bool
// IItemStack.hasEnchantmentGlintOverride as boolmyIItemStack.hasEnchantmentGlintOverride
Return Type:
bool
// IItemStack.hasEnchantments as boolmyIItemStack.hasEnchantments
Return Type:
bool
// IItemStack.hasEntityData as boolmyIItemStack.hasEntityData
Return Type:
bool
// IItemStack.hasFireworkExplosion as boolmyIItemStack.hasFireworkExplosion
Return Type:
bool
// IItemStack.hasFireworks as boolmyIItemStack.hasFireworks
Return Type:
bool
Foil is the glint / effect that is added to enchanted ItemStacks (and other items).
// IItemStack.hasFoil as boolmyIItemStack.hasFoil
Return Type:
bool
// IItemStack.hasFood as boolmyIItemStack.hasFood
Return Type:
bool
// IItemStack.hasInstrument as boolmyIItemStack.hasInstrument
Return Type:
bool
// IItemStack.hasItemName as boolmyIItemStack.hasItemName
Return Type:
bool
// IItemStack.hasLock as boolmyIItemStack.hasLock
Return Type:
bool
// IItemStack.hasLodestoneTracker as boolmyIItemStack.hasLodestoneTracker
Return Type:
bool
// IItemStack.hasLore as boolmyIItemStack.hasLore
Return Type:
bool
// IItemStack.hasMapColor as boolmyIItemStack.hasMapColor
Return Type:
bool
// IItemStack.hasMapDecorations as boolmyIItemStack.hasMapDecorations
Return Type:
bool
// IItemStack.hasMapId as boolmyIItemStack.hasMapId
Return Type:
bool
// IItemStack.hasMapPostProcessing as boolmyIItemStack.hasMapPostProcessing
Return Type:
bool
// IItemStack.hasMaxDamage as boolmyIItemStack.hasMaxDamage
Return Type:
bool
// IItemStack.hasMaxStackSize as boolmyIItemStack.hasMaxStackSize
Return Type:
bool
// IItemStack.hasNoteBlockSound as boolmyIItemStack.hasNoteBlockSound
Return Type:
bool
// IItemStack.hasOminousBottleAmplifier as boolmyIItemStack.hasOminousBottleAmplifier
Return Type:
bool
// IItemStack.hasPotDecorations as boolmyIItemStack.hasPotDecorations
Return Type:
bool
// IItemStack.hasPotionContents as boolmyIItemStack.hasPotionContents
Return Type:
bool
// IItemStack.hasProfile as boolmyIItemStack.hasProfile
Return Type:
bool
// IItemStack.hasRarity as boolmyIItemStack.hasRarity
Return Type:
bool
// IItemStack.hasRecipes as boolmyIItemStack.hasRecipes
Return Type:
bool
// IItemStack.hasRepairCost as boolmyIItemStack.hasRepairCost
Return Type:
bool
// IItemStack.hasStoredEnchantments as boolmyIItemStack.hasStoredEnchantments
Return Type:
bool
// IItemStack.hasSuspiciousStewEffects as boolmyIItemStack.hasSuspiciousStewEffects
Return Type:
bool
// IItemStack.hasTool as boolmyIItemStack.hasTool
Return Type:
bool
// IItemStack.hasTrim as boolmyIItemStack.hasTrim
Return Type:
bool
// IItemStack.hasUnbreakable as boolmyIItemStack.hasUnbreakable
Return Type:
bool
// IItemStack.hasWritableBookContent as boolmyIItemStack.hasWritableBookContent
Return Type:
bool
// IItemStack.hasWrittenBookContent as boolmyIItemStack.hasWrittenBookContent
Return Type:
bool
// IItemStack.hideAdditionalTooltip as boolmyIItemStack.hideAdditionalTooltip
Return Type:
bool
// IItemStack.hideTooltip as boolmyIItemStack.hideTooltip
Return Type:
bool
// IItemStack.instrument as InstrumentmyIItemStack.instrument
Return Type:
Instrument
// IItemStack.isEnchantable as boolmyIItemStack.isEnchantable
Return Type:
bool
// IItemStack.isFireResistant as boolmyIItemStack.isFireResistant
Return Type:
bool
// IItemStack.isImmutable as boolmyIItemStack.isImmutable
Return Type:
bool
// IItemStack.isImmutable() as bool;myIItemStack.isImmutable();
Return Type:
bool
// IItemStack.isIntangibleProjectile as boolmyIItemStack.isIntangibleProjectile
Return Type:
bool
// IItemStack.isMutable as boolmyIItemStack.isMutable
Return Type:
bool
// IItemStack.isMutable() as bool;myIItemStack.isMutable();
Return Type:
bool
myIItemStack.items
Return Type:
IItemStack[]
// IItemStack.lockComponent as LockCodemyIItemStack.lockComponent
Return Type:
LockCode
// IItemStack.lodestoneTracker as LodestoneTrackermyIItemStack.lodestoneTracker
Return Type:
LodestoneTracker
// IItemStack.mapColor as MapItemColormyIItemStack.mapColor
Return Type:
MapItemColor
// IItemStack.mapDecorations as MapDecorationsmyIItemStack.mapDecorations
Return Type:
MapDecorations
// IItemStack.mapId as MapIdmyIItemStack.mapId
Return Type:
MapId
// IItemStack.mapPostProcessing as MapPostProcessingmyIItemStack.mapPostProcessing
Return Type:
MapPostProcessing
// IItemStack.maxDamage as intmyIItemStack.maxDamage
Return Type:
int
// IItemStack.maxStackSize as intmyIItemStack.maxStackSize
Return Type:
int
// IItemStack.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);myIItemStack.modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
Parameters:
shiftedFunction: ITooltipFunction
Type: ITooltipFunction
myIItemStack.modifyTooltip(myITooltipFunction);
Parameters:
function: ITooltipFunction
Type: ITooltipFunction
myIItemStack.mul(myInt);
Parameters:
amount: int
Type: int
Return Type:
IIngredientWithAmount
// IItemStack.noteBlockSound as ResourceLocationmyIItemStack.noteBlockSound
Return Type:
ResourceLocation
// IItemStack.ominousBottleAmplifier as intmyIItemStack.ominousBottleAmplifier
Return Type:
int
myIItemStack.onlyDamagedAtLeast(myInt);
Parameters:
minDamage: int
Type: int
Return Type:
IIngredient
myIItemStack.onlyDamagedAtMost(myInt);
Parameters:
maxDamage: int
Type: int
Return Type:
IIngredient
// IItemStack.onlyIf(uid as string, function as function(t as IItemStack) as bool = null) as IIngredient;myIItemStack.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
// IItemStack.owner as stringmyIItemStack.owner
Return Type:
string
myIItemStack.percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged<IItemStack>
// IItemStack.potDecorations as PotDecorationsmyIItemStack.potDecorations
Return Type:
PotDecorations
// IItemStack.potionContents as PotionContentsmyIItemStack.potionContents
Return Type:
PotionContents
// IItemStack.profile as ResolvableProfilemyIItemStack.profile
Return Type:
ResolvableProfile
// IItemStack.prototype as DataComponentMapmyIItemStack.prototype
Return Type:
DataComponentMap
myIItemStack.recipes
Return Type:
List<ResourceLocation>
// IItemStack.registryName as ResourceLocationmyIItemStack.registryName
Return Type:
ResourceLocation
myIItemStack.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.
myIItemStack.removeGlobalAttribute(<attribute:minecraft:generic.attack_damage>, [<constant:minecraft:equipmentslot:chest>]);
Parameters:
myIItemStack.removeGlobalAttributeModifier("8c1b5535-9f79-448b-87ae-52d81480aaa3", [<constant:minecraft:equipmentslot:chest>]);
Parameters:
uuid: string
Type: string
- The unique id of the AttributeModifier to remove. myIItemStack.removeGlobalAttributeModifier(IItemStack.BASE_ATTACK_DAMAGE_UUID, [<constant:minecraft:equipmentslot:chest>]);
Parameters:
uuid: UUID
Type: UUID
- The unique id of the AttributeModifier to remove. // IItemStack.removeTooltip(regex as string);myIItemStack.removeTooltip(myString);
Parameters:
regex: string
Type: string
// IItemStack.repairCost as intmyIItemStack.repairCost
Return Type:
int
Returns: This IItemStack if mutable, a new one with the new amount otherwise.
myIItemStack.shrink(2);
Parameters:
amount: int
(optional) Type: int
- The amount to shrink by.
Default Value: 1
Return Type:
IItemStack
// IItemStack.stackable as boolmyIItemStack.stackable
Return Type:
bool
// IItemStack.storedEnchantments as ItemEnchantmentsmyIItemStack.storedEnchantments
Return Type:
ItemEnchantments
// IItemStack.suspiciousStewEffects as SuspiciousStewEffectsmyIItemStack.suspiciousStewEffects
Return Type:
SuspiciousStewEffects
// IItemStack.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;myIItemStack.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
myIItemStack.transformDamage(myInt);
Parameters:
amount: int
(optional) Type: int
Default Value: 1
Return Type:
IIngredient
myIItemStack.transformReplace(myIItemStack);
Parameters:
replaceWith: IItemStack
Type: IItemStack
Return Type:
IIngredient
// IItemStack.unbreakable as UnbreakablemyIItemStack.unbreakable
Return Type:
Unbreakable
// IItemStack.update<T, U>(type as DataComponentType<T>, defaultValue as T, data as U, operator as BiFunction<T, T, U>) as IItemStack;myIItemStack.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
// IItemStack.update<T>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IItemStack;myIItemStack.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
// IItemStack.useDuration as intmyIItemStack.useDuration
Return Type:
int
// IItemStack.useOnRelease as boolmyIItemStack.useOnRelease
Return Type:
bool
myIItemStack.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.
myIItemStack.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.
// IItemStack.withAttributeModifiers(modifier as ItemAttributeModifiersEntry, showInTooltip as bool = true) as ComponentAccess;myIItemStack.withAttributeModifiers(myEntry, myBool);
Parameters:
modifier: ItemAttributeModifiersEntry
Type: ItemAttributeModifiersEntry
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
// IItemStack.withAttributeModifiers(modifiers as List<ItemAttributeModifiersEntry>, showInTooltip as bool = true) as ComponentAccess;myIItemStack.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.
myIItemStack.withBannerPatterns(myList);
Parameters:
layers: List<BannerPatternLayersLayer>
Type: List<BannerPatternLayersLayer>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBannerPatterns(myBannerPatternLayers);
Parameters:
layers: BannerPatternLayers
Type: BannerPatternLayers
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBaseColor(myDyeColor);
Parameters:
color: DyeColor
Type: DyeColor
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBees(myList);
Parameters:
occupants: List<BeehiveBlockEntityOccupant>
Type: List<BeehiveBlockEntityOccupant>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBlockEntityData(myMapData);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBlockEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBlockState(myBlockItemStateProperties);
Parameters:
properties: BlockItemStateProperties
Type: BlockItemStateProperties
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBucketEntityData(myMapData);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBucketEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withBundleContents(myList);
Parameters:
contents: List<IItemStack>
Type: List<IItemStack>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.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.
// IItemStack.withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;myIItemStack.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
Returns: The new instance with the modified data.
myIItemStack.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.
// IItemStack.withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;myIItemStack.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
Returns: The new instance with the modified data.
myIItemStack.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
Returns: The new instance with the modified data.
myIItemStack.withChargedProjectiles(myIItemStack);
Parameters:
item: IItemStack
Type: IItemStack
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withChargedProjectiles(myList);
Parameters:
items: List<IItemStack>
Type: List<IItemStack>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withChargedProjectiles(myChargedProjectiles);
Parameters:
chargedProjectiles: ChargedProjectiles
Type: ChargedProjectiles
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withContainer(myList);
Parameters:
contents: List<IItemStack>
Type: List<IItemStack>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withContainer(myItemContainerContents);
Parameters:
contents: ItemContainerContents
Type: ItemContainerContents
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;myIItemStack.withContainerLoot(myResourceKey, myLong);
Parameters:
lootTable: ResourceKey<LootTable>
Type: ResourceKey<LootTable>
seed: long
Type: long
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withContainerLoot(mySeededContainerLoot);
Parameters:
loot: SeededContainerLoot
Type: SeededContainerLoot
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withCreativeSlotLock();
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myIItemStack.withCustomData({custom_ammo_thing: 1, owner: "Benji"});
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myIItemStack.withCustomData(myCustomData);
Parameters:
customData: CustomData
Type: CustomData
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myIItemStack.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.
myIItemStack.withCustomModelData(myCustomModelData);
Parameters:
data: CustomModelData
Type: CustomModelData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withCustomName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withDamage(16);
Parameters:
damage: int
Type: int
- The new damage of the ComponentAccess.
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withDebugStickState(myDebugStickState);
Parameters:
state: DebugStickState
Type: DebugStickState
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withDyedColor(myInt, myBool);
Parameters:
rgb: int
Type: int
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withDyedColor(myDyedItemColor);
Parameters:
color: DyedItemColor
Type: DyedItemColor
Return Type:
ComponentAccess
Enchantment
and level.Returns: The new instance with the modified data.
myIItemStack.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.
myIItemStack.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.
myIItemStack.withEnchantments(myItemEnchantments);
Parameters:
enchantments: ItemEnchantments
Type: ItemEnchantments
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withEntityData(myMapData);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withFireResistant();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withFireworkExplosion(myFireworkExplosion);
Parameters:
explosion: FireworkExplosion
Type: FireworkExplosion
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withFireworks(flightDuration as int, explosions as List<FireworkExplosion>) as ComponentAccess;myIItemStack.withFireworks(myInt, myList);
Parameters:
flightDuration: int
Type: int
explosions: List<FireworkExplosion>
Type: List<FireworkExplosion>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withFireworks(myFireworks);
Return Type:
ComponentAccess
FoodProperties
Returns: The new instance with the modified data.
myIItemStack.withFood(myFoodProperties);
Parameters:
food: FoodProperties
Type: FoodProperties
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withHideTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withInstrument(myInstrument);
Parameters:
instrument: Instrument
Type: Instrument
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withIntangibleProjectile();
Return Type:
ComponentAccess
Component
Returns: The new instance with the modified data.
myIItemStack.withItemName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
myIItemStack.withJsonComponent(myDataComponentType, myIData);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
myIItemStack.withJsonComponents(myIData);
Return Type:
IItemStack
Returns: The new instance with the modified data.
myIItemStack.withLock(myString);
Parameters:
code: string
Type: string
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withLock(myLockCode);
Parameters:
lock: LockCode
Type: LockCode
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withLodestoneTracker(myLodestoneTracker);
Parameters:
tracker: LodestoneTracker
Type: LodestoneTracker
Return Type:
ComponentAccess
Component
>Returns: The new instance with the modified data.
myIItemStack.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.
myIItemStack.withLore(myItemLore);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapColor(myInt);
Parameters:
rgb: int
Type: int
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapColor(myMapItemColor);
Parameters:
color: MapItemColor
Type: MapItemColor
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapDecorations(myMap);
Parameters:
decorations: MapDecorationsEntry[string]
Type: MapDecorationsEntry[string]
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapDecorations(myMapDecorations);
Parameters:
decorations: MapDecorations
Type: MapDecorations
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapId(myInt);
Parameters:
id: int
Type: int
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapId(myMapId);
Parameters:
mapId: MapId
Type: MapId
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMapPostProcessing(myMapPostProcessing);
Parameters:
value: MapPostProcessing
Type: MapPostProcessing
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMaxDamage(1024);
Parameters:
maxDamage: int
Type: int
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withMaxStackSize(16);
Parameters:
maxStackSize: int
Type: int
- The new maxStackSize of the ComponentAccess.
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withNoteBlockSound(myResourceLocation);
Parameters:
sound: ResourceLocation
Type: ResourceLocation
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withOminousBottleAmplifier(myInt);
Parameters:
amplifier: int
Type: int
Return Type:
ComponentAccess
myIItemStack.without<T>(myDataComponentType);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
Returns: The new instance with the modified data.
myIItemStack.withoutAttributeModifiers();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBannerPatterns();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBaseColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBees();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBlockEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBlockState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBucketEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutBundleContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutCanBreak();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutCanPlaceOn();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutChargedProjectiles();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutContainer();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutContainerLoot();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutCreativeSlotLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutCustomData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutCustomModelData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutCustomName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutDebugStickState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutDyedColor();
Return Type:
ComponentAccess
Enchantment
from the ComponentAccess.Returns: The new instance with the modified data.
myIItemStack.withoutEnchantment(<enchantment:minecraft:mending>);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutEntityDate();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutFireResistant();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutFireworkExplosion();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutFireworks();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutFood();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutHideTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutInstrument();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutIntangibleProjectile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutItemName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutLodestoneTracker();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutLore();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutMapColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutMapDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutMapId();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutMapPostProcessing();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutMaxDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutMaxStackSize();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutNoteBlockSound();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutPotDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutPotionContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutProfile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutRarity();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutRecipes();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutRepairCost();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutStoredEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutTool();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutTrim();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutUnbreakable();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutWritableBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withoutWrittenBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withPotDecorations(back as ItemDefinition, left as ItemDefinition, right as ItemDefinition, front as ItemDefinition) as ComponentAccess;myIItemStack.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
Returns: The new instance with the modified data.
myIItemStack.withPotDecorations(myPotDecorations);
Parameters:
decorations: PotDecorations
Type: PotDecorations
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withPotionContents(myPotion);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withPotionContents(potion as Potion, customEffects as List<MobEffectInstance>) as ComponentAccess;myIItemStack.withPotionContents(myPotion, myList);
Parameters:
customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withPotionContents(potion as Potion, customColor as int, customEffects as List<MobEffectInstance>) as ComponentAccess;myIItemStack.withPotionContents(myPotion, myInt, myList);
Parameters:
customColor: int
Type: int
customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withPotionContents(myPotionContents);
Parameters:
contents: PotionContents
Type: PotionContents
Return Type:
ComponentAccess
myIItemStack.withProfile(myResolvableProfile);
Parameters:
profile: ResolvableProfile
Type: ResolvableProfile
Return Type:
ComponentAccess
Rarity
Returns: The new instance with the modified data.
myIItemStack.withRarity(<constant:minecraft:item/rarity:epic>);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withRecipes(myList);
Parameters:
recipes: List<ResourceLocation>
Type: List<ResourceLocation>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withRepairCost(20);
Parameters:
cost: int
Type: int
- The repair cost
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withStoredEnchantments(myItemEnchantments);
Parameters:
enchantments: ItemEnchantments
Type: ItemEnchantments
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withSuspiciousStewEffects(effects as List<SuspiciousStewEffectsEntry>) as ComponentAccess;myIItemStack.withSuspiciousStewEffects(myList);
Parameters:
effects: List<SuspiciousStewEffectsEntry>
Type: List<SuspiciousStewEffectsEntry>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;myIItemStack.withSuspiciousStewEffects(mySuspiciousStewEffects);
Parameters:
suspiciousStewEffects: SuspiciousStewEffects
Type: SuspiciousStewEffects
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// IItemStack.withTool(rules as List<ToolRule>, defaultMiningSpeed as float, damagePerBlock as int) as ComponentAccess;myIItemStack.withTool(myList, myFloat, myInt);
Parameters:
Return Type:
ComponentAccess
Tool
Returns: The new instance with the modified data.
myIItemStack.withTool(myTool);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withTrim(myArmorTrim);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.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.
myIItemStack.withUnbreakable(myUnbreakable);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withWritableBookContent(myList);
Parameters:
pages: List<Filterable<string>>
Type: List<Filterable<string>>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withWritableBookContent(myWritableBookContent);
Parameters:
content: WritableBookContent
Type: WritableBookContent
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myIItemStack.withWrittenBookContent(myWrittenBookContent);
Parameters:
content: WrittenBookContent
Type: WrittenBookContent
Return Type:
ComponentAccess
// IItemStack.writableBookContent as WritableBookContentmyIItemStack.writableBookContent
Return Type:
WritableBookContent
// IItemStack.writtenBookContent as WrittenBookContentmyIItemStack.writtenBookContent
Return Type:
WrittenBookContent