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 . NeoForgeItemStack;
NeoForgeItemStack
implements the following interfaces:
IItemStack
,IIngredient
,IIngredientWithAmount
,DataComponentHolder
,ComponentAccess <IItemStack >
,CommandStringDisplayable
Undocumented Interfaces IDataComponentHolderExtension
Does the ingredient contain the given ingredient? // ((ingredient as IIngredient ) in NeoForgeItemStack) as bool myIIngredient in myNeoForgeItemStack
Return Type:
bool
Use this in contexts where machines accept more than one item to state that fact. myNeoForgeItemStack * myInt
Return Type:
IIngredientWithAmount
myNeoForgeItemStack % myDouble
Parameters:
percentage: double
Type: double
Return Type:
Percentaged <IItemStack >
Sets the amount of the ItemStack // (NeoForgeItemStack * (amount as int)) as IItemStack myNeoForgeItemStack * myInt
Parameters:
amount: int
Type: int
- new amount
Return Type:
IItemStack
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. myNeoForgeItemStack . addGlobalAttributeModifier(myAttribute, myResourceLocation, myDouble, myOperation, myEquipmentSlot[]);
Parameters:
value: double
Type: double
// NeoForgeItemStack.addShiftTooltip(content as Component , showMessage as Component = null); myNeoForgeItemStack . addShiftTooltip(myComponent, myComponent);
// NeoForgeItemStack.addTooltip(content as Component ); myNeoForgeItemStack . addTooltip(myComponent);
Gets the amount of Items in the ItemStack // NeoForgeItemStack.amount as int
myNeoForgeItemStack . amount
Return Type:
int
Gets the amount of Items in the ItemStack // NeoForgeItemStack.amount as int
myNeoForgeItemStack . amount
Return Type:
int
myNeoForgeItemStack . anyDamage();
Return Type:
IIngredient
myNeoForgeItemStack . applyComponents(myDataComponentMap);
Return Type:
IItemStack
myNeoForgeItemStack . applyComponents(myDataComponentPatch);
Return Type:
IItemStack
myNeoForgeItemStack . applyComponentsAndValidate(myDataComponentPatch);
Return Type:
IItemStack
// NeoForgeItemStack.asIData() as IData ; myNeoForgeItemStack . asIData();
Return Type:
IData
// NeoForgeItemStack as IData myNeoForgeItemStack as IData
Return Type:
IData
// NeoForgeItemStack as IData myNeoForgeItemStack as IData
Return Type:
IData
Used implicitly when a machine can accept more than one item but you only provide one. myNeoForgeItemStack . asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. myNeoForgeItemStack as IIngredientWithAmount
Return Type:
IIngredientWithAmount
myNeoForgeItemStack . asImmutable();
Return Type:
IItemStack
// NeoForgeItemStack.asItemLike() as ItemLike ; myNeoForgeItemStack . asItemLike();
Return Type:
ItemLike
myNeoForgeItemStack as ItemLike
Return Type:
ItemLike
myNeoForgeItemStack as MapData
Return Type:
MapData
myNeoForgeItemStack . asMutable();
Return Type:
IItemStack
Create a Vanilla ingredient matching this one. // NeoForgeItemStack.asVanillaIngredient() as Ingredient ; myNeoForgeItemStack . asVanillaIngredient();
Return Type:
Ingredient
Create a Vanilla ingredient matching this one. myNeoForgeItemStack as Ingredient
Return Type:
Ingredient
Gets the data in <componenttype:minecraft:attribute_modifiers> myNeoForgeItemStack . attributeModifiers
Return Type:
ItemAttributeModifiers
Gets the data in <componenttype:minecraft:banner_patterns> myNeoForgeItemStack . bannerPatterns
Return Type:
BannerPatternLayers
Gets the data in <componenttype:minecraft:base_color> // NeoForgeItemStack.baseColor as DyeColor myNeoForgeItemStack . baseColor
Return Type:
DyeColor
Gets the data in <componenttype:minecraft:block_entity_data> // NeoForgeItemStack.blockEntityData as CustomData myNeoForgeItemStack . blockEntityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:block_state> myNeoForgeItemStack . blockState
Return Type:
BlockItemStateProperties
Gets the data in <componenttype:minecraft:bucket_entity_data> // NeoForgeItemStack.bucketEntityData as CustomData myNeoForgeItemStack . bucketEntityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:bundle_contents> myNeoForgeItemStack . bundleContents
Return Type:
BundleContents
// NeoForgeItemStack.burnTime as int
myNeoForgeItemStack . burnTime
Return Type:
int
Sets the burn time of this ingredient, for use in the furnace and other machines // NeoForgeItemStack.burnTime = (time as int);
myNeoForgeItemStack . burnTime = myInt;
Parameters:
time: int
Type: int
- the new burn time
Sets the burn time of this ingredient, for use in the furnace and other machines // NeoForgeItemStack.burnTime(time as int);
myNeoForgeItemStack . burnTime( 500 );
Parameters:
time: int
Type: int
- the new burn time
Gets the data in <componenttype:minecraft:can_break> myNeoForgeItemStack . canBreak
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:can_place_on> myNeoForgeItemStack . canPlaceOn
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:charged_projectiles> myNeoForgeItemStack . chargedProjectiles
Return Type:
ChargedProjectiles
// NeoForgeItemStack.clearTooltip(leaveName as bool = false);
myNeoForgeItemStack . clearTooltip(myBool);
Parameters:
leaveName: bool
(optional) Type: bool
Default Value: false
Returns the BEP to get this stack // NeoForgeItemStack.commandString as string
myNeoForgeItemStack . commandString
Return Type:
string
Returns the BEP to get this thingy // NeoForgeItemStack.commandString as string
myNeoForgeItemStack . commandString
Return Type:
string
Returns the BEP to get this thingy // NeoForgeItemStack.commandString() as string;
myNeoForgeItemStack . commandString();
Return Type:
string
Use this if you already have the condition from another ingredient myNeoForgeItemStack . condition(myIIngredientCondition);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:container> myNeoForgeItemStack . container
Return Type:
ItemContainerContents
Gets the data in <componenttype:minecraft:container_loot> myNeoForgeItemStack . containerLoot
Return Type:
SeededContainerLoot
Does the ingredient contain the given ingredient? // NeoForgeItemStack.contains(ingredient as IIngredient ) as bool; myNeoForgeItemStack . contains(( < item : minecraft:iron_ingot > | < item : minecraft:gold_ingot > ));
Return Type:
bool
Creates a copy myNeoForgeItemStack . copy();
Return Type:
IItemStack
// NeoForgeItemStack.CRAFTTWEAKER_DATA_KEY as string
NeoForgeItemStack . CRAFTTWEAKER_DATA_KEY
Return Type:
string
Gets the data in <componenttype:minecraft:creative_slot_lock> // NeoForgeItemStack.creativeSlotLock as bool
myNeoForgeItemStack . creativeSlotLock
Return Type:
bool
Gets the data in the <componenttype:minecraft:custom_data> myNeoForgeItemStack . customData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:custom_model_data> myNeoForgeItemStack . customModelData
Return Type:
CustomModelData
Gets the data in the <componenttype:minecraft:custom_name> A custom name is generally displayed in italics and controlled by the user. myNeoForgeItemStack . customName
Return Type:
Component
Gets the data in the <componenttype:minecraft:damage> // NeoForgeItemStack.damage as int
myNeoForgeItemStack . damage
Return Type:
int
Returns if the ItemStack is damageable I.E Swords and tools are damageable, sticks are not. // NeoForgeItemStack.damageableItem as bool
myNeoForgeItemStack . damageableItem
Return Type:
bool
Returns if the ItemStack is damaged I.E a Swords that is no at full durability is damaged. // NeoForgeItemStack.damaged as bool
myNeoForgeItemStack . damaged
Return Type:
bool
Gets the data in <componenttype:minecraft:debug_stick_state> myNeoForgeItemStack . debugStickState
Return Type:
DebugStickState
Returns the unlocalized Name of the Item in the ItemStack // NeoForgeItemStack.descriptionId as string
myNeoForgeItemStack . descriptionId
Return Type:
string
Gets the display name of the ItemStack // NeoForgeItemStack.displayName as Component myNeoForgeItemStack . displayName
Return Type:
Component
Gets the data in <componenttype:minecraft:dye_color> myNeoForgeItemStack . dyedColor
Return Type:
DyedItemColor
Checks if this ingredient is empty. // NeoForgeItemStack.empty as bool
myNeoForgeItemStack . empty
Return Type:
bool
Checks if this ingredient is empty. Returns : true if empty, false otherwise
// NeoForgeItemStack.empty() as bool;
myNeoForgeItemStack . empty();
Return Type:
bool
Gets the data in <componenttype:minecraft:enchantment_glint_override> If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments. // NeoForgeItemStack.enchantmentGlintOverride as bool
myNeoForgeItemStack . enchantmentGlintOverride
Return Type:
bool
Gets the data in <componenttype:minecraft:enchantments> myNeoForgeItemStack . enchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:entity_data> myNeoForgeItemStack . entityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:firework_explosion> myNeoForgeItemStack . fireworkExplosion
Return Type:
FireworkExplosion
Gets the data in <componenttype:minecraft:fireworks> myNeoForgeItemStack . fireworks
Return Type:
Fireworks
Gets the data in <componenttype:minecraft:food>
Return Type:
FoodProperties
Gets the Attributes and the AttributeModifiers on this IItemStack for the given EquipmentSlot Returns : A Map of Attribute to a List of AttributeModifier for the given EquipmentSlot.
myNeoForgeItemStack . getAttributes( < constant : minecraft:equipmentslot:chest > );
Return Type:
List <AttributeModifier > [Attribute ]
myNeoForgeItemStack . getBurnTime(myIRecipeManager);
Return Type:
int
// NeoForgeItemStack.getImmutableInternal() as ItemStack ; myNeoForgeItemStack . getImmutableInternal();
Return Type:
ItemStack
Gets the internal ItemStack
for this IItemStack. Returns : internal ItemStack
// NeoForgeItemStack.getInternal() as ItemStack ; myNeoForgeItemStack . getInternal();
Return Type:
ItemStack
Gets the internal ItemStack
for this IItemStack. myNeoForgeItemStack as ItemStack
Return Type:
ItemStack
When this ingredient stack is crafted, what will remain in the grid? Does not check if the stack matches though! Used e.g. in Crafting Table recipes. myNeoForgeItemStack . getRemainingItem( < item : minecraft:iron_ingot > );
Return Type:
IItemStack
Gets the use duration of the ItemStack for the given entity Returns : use duration
// NeoForgeItemStack.getUseDuration(entity as LivingEntity ) as int; myNeoForgeItemStack . getUseDuration(entity);
Return Type:
int
Grows this IItemStack's stack size by the given amount, or 1 if no amount is given. Returns : This IItemStack if mutable, a new one with the new amount otherwise.
// NeoForgeItemStack.grow(amount as int = 1) as IItemStack ; myNeoForgeItemStack . grow( 2 );
Parameters:
amount: int
(optional) Type: int
- The amount to grow by.
Default Value: 1
Return Type:
IItemStack
Checks whether the ComponentAccess has <componenttype:minecraft:attribute_modifiers> // NeoForgeItemStack.hasAttributeModifiers as bool
myNeoForgeItemStack . hasAttributeModifiers
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:banner_patterns> // NeoForgeItemStack.hasBannerPatterns as bool
myNeoForgeItemStack . hasBannerPatterns
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:base_color> Used for shield colouring. // NeoForgeItemStack.hasBaseColor as bool
myNeoForgeItemStack . hasBaseColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bees> // NeoForgeItemStack.hasBees as bool
myNeoForgeItemStack . hasBees
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:block_entity_data> // NeoForgeItemStack.hasBlockEntityData as bool
myNeoForgeItemStack . hasBlockEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:block_state> // NeoForgeItemStack.hasBlockState as bool
myNeoForgeItemStack . hasBlockState
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bucket_entity_data> // NeoForgeItemStack.hasBucketEntityData as bool
myNeoForgeItemStack . hasBucketEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:bundle_contents> // NeoForgeItemStack.hasBundleContents as bool
myNeoForgeItemStack . hasBundleContents
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:can_break> // NeoForgeItemStack.hasCanBreak as bool
myNeoForgeItemStack . hasCanBreak
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:can_place_on> // NeoForgeItemStack.hasCanPlaceOn as bool
myNeoForgeItemStack . hasCanPlaceOn
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:charged_projectiles> This component is used for crossbows. // NeoForgeItemStack.hasChargedProjectiles as bool
myNeoForgeItemStack . hasChargedProjectiles
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:container> // NeoForgeItemStack.hasContainer as bool
myNeoForgeItemStack . hasContainer
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:container_loot> // NeoForgeItemStack.hasContainerLoot as bool
myNeoForgeItemStack . hasContainerLoot
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:custom_data> // NeoForgeItemStack.hasCustomData as bool
myNeoForgeItemStack . hasCustomData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:custom_model_data> // NeoForgeItemStack.hasCustomModelData as bool
myNeoForgeItemStack . hasCustomModelData
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:custom_name> // NeoForgeItemStack.hasCustomName as bool
myNeoForgeItemStack . hasCustomName
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:damage> // NeoForgeItemStack.hasDamage as bool
myNeoForgeItemStack . hasDamage
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:debug_stick_state> // NeoForgeItemStack.hasDebugStickState as bool
myNeoForgeItemStack . hasDebugStickState
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:dyed_color> // NeoForgeItemStack.hasDyedColor as bool
myNeoForgeItemStack . hasDyedColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:enchantment_glint_override> // NeoForgeItemStack.hasEnchantmentGlintOverride as bool
myNeoForgeItemStack . hasEnchantmentGlintOverride
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:enchantments> // NeoForgeItemStack.hasEnchantments as bool
myNeoForgeItemStack . hasEnchantments
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:entity_data> // NeoForgeItemStack.hasEntityData as bool
myNeoForgeItemStack . hasEntityData
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:firework_explosion> // NeoForgeItemStack.hasFireworkExplosion as bool
myNeoForgeItemStack . hasFireworkExplosion
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:fireworks> // NeoForgeItemStack.hasFireworks as bool
myNeoForgeItemStack . hasFireworks
Return Type:
bool
Returns true if this ItemStack has a foil effect. Foil is the glint / effect that is added to enchanted ItemStacks (and other items). // NeoForgeItemStack.hasFoil as bool
myNeoForgeItemStack . hasFoil
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:food> // NeoForgeItemStack.hasFood as bool
myNeoForgeItemStack . hasFood
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:instrument> // NeoForgeItemStack.hasInstrument as bool
myNeoForgeItemStack . hasInstrument
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:item_namegt; // NeoForgeItemStack.hasItemName as bool
myNeoForgeItemStack . hasItemName
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:lock> // NeoForgeItemStack.hasLock as bool
myNeoForgeItemStack . hasLock
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:lodestone_tracker> // NeoForgeItemStack.hasLodestoneTracker as bool
myNeoForgeItemStack . hasLodestoneTracker
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:lore> // NeoForgeItemStack.hasLore as bool
myNeoForgeItemStack . hasLore
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_color> // NeoForgeItemStack.hasMapColor as bool
myNeoForgeItemStack . hasMapColor
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_decorations> MapDecorations are additional elements that render on a map, such as waypoints. // NeoForgeItemStack.hasMapDecorations as bool
myNeoForgeItemStack . hasMapDecorations
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_id> // NeoForgeItemStack.hasMapId as bool
myNeoForgeItemStack . hasMapId
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:map_post_processing> This componenet stores additional info on the map, such as the scale or whether to lock it. // NeoForgeItemStack.hasMapPostProcessing as bool
myNeoForgeItemStack . hasMapPostProcessing
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:max_damage> // NeoForgeItemStack.hasMaxDamage as bool
myNeoForgeItemStack . hasMaxDamage
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:max_stack_size> // NeoForgeItemStack.hasMaxStackSize as bool
myNeoForgeItemStack . hasMaxStackSize
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:note_block_sound> // NeoForgeItemStack.hasNoteBlockSound as bool
myNeoForgeItemStack . hasNoteBlockSound
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:ominous_bottle_amplifier> // NeoForgeItemStack.hasOminousBottleAmplifier as bool
myNeoForgeItemStack . hasOminousBottleAmplifier
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:pot_decorations> // NeoForgeItemStack.hasPotDecorations as bool
myNeoForgeItemStack . hasPotDecorations
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:potion_contents> Stores Potion Data on an item. // NeoForgeItemStack.hasPotionContents as bool
myNeoForgeItemStack . hasPotionContents
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:profile> // NeoForgeItemStack.hasProfile as bool
myNeoForgeItemStack . hasProfile
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:rarity> // NeoForgeItemStack.hasRarity as bool
myNeoForgeItemStack . hasRarity
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:recipes> Used for Knowledge Books. // NeoForgeItemStack.hasRecipes as bool
myNeoForgeItemStack . hasRecipes
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:repair_cost> // NeoForgeItemStack.hasRepairCost as bool
myNeoForgeItemStack . hasRepairCost
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:stored_enchantments> The stored enchantments component is only present in enchanted books, since it just stores the enchantments under a lid for future use. The item is not enchanted. // NeoForgeItemStack.hasStoredEnchantments as bool
myNeoForgeItemStack . hasStoredEnchantments
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:suspicious_stew_effects> // NeoForgeItemStack.hasSuspiciousStewEffects as bool
myNeoForgeItemStack . hasSuspiciousStewEffects
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:tool> // NeoForgeItemStack.hasTool as bool
myNeoForgeItemStack . hasTool
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:trim> // NeoForgeItemStack.hasTrim as bool
myNeoForgeItemStack . hasTrim
Return Type:
bool
Checks whether the ComponentAccess has the <componenttype:minecraft:unbreakable> // NeoForgeItemStack.hasUnbreakable as bool
myNeoForgeItemStack . hasUnbreakable
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:writable_book_content> // NeoForgeItemStack.hasWritableBookContent as bool
myNeoForgeItemStack . hasWritableBookContent
Return Type:
bool
Checks whether the ComponentAccess has <componenttype:minecraft:written_book_content> // NeoForgeItemStack.hasWrittenBookContent as bool
myNeoForgeItemStack . hasWrittenBookContent
Return Type:
bool
Gets the data in <componenttype:minecraft:hide_additional_tooltip> // NeoForgeItemStack.hideAdditionalTooltip as bool
myNeoForgeItemStack . hideAdditionalTooltip
Return Type:
bool
Gets the data in <componenttype:minecraft:hide_tooltip> // NeoForgeItemStack.hideTooltip as bool
myNeoForgeItemStack . hideTooltip
Return Type:
bool
Gets the hover name of the ItemStack. This will give the raw name without the formatting that 'displayName' applies.
myNeoForgeItemStack . hoverName
Return Type:
Component
The backing ingredient myNeoForgeItemStack . ingredient
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:instrument> myNeoForgeItemStack . instrument
Return Type:
Instrument
Can this ItemStack be enchanted? // NeoForgeItemStack.isEnchantable as bool
myNeoForgeItemStack . isEnchantable
Return Type:
bool
Gets the data in <componenttype:minecraft:fire_resistant> // NeoForgeItemStack.isFireResistant as bool
myNeoForgeItemStack . isFireResistant
Return Type:
bool
// NeoForgeItemStack.isImmutable as bool
myNeoForgeItemStack . isImmutable
Return Type:
bool
// NeoForgeItemStack.isImmutable() as bool;
myNeoForgeItemStack . isImmutable();
Return Type:
bool
Gets the data in <componenttype:minecraft:intangible_projectile> // NeoForgeItemStack.isIntangibleProjectile as bool
myNeoForgeItemStack . isIntangibleProjectile
Return Type:
bool
// NeoForgeItemStack.isMutable as bool
myNeoForgeItemStack . isMutable
Return Type:
bool
// NeoForgeItemStack.isMutable() as bool;
myNeoForgeItemStack . isMutable();
Return Type:
bool
Gets the data in the <componenttype:minecraft:item_name> In the case of items, an item name is set by the make to make a special instance of an item, such as with ominous banners. myNeoForgeItemStack . itemName
Return Type:
Component
myNeoForgeItemStack . items
Return Type:
IItemStack []
Gets the data in <componenttype:minecraft:lock> // NeoForgeItemStack.lockComponent as LockCode myNeoForgeItemStack . lockComponent
Return Type:
LockCode
Gets the data in <componenttype:minecraft:lodestone_tracker> myNeoForgeItemStack . lodestoneTracker
Return Type:
LodestoneTracker
Gets the data in the <componenttype:minecraft:lore>
Return Type:
ItemLore
Gets the data in <componenttype:minecraft:map_color> myNeoForgeItemStack . mapColor
Return Type:
MapItemColor
Gets the data in <componenttype:minecraft:map_decorations> myNeoForgeItemStack . mapDecorations
Return Type:
MapDecorations
Gets the data in <componenttype:minecraft:map_id> // NeoForgeItemStack.mapId as MapId myNeoForgeItemStack . mapId
Return Type:
MapId
Gets the data in <componenttype:minecraft:map_post_processing> myNeoForgeItemStack . mapPostProcessing
Return Type:
MapPostProcessing
Does the given stack match the ingredient? // NeoForgeItemStack.matches(stack as IItemStack ) as bool; myNeoForgeItemStack . matches( < item : minecraft:iron_ingot > );
Return Type:
bool
Returns the max damage of the ItemStack This is the max durability of the ItemStack. // NeoForgeItemStack.maxDamage as int
myNeoForgeItemStack . maxDamage
Return Type:
int
Gets the data in the <componenttype:minecraft:max_damage> // NeoForgeItemStack.maxDamage as int
myNeoForgeItemStack . maxDamage
Return Type:
int
Gets the data in the <componenttype:minecraft:max_stack_size> // NeoForgeItemStack.maxStackSize as int
myNeoForgeItemStack . maxStackSize
Return Type:
int
myNeoForgeItemStack . modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
myNeoForgeItemStack . modifyTooltip(myITooltipFunction);
Use this in contexts where machines accept more than one item to state that fact. myNeoForgeItemStack . mul(myInt);
Return Type:
IIngredientWithAmount
Gets the data in <componenttype:minecraft:note_block_sound> myNeoForgeItemStack . noteBlockSound
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:ominous_bottle_amplifier> // NeoForgeItemStack.ominousBottleAmplifier as int
myNeoForgeItemStack . ominousBottleAmplifier
Return Type:
int
myNeoForgeItemStack . onlyDamaged();
Return Type:
IIngredient
// NeoForgeItemStack.onlyDamagedAtLeast(minDamage as int) as IIngredient ; myNeoForgeItemStack . onlyDamagedAtLeast(myInt);
Return Type:
IIngredient
// NeoForgeItemStack.onlyDamagedAtMost(maxDamage as int) as IIngredient ; myNeoForgeItemStack . onlyDamagedAtMost(myInt);
Return Type:
IIngredient
// NeoForgeItemStack.onlyIf(uid as string, function as function(t as IItemStack ) as bool = null) as IIngredient ; myNeoForgeItemStack . onlyIf(myString, myPredicate);
Parameters:
uid: string
Type: string
function: function(t as IItemStack ) as bool
(optional) Type: function(t as IItemStack ) as bool
Default Value: null
Return Type:
IIngredient
Gets owning mod for the Item in this IItemStack // NeoForgeItemStack.owner as string
myNeoForgeItemStack . owner
Return Type:
string
myNeoForgeItemStack . percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged <IItemStack >
Gets the data in <componenttype:minecraft:pot_decorations> myNeoForgeItemStack . potDecorations
Return Type:
PotDecorations
Gets the data in <componenttype:minecraft:potion_contents> myNeoForgeItemStack . potionContents
Return Type:
PotionContents
Gets the data in <componenttype:minecraft:profile> myNeoForgeItemStack . profile
Return Type:
ResolvableProfile
Gets the data in the <componenttype:minecraft:rarity> // NeoForgeItemStack.rarity as Rarity myNeoForgeItemStack . rarity
Return Type:
Rarity
Gets the data in <componenttype:minecraft:recipes> myNeoForgeItemStack . recipes
Return Type:
List <ResourceLocation >
Gets the registry name for the Item in this IItemStack myNeoForgeItemStack . registryName
Return Type:
ResourceLocation
myNeoForgeItemStack . remove < T>(myDataComponentType);
Return Type:
IItemStack
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. myNeoForgeItemStack . removeGlobalAttribute(myAttribute, myEquipmentSlot[]);
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. // NeoForgeItemStack.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot []); myNeoForgeItemStack . removeGlobalAttributeModifier(myString, myEquipmentSlot[]);
Parameters:
uuid: string
Type: string
This method no longer works and is deprecated, it is left in so it doesn't cause breaking changes. Please use Item Components instead. // NeoForgeItemStack.removeGlobalAttributeModifier(uuid as UUID, slotTypes as EquipmentSlot []); myNeoForgeItemStack . removeGlobalAttributeModifier(myUUID, myEquipmentSlot[]);
// NeoForgeItemStack.removeTooltip(regex as string);
myNeoForgeItemStack . removeTooltip(myString);
Parameters:
regex: string
Type: string
Gets the data in <componenttype:minecraft:repair_cost> // NeoForgeItemStack.repairCost as int
myNeoForgeItemStack . repairCost
Return Type:
int
Sets the burn time of this ingredient, for use in the furnace and other machines myNeoForgeItemStack . setBurnTime( 500 , myIRecipeManager);
Parameters:
time: int
Type: int
- the new burn time
Shrinks this IItemStack's stack size by the given amount, or 1 if no amount is given. Returns : This IItemStack if mutable, a new one with the new amount otherwise.
// NeoForgeItemStack.shrink(amount as int = 1) as IItemStack ; myNeoForgeItemStack . shrink( 2 );
Parameters:
amount: int
(optional) Type: int
- The amount to shrink by.
Default Value: 1
Return Type:
IItemStack
Returns if the ItemStack can have an amount greater than 1 I.E Swords and tools are not stackable, sticks are. // NeoForgeItemStack.stackable as bool
myNeoForgeItemStack . stackable
Return Type:
bool
Gets the data in <componenttype:minecraft:stored_enchantments> myNeoForgeItemStack . storedEnchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:suspicious_stew_effects> myNeoForgeItemStack . suspiciousStewEffects
Return Type:
SuspiciousStewEffects
Gets the data in <componenttype:minecraft:tool> // NeoForgeItemStack.tool as Tool
Return Type:
Tool
myNeoForgeItemStack . transformCustom(myString, myFunction);
Return Type:
IIngredient
// NeoForgeItemStack.transformDamage(amount as int = 1) as IIngredient ; myNeoForgeItemStack . transformDamage(myInt);
Parameters:
amount: int
(optional) Type: int
Default Value: 1
Return Type:
IIngredient
myNeoForgeItemStack . transformReplace(myIItemStack);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:trim>
Return Type:
ArmorTrim
Gets the data in the <componenttype:minecraft:unbreakable> myNeoForgeItemStack . unbreakable
Return Type:
Unbreakable
// NeoForgeItemStack.update<T, U>(type as DataComponentType <T>, defaultValue as T, data as U, operator as BiFunction<T, T, U>) as IItemStack ; myNeoForgeItemStack . update < T, U>(myDataComponentType, myT, myU, myBiFunction);
Parameters:
defaultValue: T
Type: T
data: U
Type: U
operator: BiFunction <T , T , U >
Type: BiFunction <T , T , U >
Return Type:
IItemStack
myNeoForgeItemStack . update < T>(myDataComponentType, myT, myUnaryOperator);
Parameters:
defaultValue: T
Type: T
operator: UnaryOperator <T >
Type: UnaryOperator <T >
Return Type:
IItemStack
Returns true if this stack is considered a crossbow item // NeoForgeItemStack.useOnRelease as bool
myNeoForgeItemStack . useOnRelease
Return Type:
bool
myNeoForgeItemStack . with < T>(myDataComponentType, myT);
Return Type:
IItemStack
Sets the <componenttype:minecraft:attribute_modifiers> of the ComponentAccess to have the given ItemAttributeModifiers
Returns : The new instance with the modified data.
myNeoForgeItemStack . withAttributeModifiers( ItemAttributeModifiers . builder().add( < attribute : minecraft:player.block_break_speed > ,
AttributeModifier . create( "test" , 2.0 , < constant : minecraft:attribute/operation:add_value > , "596e0826-7c66-42c6-b3da-45a6d667ccf7" ),
< constant : minecraft:equipmentslot/group:mainhand > ).build(););
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
myNeoForgeItemStack . withAttributeModifiers(myEntry, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
myNeoForgeItemStack . withAttributeModifiers(myList, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given List<BannerPatternLayers.Layer> Returns : The new instance with the modified data.
myNeoForgeItemStack . withBannerPatterns(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:banner_patterns> of the ComponentAccess to have the given BannerPatternLayers
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBannerPatterns(myBannerPatternLayers);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:base_color> of the ComponentAccess to have the given DyeColor
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBaseColor(myDyeColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bees> of the ComponentAccess to have the given occupants Returns : The new instance with the modified data.
myNeoForgeItemStack . withBees(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBlockEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBlockEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:block_state> of the ComponentAccess to have the given BlockItemStateProperties
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBlockState(myBlockItemStateProperties);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBucketEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bucket_entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBucketEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given contents Returns : The new instance with the modified data.
myNeoForgeItemStack . withBundleContents([ < item : minecraft:diamond > * 64 ]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:bundle_contents> of the ComponentAccess to have the given BundleContents
Returns : The new instance with the modified data.
myNeoForgeItemStack . withBundleContents(myBundleContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_break> with the given BlockPredicates. Any predicate that matches will allow the Block to be broken by this ItemStack. Returns : The new instance with the modified data.
myNeoForgeItemStack . withCanBreak( BlockPredicate . create().of( < block : minecraft:diamond_ore > ).build(), true );
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show the ability in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_break> of the ComponentAccess to have the given AdventureModePredicate
Returns : The new instance with the modified data.
myNeoForgeItemStack . withCanBreak(myAdventureModePredicate);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_place_on> with the given BlockPredicates. Any predicate that matches will allow the BlockItem within the ItemStack to be placed. Returns : The new instance with the modified data.
myNeoForgeItemStack . withCanPlaceOn( BlockPredicate . create().of( < block : minecraft:dirt > ).build(), myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show the restriction in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:can_place_on> of the ComponentAccess to have the given AdventureModePredicate
Returns : The new instance with the modified data.
myNeoForgeItemStack . withCanPlaceOn(myAdventureModePredicate);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given IItemStack
Returns : The new instance with the modified data.
myNeoForgeItemStack . withChargedProjectiles( < item : minecraft:arrow > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given items. Returns : The new instance with the modified data.
myNeoForgeItemStack . withChargedProjectiles([ < item : minecraft:arrow > ]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:charged_projectiles> of the ComponentAccess to have the given ChargedProjectiles
Returns : The new instance with the modified data.
myNeoForgeItemStack . withChargedProjectiles(myChargedProjectiles);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given values. Returns : The new instance with the modified data.
myNeoForgeItemStack . withContainer(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container> of the ComponentAccess to have the given ItemContainerContents
Returns : The new instance with the modified data.
myNeoForgeItemStack . withContainer(myItemContainerContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given loot table and seed. Returns : The new instance with the modified data.
myNeoForgeItemStack . withContainerLoot(myResourceKey, myLong);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:container_loot> of the ComponentAccess to have the given SeededContainerLoot
Returns : The new instance with the modified data.
myNeoForgeItemStack . withContainerLoot(mySeededContainerLoot);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:creative_slot_lock> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myNeoForgeItemStack . withCreativeSlotLock();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withCustomData({custom_ammo_thing: 1 , owner: "Benji" });
Parameters:
customData: MapData
Type: MapData
- The MapData to set the component to.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withCustomData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_model_data> of the ComponentAccess to have the given value. Returns : The new instance with the modified data.
myNeoForgeItemStack . 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.
myNeoForgeItemStack . withCustomModelData(myCustomModelData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_name> of the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withCustomName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:damage> of the ComponentAccess to have the given value. Damage is related to durability. Using this on an item that has no maxDamage may have unforeseen issues. Returns : The new instance with the modified data.
myNeoForgeItemStack . withDamage( 16 );
Parameters:
damage: int
Type: int
- The new damage of the ComponentAccess.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:debug_stick_state> of the ComponentAccess to have the given DebugStickState
Returns : The new instance with the modified data.
myNeoForgeItemStack . withDebugStickState(myDebugStickState);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withDyedColor(rgb as int, showInTooltip as bool = true) as ComponentAccess ; myNeoForgeItemStack . withDyedColor( 0xFFFF00 , true );
Parameters:
rgb: int
Type: int
- The colour to dye this item with
showInTooltip: bool
(optional) Type: bool
- Whether to show this information in a tooltip
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:dyed_color> of the ComponentAccess to have the given DyedItemColor
Returns : The new instance with the modified data.
myNeoForgeItemStack . withDyedColor(myDyedItemColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given Enchantment
and level. Returns : The new instance with the modified data.
myNeoForgeItemStack . withEnchantment( < enchantment : minecraft:efficiency > , 4 );
Parameters:
level: int
(optional) Type: int
- The level of the enchantment to set
Default Value: 1
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantment_glint_override> of the ComponentAccess to have the given value. If it is false, the item will never render the enchantment glint If it is true, the item will render the enchantment glint always, indenpendently of whether it is enchanted or not. Returns : The new instance with the modified data.
// NeoForgeItemStack.withEnchantmentGlintOverride(value as bool) as ComponentAccess ; myNeoForgeItemStack . withEnchantmentGlintOverride( true );
Parameters:
value: bool
Type: bool
- The value of the override, as described above
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns : The new instance with the modified data.
myNeoForgeItemStack . withEnchantments(myItemEnchantments);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given MapData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withEntityData(myMapData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:entity_data> of the ComponentAccess to have the given CustomData
Returns : The new instance with the modified data.
myNeoForgeItemStack . withEntityData(myCustomData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fire_resistant> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myNeoForgeItemStack . withFireResistant();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:firework_explosion> of the ComponentAccess to have the given FireworkExplosion
Returns : The new instance with the modified data.
myNeoForgeItemStack . withFireworkExplosion(myFireworkExplosion);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given duration and explosions. Returns : The new instance with the modified data.
myNeoForgeItemStack . withFireworks(myInt, myList);
Parameters:
flightDuration: int
Type: int
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:fireworks> of the ComponentAccess to have the given Fireworks
Returns : The new instance with the modified data.
myNeoForgeItemStack . withFireworks(myFireworks);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:food> of the ComponentAccess to have the given FoodProperties
Returns : The new instance with the modified data.
myNeoForgeItemStack . withFood(myFoodProperties);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_additional_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myNeoForgeItemStack . withHideAdditionalTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myNeoForgeItemStack . withHideTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:instrument> of the ComponentAccess to have the given Instrument
Returns : The new instance with the modified data.
myNeoForgeItemStack . withInstrument(myInstrument);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:intangible_projectile> of the ComponentAccess to exist. Returns : The new instance with the modified data.
myNeoForgeItemStack . withIntangibleProjectile();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:item_name> of the ComponentAccess to have the given Component
Returns : The new instance with the modified data.
myNeoForgeItemStack . withItemName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
myNeoForgeItemStack . withJsonComponent(myDataComponentType, myIData);
Return Type:
IItemStack
myNeoForgeItemStack . withJsonComponents(myIData);
Return Type:
IItemStack
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given string. Returns : The new instance with the modified data.
myNeoForgeItemStack . withLock(myString);
Parameters:
code: string
Type: string
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lock> of the ComponentAccess to have the given LockCode
Returns : The new instance with the modified data.
myNeoForgeItemStack . withLock(myLockCode);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lodestone_tracker> of the ComponentAccess to have the given LodestoneTracker
Returns : The new instance with the modified data.
myNeoForgeItemStack . withLodestoneTracker(myLodestoneTracker);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given stdlib.List< Component
> Returns : The new instance with the modified data.
myNeoForgeItemStack . withLore([ Component . literal( "Found in a dark cave" ), Component . translatable( "Belonged to a Dragon" )]);
Parameters:
components: List <Component >
Type: List <Component >
- The list of Components to add as lore.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:lore> of the ComponentAccess to have the given ItemLore
Returns : The new instance with the modified data.
myNeoForgeItemStack . withLore(myItemLore);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapColor( 0xFF0000 );
Parameters:
rgb: int
Type: int
- The new map colour
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess to have the given MapItemColor
Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapColor(myMapItemColor);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given values. Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapDecorations(myMap);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_decorations> of the ComponentAccess to have the given MapDecorations
Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapDecorations(myMapDecorations);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given value. A map id is only useful after the game generates one to store data. Therefore, you should always pass in the parameter for an id you know is available. Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapId(myInt);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_id> of the ComponentAccess to have the given MapId
Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapId(myMapId);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_post_processing> of the ComponentAccess to have the given MapPostProcessing
Returns : The new instance with the modified data.
myNeoForgeItemStack . withMapPostProcessing(myMapPostProcessing);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:max_damage> of the ComponentAccess to have the given value. It is likely that you need to call withDamage(0) in order for some things to function properly. Returns : The new instance with the modified data.
myNeoForgeItemStack . withMaxDamage( 1024 );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:stack_size> of the ComponentAccess to have the given value. Non standard stack sizes may render differently and may not be handled correctly by all mods. Test your changes! Returns : The new instance with the modified data.
// NeoForgeItemStack.withMaxStackSize(maxStackSize as int) as ComponentAccess ; myNeoForgeItemStack . withMaxStackSize( 16 );
Parameters:
maxStackSize: int
Type: int
- The new maxStackSize of the ComponentAccess.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:note_block_sound> of the ComponentAccess to have the given ResourceLocation
Returns : The new instance with the modified data.
myNeoForgeItemStack . withNoteBlockSound(myResourceLocation);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:ominous_bottle_amplifier> of the ComponentAccess to have the given amplifier. Returns : The new instance with the modified data.
// NeoForgeItemStack.withOminousBottleAmplifier(amplifier as int) as ComponentAccess ; myNeoForgeItemStack . withOminousBottleAmplifier(myInt);
Return Type:
ComponentAccess
myNeoForgeItemStack . without < T>(myDataComponentType);
Return Type:
IItemStack
Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutAttributeModifiers();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBannerPatterns();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:base_color> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBaseColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bees> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBees();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBlockEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_state> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBlockState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBucketEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutBundleContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_break> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutCanBreak();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutCanPlaceOn();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutChargedProjectiles();
Return Type:
ComponentAccess
// NeoForgeItemStack.withoutComponents() as IItemStack ; myNeoForgeItemStack . withoutComponents();
Return Type:
IItemStack
Removes the <componenttype:minecraft:container> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutContainer();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container_loot> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutContainerLoot();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutCreativeSlotLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_data> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutCustomData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutCustomModelData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_name> from the ComponentAccess Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutCustomName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:damage> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutDebugStickState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutDyedColor();
Return Type:
ComponentAccess
Removes the Enchantment
from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutEnchantment( < enchantment : minecraft:mending > );
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantment_glint_override> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutEntityDate();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutFireResistant();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutFireworkExplosion();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fireworks> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutFireworks();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:food> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutFood();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutHideTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:instrument> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutInstrument();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutIntangibleProjectile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:item_name> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutItemName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lock> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutLodestoneTracker();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lore> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutLore();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_color> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutMapColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutMapDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_id> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutMapId();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutMapPostProcessing();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:max_damage> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutMaxDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stack_size> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutMaxStackSize();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutNoteBlockSound();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutPotDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutPotionContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:profile> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutProfile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:rarity> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutRarity();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:recipes> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutRecipes();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutRepairCost();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutStoredEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:tool> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutTool();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:trim> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutTrim();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutUnbreakable();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutWritableBookContent();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
myNeoForgeItemStack . withoutWrittenBookContent();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given items. Returns : The new instance with the modified data.
myNeoForgeItemStack . withPotDecorations(myItem, myItem, myItem, myItem);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:pot_decorations> of the ComponentAccess to have the given PotDecorations
Returns : The new instance with the modified data.
myNeoForgeItemStack . withPotDecorations(myPotDecorations);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and no custom effects Returns : The new instance with the modified data.
myNeoForgeItemStack . withPotionContents( < potion : minecraft:swiftness > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and the given MobEffectInstance
effects. Returns : The new instance with the modified data.
myNeoForgeItemStack . withPotionContents( < potion : minecraft:swiftness > , [ MobEffectInstance . of( < mobeffect : minecraft:strength > , 20 * 20 , 1 , false , false , true )]);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given Potion
and the given MobEffectInstance
effects. Returns : The new instance with the modified data.
myNeoForgeItemStack . withPotionContents( < potion : minecraft:swiftness > , 0xFFFFFF00 , [ MobEffectInstance . of( < mobeffect : minecraft:strength > , 20 * 20 , 1 , false , false , true )]);
Parameters:
customColor: int
Type: int
- The ARGB color the potion will have.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:potion_contents> of the ComponentAccess to have the given PotionContents
Returns : The new instance with the modified data.
myNeoForgeItemStack . withPotionContents(myPotionContents);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:profile> of the ComponentAccess to have the given ResolvableProfile
Returns : The new instance with the modified data.
myNeoForgeItemStack . withProfile(myResolvableProfile);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:rarity> of the ComponentAccess to have the given Rarity
Returns : The new instance with the modified data.
myNeoForgeItemStack . withRarity( < constant : minecraft:item/rarity:epic > );
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:recipes> of the ComponentAccess to have the given List<ResourceLocation> Returns : The new instance with the modified data.
myNeoForgeItemStack . withRecipes(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:repair_cost> of the ComponentAccess to have the given value. Returns : The new instance with the modified data.
myNeoForgeItemStack . withRepairCost( 20 );
Parameters:
cost: int
Type: int
- The repair cost
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:stored_enchantments> of the ComponentAccess to have the given ItemEnchantments
Returns : The new instance with the modified data.
myNeoForgeItemStack . withStoredEnchantments(myItemEnchantments);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
SuspiciousStewEffects.Entry is effectively a pair of Effect and duration. Returns : The new instance with the modified data.
myNeoForgeItemStack . withSuspiciousStewEffects(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:suspicious_stew_effects> of the ComponentAccess to have the given SuspiciousStewEffects
Returns : The new instance with the modified data.
myNeoForgeItemStack . withSuspiciousStewEffects(mySuspiciousStewEffects);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given data. A Tool
instance is constructed from the parameters. Returns : The new instance with the modified data.
// NeoForgeItemStack.withTool(rules as List< ToolRule >, defaultMiningSpeed as float, damagePerBlock as int) as ComponentAccess ; myNeoForgeItemStack . withTool([ ToolRule . minesAndDrops( < tag : blocks:minecraft:planks > , 6.0f )], 0.25f , 1 );
Parameters:
rules: List <ToolRule >
Type: List <ToolRule >
- The list of rules the new Tool instance will have defaultMiningSpeed: float
Type: float
- The default mining speed of the new tool
damagePerBlock: int
Type: int
- The damage or durability that is dealt to the Tool after use.
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:tool> of the ComponentAccess to have the given Tool
Returns : The new instance with the modified data.
myNeoForgeItemStack . withTool(myTool);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:trim> of the ComponentAccess to have the given ArmorTrim
Returns : The new instance with the modified data.
myNeoForgeItemStack . withTrim(myArmorTrim);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable. Returns : The new instance with the modified data.
// NeoForgeItemStack.withUnbreakable(showInTooltip as bool = true) as ComponentAccess ; myNeoForgeItemStack . withUnbreakable(myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
- Whether to show that the ComponentAccess is unbreakable in a tooltip.
Default Value: true
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:unbreakable> of the ComponentAccess. The existance of the component makes the ComponentAccess unbreakable. Returns : The new instance with the modified data.
myNeoForgeItemStack . withUnbreakable(myUnbreakable);
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
myNeoForgeItemStack . withWritableBookContent(myList);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:writable_book_content> of the ComponentAccess to have the given WritableBookContent
Returns : The new instance with the modified data.
myNeoForgeItemStack . withWritableBookContent(myWritableBookContent);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:written_book_content> of the ComponentAccess to have the given WrittenBookContent
Returns : The new instance with the modified data.
myNeoForgeItemStack . withWrittenBookContent(myWrittenBookContent);
Return Type:
ComponentAccess
Gets the data in <componenttype:minecraft:writable_book_content> myNeoForgeItemStack . writableBookContent
Return Type:
WritableBookContent
Gets the data in <componenttype:minecraft:written_book_content> myNeoForgeItemStack . writtenBookContent
Return Type:
WrittenBookContent