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. // (NeoForgeItemStack * (amount as int)) as IIngredientWithAmount
myNeoForgeItemStack * myInt
Return Type:
IIngredientWithAmount
// (NeoForgeItemStack | (other as IIngredient)) as IIngredientList
myNeoForgeItemStack | myIIngredient
Return Type:
IIngredientList
// (NeoForgeItemStack % (percentage as double)) as Percentaged<IItemStack>
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
Adds an AttributeModifier to this IIngredient using a specific UUID. The id can be used to override an existing attribute on an ItemStack with this new modifier. You can use /ct hand attributes
to get the id of the attributes on an ItemStack. Attributes added with this method appear on all ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to have the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withAttributeModifier // NeoForgeItemStack.addGlobalAttributeModifier(attribute as Attribute, id as ResourceLocation, value as double, operation as Operation, slotTypes as EquipmentSlot[]);
myNeoForgeItemStack . addGlobalAttributeModifier( < attribute : minecraft:generic.attack_damage > , myResourceLocation, 10 , AttributeOperation . ADDITION, [ < constant : minecraft:equipmentslot:chest > ]);
Parameters:
value: double
Type: double
- The value of the modifier.
// 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
// NeoForgeItemStack.anyDamage() as IIngredient;
myNeoForgeItemStack . anyDamage();
Return Type:
IIngredient
// NeoForgeItemStack.applyComponents(map as DataComponentMap) as IItemStack;
myNeoForgeItemStack . applyComponents(myDataComponentMap);
Return Type:
IItemStack
// NeoForgeItemStack.applyComponents(patch as DataComponentPatch) as IItemStack;
myNeoForgeItemStack . applyComponents(myDataComponentPatch);
Return Type:
IItemStack
// NeoForgeItemStack.applyComponentsAndValidate(patch as DataComponentPatch) as 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
// NeoForgeItemStack.asIIngredientWithAmount() as IIngredientWithAmount;
myNeoForgeItemStack . asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. // NeoForgeItemStack.asIIngredientWithAmount() as IIngredientWithAmount;
myNeoForgeItemStack . asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
// NeoForgeItemStack as IIngredientWithAmount
myNeoForgeItemStack as IIngredientWithAmount
Return Type:
IIngredientWithAmount
Used implicitly when a machine can accept more than one item but you only provide one. // NeoForgeItemStack as IIngredientWithAmount
myNeoForgeItemStack as IIngredientWithAmount
Return Type:
IIngredientWithAmount
// NeoForgeItemStack.asImmutable() as IItemStack;
myNeoForgeItemStack . asImmutable();
Return Type:
IItemStack
// NeoForgeItemStack.asItemLike() as ItemLike;
myNeoForgeItemStack . asItemLike();
Return Type:
ItemLike
// NeoForgeItemStack as ItemLike
myNeoForgeItemStack as ItemLike
Return Type:
ItemLike
// NeoForgeItemStack as MapData
myNeoForgeItemStack as MapData
Return Type:
MapData
// NeoForgeItemStack.asMutable() as IItemStack;
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. // NeoForgeItemStack as Ingredient
myNeoForgeItemStack as Ingredient
Return Type:
Ingredient
// NeoForgeItemStack as Percentaged<IItemStack>
myNeoForgeItemStack as Percentaged < IItemStack>
Return Type:
Percentaged <IItemStack >
Gets the data in <componenttype:minecraft:attribute_modifiers> // NeoForgeItemStack.attributeModifiers as ItemAttributeModifiers
myNeoForgeItemStack . attributeModifiers
Return Type:
ItemAttributeModifiers
Gets the data in <componenttype:minecraft:banner_patterns> // NeoForgeItemStack.bannerPatterns as BannerPatternLayers
myNeoForgeItemStack . bannerPatterns
Return Type:
BannerPatternLayers
// NeoForgeItemStack.BASE_ATTACK_DAMAGE_ID as ResourceLocation
NeoForgeItemStack . BASE_ATTACK_DAMAGE_ID
Return Type:
ResourceLocation
// NeoForgeItemStack.BASE_ATTACK_SPEED_ID as ResourceLocation
NeoForgeItemStack . BASE_ATTACK_SPEED_ID
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:base_color> // NeoForgeItemStack.baseColor as DyeColor
myNeoForgeItemStack . baseColor
Return Type:
DyeColor
Gets the data in <componenttype:minecraft:bees> // NeoForgeItemStack.bees as List<Occupant>
Return Type:
List <BeehiveBlockEntityOccupant >
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> // NeoForgeItemStack.blockState as BlockItemStateProperties
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> // NeoForgeItemStack.bundleContents as BundleContents
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> // NeoForgeItemStack.canBreak as AdventureModePredicate
myNeoForgeItemStack . canBreak
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:can_place_on> // NeoForgeItemStack.canPlaceOn as AdventureModePredicate
myNeoForgeItemStack . canPlaceOn
Return Type:
AdventureModePredicate
Gets the data in <componenttype:minecraft:charged_projectiles> // NeoForgeItemStack.chargedProjectiles as ChargedProjectiles
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
// NeoForgeItemStack.componentsPatch as DataComponentPatch
myNeoForgeItemStack . componentsPatch
Return Type:
DataComponentPatch
Use this if you already have the condition from another ingredient // NeoForgeItemStack.condition(condition as IIngredientCondition) as IIngredient;
myNeoForgeItemStack . condition(myIIngredientCondition);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:container> // NeoForgeItemStack.container as ItemContainerContents
myNeoForgeItemStack . container
Return Type:
ItemContainerContents
Gets the data in <componenttype:minecraft:container_loot> // NeoForgeItemStack.containerLoot as SeededContainerLoot
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 // NeoForgeItemStack.copy() as IItemStack;
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> // NeoForgeItemStack.customData as CustomData
myNeoForgeItemStack . customData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:custom_model_data> // NeoForgeItemStack.customModelData as CustomModelData
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. // NeoForgeItemStack.customName as Component
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> // NeoForgeItemStack.debugStickState as DebugStickState
myNeoForgeItemStack . debugStickState
Return Type:
DebugStickState
// NeoForgeItemStack.definition as Item
myNeoForgeItemStack . definition
Return Type:
ItemDefinition
// NeoForgeItemStack.definition() as Item;
myNeoForgeItemStack . definition();
Return Type:
ItemDefinition
// NeoForgeItemStack as Item
myNeoForgeItemStack as Item
Return Type:
ItemDefinition
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> // NeoForgeItemStack.dyedColor as DyedItemColor
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> // NeoForgeItemStack.enchantments as ItemEnchantments
myNeoForgeItemStack . enchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:entity_data> // NeoForgeItemStack.entityData as CustomData
myNeoForgeItemStack . entityData
Return Type:
CustomData
Gets the data in <componenttype:minecraft:firework_explosion> // NeoForgeItemStack.fireworkExplosion as FireworkExplosion
myNeoForgeItemStack . fireworkExplosion
Return Type:
FireworkExplosion
Gets the data in <componenttype:minecraft:fireworks> // NeoForgeItemStack.fireworks as Fireworks
myNeoForgeItemStack . fireworks
Return Type:
Fireworks
Gets the data in <componenttype:minecraft:food> // NeoForgeItemStack.food as FoodProperties
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.
// NeoForgeItemStack.getAttributes(slotType as EquipmentSlot) as List<AttributeModifier>[Attribute];
myNeoForgeItemStack . getAttributes( < constant : minecraft:equipmentslot:chest > );
Return Type:
List <AttributeModifier > [Attribute ]
// NeoForgeItemStack.getBurnTime(manager as IRecipeManager<Recipe>) as int;
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. // NeoForgeItemStack as ItemStack
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. // NeoForgeItemStack.getRemainingItem(stack as IItemStack) as IItemStack;
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.
// NeoForgeItemStack.hoverName as Component
myNeoForgeItemStack . hoverName
Return Type:
Component
The backing ingredient // NeoForgeItemStack.ingredient as IIngredient
myNeoForgeItemStack . ingredient
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:instrument> // NeoForgeItemStack.instrument as 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:custom_name> In the case of items, an item name is set by the make to make a special instance of an item, such as with ominous banners. // NeoForgeItemStack.itemName as Component
myNeoForgeItemStack . itemName
Return Type:
Component
// NeoForgeItemStack.items as IItemStack[]
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> // NeoForgeItemStack.lodestoneTracker as LodestoneTracker
myNeoForgeItemStack . lodestoneTracker
Return Type:
LodestoneTracker
Gets the data in the <componenttype:minecraft:lore> // NeoForgeItemStack.lore as ItemLore
Return Type:
ItemLore
Gets the data in <componenttype:minecraft:map_color> // NeoForgeItemStack.mapColor as MapItemColor
myNeoForgeItemStack . mapColor
Return Type:
MapItemColor
Gets the data in <componenttype:minecraft:map_decorations> // NeoForgeItemStack.mapDecorations as MapDecorations
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> // NeoForgeItemStack.mapPostProcessing as MapPostProcessing
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
// NeoForgeItemStack.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);
myNeoForgeItemStack . modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
// NeoForgeItemStack.modifyTooltip(function as ITooltipFunction);
myNeoForgeItemStack . modifyTooltip(myITooltipFunction);
Use this in contexts where machines accept more than one item to state that fact. // NeoForgeItemStack.mul(amount as int) as IIngredientWithAmount;
myNeoForgeItemStack . mul(myInt);
Return Type:
IIngredientWithAmount
Gets the data in <componenttype:minecraft:note_block_sound> // NeoForgeItemStack.noteBlockSound as ResourceLocation
myNeoForgeItemStack . noteBlockSound
Return Type:
ResourceLocation
Gets the data in <componenttype:minecraft:ominous_bottle_amplifier> // NeoForgeItemStack.ominousBottleAmplifier as int
myNeoForgeItemStack . ominousBottleAmplifier
Return Type:
int
// NeoForgeItemStack.onlyDamaged() as IIngredient;
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
// NeoForgeItemStack.percent(percentage as double) as Percentaged<IItemStack>;
myNeoForgeItemStack . percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged <IItemStack >
Gets the data in <componenttype:minecraft:pot_decorations> // NeoForgeItemStack.potDecorations as PotDecorations
myNeoForgeItemStack . potDecorations
Return Type:
PotDecorations
Gets the data in <componenttype:minecraft:potion_contents> // NeoForgeItemStack.potionContents as PotionContents
myNeoForgeItemStack . potionContents
Return Type:
PotionContents
Gets the data in <componenttype:minecraft:profile> // NeoForgeItemStack.profile as ResolvableProfile
myNeoForgeItemStack . profile
Return Type:
ResolvableProfile
// NeoForgeItemStack.prototype as DataComponentMap
myNeoForgeItemStack . prototype
Return Type:
DataComponentMap
Gets the data in the <componenttype:minecraft:rarity> // NeoForgeItemStack.rarity as Rarity
myNeoForgeItemStack . rarity
Return Type:
Rarity
Gets the data in <componenttype:minecraft:recipes> // NeoForgeItemStack.recipes as List<ResourceLocation>
myNeoForgeItemStack . recipes
Return Type:
List <ResourceLocation >
Gets the registry name for the Item in this IItemStack // NeoForgeItemStack.registryName as ResourceLocation
myNeoForgeItemStack . registryName
Return Type:
ResourceLocation
// NeoForgeItemStack.remove<T>(type as DataComponentType<T>) as IItemStack;
myNeoForgeItemStack . remove < T>(myDataComponentType);
Return Type:
IItemStack
Removes all AttributeModifiers that use the given Attribute from this IIngredient. Attributes removed with this method are removed from ItemStacks that match this IIngredient, regardless of how or when the ItemStack was made, if you want to remove the attribute on a single specific ItemStack (such as a specific Diamond Sword made in a recipe), then you should use IItemStack#withoutAttribute. This method can only remove default Attributes from an ItemStack, it is still possible that an ItemStack can override it. // NeoForgeItemStack.removeGlobalAttribute(attribute as Attribute, slotTypes as EquipmentSlot[]);
myNeoForgeItemStack . removeGlobalAttribute( < attribute : minecraft:generic.attack_damage > , [ < constant : minecraft:equipmentslot:chest > ]);
Removes all AttributeModifiers who's ID is the same as the given uuid from this IIngredient. // NeoForgeItemStack.removeGlobalAttributeModifier(uuid as string, slotTypes as EquipmentSlot[]);
myNeoForgeItemStack . removeGlobalAttributeModifier( "8c1b5535-9f79-448b-87ae-52d81480aaa3" , [ < constant : minecraft:equipmentslot:chest > ]);
Parameters:
uuid: string
Type: string
- The unique id of the AttributeModifier to remove.
Removes all AttributeModifiers who's ID is the same as the given uuid from this IIngredient. // NeoForgeItemStack.removeGlobalAttributeModifier(uuid as UUID, slotTypes as EquipmentSlot[]);
myNeoForgeItemStack . removeGlobalAttributeModifier( IItemStack . BASE_ATTACK_DAMAGE_UUID, [ < constant : minecraft:equipmentslot:chest > ]);
Parameters:
uuid: UUID
Type: UUID
- The unique id of the AttributeModifier to remove.
// 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
// NeoForgeItemStack.reuse() as IIngredient;
myNeoForgeItemStack . reuse();
Return Type:
IIngredient
Sets the burn time of this ingredient, for use in the furnace and other machines // NeoForgeItemStack.setBurnTime(time as int, manager as IRecipeManager<Recipe>);
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> // NeoForgeItemStack.storedEnchantments as ItemEnchantments
myNeoForgeItemStack . storedEnchantments
Return Type:
ItemEnchantments
Gets the data in <componenttype:minecraft:suspicious_stew_effects> // NeoForgeItemStack.suspiciousStewEffects as SuspiciousStewEffects
myNeoForgeItemStack . suspiciousStewEffects
Return Type:
SuspiciousStewEffects
Gets the data in <componenttype:minecraft:tool> // NeoForgeItemStack.tool as Tool
Return Type:
Tool
// NeoForgeItemStack.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;
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
// NeoForgeItemStack.transformReplace(replaceWith as IItemStack) as IIngredient;
myNeoForgeItemStack . transformReplace(myIItemStack);
Return Type:
IIngredient
Gets the data in <componenttype:minecraft:trim> // NeoForgeItemStack.trim as ArmorTrim
Return Type:
ArmorTrim
Gets the data in the <componenttype:minecraft:unbreakable> // NeoForgeItemStack.unbreakable as 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
// NeoForgeItemStack.update<T>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as 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
// NeoForgeItemStack.with<T>(type as DataComponentType<T>, value as T?) as IItemStack;
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.
// NeoForgeItemStack.withAttributeModifiers(modifiers as ItemAttributeModifiers) as ComponentAccess;
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.
// NeoForgeItemStack.withAttributeModifiers(modifier as Entry, showInTooltip as bool = true) as ComponentAccess;
myNeoForgeItemStack . withAttributeModifiers(myEntry, myBool);
Parameters:
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
// NeoForgeItemStack.withAttributeModifiers(modifiers as List<Entry>, showInTooltip as bool = true) as 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.
// NeoForgeItemStack.withBannerPatterns(layers as List<Layer>) as ComponentAccess;
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.
// NeoForgeItemStack.withBannerPatterns(layers as BannerPatternLayers) as ComponentAccess;
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.
// NeoForgeItemStack.withBaseColor(color as DyeColor) as ComponentAccess;
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.
// NeoForgeItemStack.withBees(occupants as List<Occupant>) as ComponentAccess;
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.
// NeoForgeItemStack.withBlockEntityData(data as MapData) as ComponentAccess;
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.
// NeoForgeItemStack.withBlockEntityData(data as CustomData) as ComponentAccess;
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.
// NeoForgeItemStack.withBlockState(properties as BlockItemStateProperties) as ComponentAccess;
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.
// NeoForgeItemStack.withBucketEntityData(data as MapData) as ComponentAccess;
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.
// NeoForgeItemStack.withBucketEntityData(data as CustomData) as ComponentAccess;
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.
// NeoForgeItemStack.withBundleContents(contents as List<IItemStack>) as ComponentAccess;
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.
// NeoForgeItemStack.withBundleContents(contents as BundleContents) as ComponentAccess;
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.
// NeoForgeItemStack.withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;
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.
// NeoForgeItemStack.withCanBreak(predicate as AdventureModePredicate) as ComponentAccess;
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.
// NeoForgeItemStack.withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;
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.
// NeoForgeItemStack.withCanPlaceOn(predicate as AdventureModePredicate) as ComponentAccess;
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.
// NeoForgeItemStack.withChargedProjectiles(item as IItemStack) as ComponentAccess;
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.
// NeoForgeItemStack.withChargedProjectiles(items as List<IItemStack>) as ComponentAccess;
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.
// NeoForgeItemStack.withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as ComponentAccess;
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.
// NeoForgeItemStack.withContainer(contents as List<IItemStack>) as ComponentAccess;
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.
// NeoForgeItemStack.withContainer(contents as ItemContainerContents) as ComponentAccess;
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.
// NeoForgeItemStack.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;
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.
// NeoForgeItemStack.withContainerLoot(loot as SeededContainerLoot) as ComponentAccess;
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.
// NeoForgeItemStack.withCreativeSlotLock() as ComponentAccess;
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.
// NeoForgeItemStack.withCustomData(customData as MapData) as ComponentAccess;
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.
// NeoForgeItemStack.withCustomData(customData as CustomData) as ComponentAccess;
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.
// NeoForgeItemStack.withCustomModelData(value as int) as ComponentAccess;
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.
// NeoForgeItemStack.withCustomModelData(data as CustomModelData) as ComponentAccess;
myNeoForgeItemStack . withCustomModelData(myCustomModelData);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:custom_name> of the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withCustomName(name as Component) as ComponentAccess;
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.
// NeoForgeItemStack.withDamage(damage as int) as ComponentAccess;
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.
// NeoForgeItemStack.withDebugStickState(state as DebugStickState) as ComponentAccess;
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.
// NeoForgeItemStack.withDyedColor(color as DyedItemColor) as ComponentAccess;
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.
// NeoForgeItemStack.withEnchantment(enchantment as Enchantment, level as int = 1) as ComponentAccess;
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.
// NeoForgeItemStack.withEnchantments(enchantments as ItemEnchantments) as ComponentAccess;
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.
// NeoForgeItemStack.withEntityData(data as MapData) as ComponentAccess;
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.
// NeoForgeItemStack.withEntityData(data as CustomData) as ComponentAccess;
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.
// NeoForgeItemStack.withFireResistant() as ComponentAccess;
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.
// NeoForgeItemStack.withFireworkExplosion(explosion as FireworkExplosion) as ComponentAccess;
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.
// NeoForgeItemStack.withFireworks(flightDuration as int, explosions as List<FireworkExplosion>) as ComponentAccess;
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.
// NeoForgeItemStack.withFireworks(fireworks as Fireworks) as ComponentAccess;
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.
// NeoForgeItemStack.withFood(food as FoodProperties) as ComponentAccess;
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.
// NeoForgeItemStack.withHideAdditionalTooltip() as ComponentAccess;
myNeoForgeItemStack . withHideAdditionalTooltip();
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:hide_tooltip> of the ComponentAccess to exist. Returns : The new instance with the modified data.
// NeoForgeItemStack.withHideTooltip() as ComponentAccess;
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.
// NeoForgeItemStack.withInstrument(instrument as Instrument) as ComponentAccess;
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.
// NeoForgeItemStack.withIntangibleProjectile() as ComponentAccess;
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.
// NeoForgeItemStack.withItemName(name as Component) as ComponentAccess;
myNeoForgeItemStack . withItemName( Component . literal( "Fancy Water" ));
Return Type:
ComponentAccess
// NeoForgeItemStack.withJsonComponent(type as DataComponentType<T>, value as IData) as IItemStack;
myNeoForgeItemStack . withJsonComponent(myDataComponentType, myIData);
Return Type:
IItemStack
// NeoForgeItemStack.withJsonComponents(value as IData) as 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.
// NeoForgeItemStack.withLock(code as string) as ComponentAccess;
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.
// NeoForgeItemStack.withLock(lock as LockCode) as ComponentAccess;
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.
// NeoForgeItemStack.withLodestoneTracker(tracker as LodestoneTracker) as ComponentAccess;
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.
// NeoForgeItemStack.withLore(components as List<Component>) as ComponentAccess;
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.
// NeoForgeItemStack.withLore(lore as ItemLore) as ComponentAccess;
myNeoForgeItemStack . withLore(myItemLore);
Return Type:
ComponentAccess
Sets the <componenttype:minecraft:map_color> of the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withMapColor(rgb as int) as ComponentAccess;
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.
// NeoForgeItemStack.withMapColor(color as MapItemColor) as ComponentAccess;
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.
// NeoForgeItemStack.withMapDecorations(decorations as Entry[string]) as ComponentAccess;
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.
// NeoForgeItemStack.withMapDecorations(decorations as MapDecorations) as ComponentAccess;
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.
// NeoForgeItemStack.withMapId(id as int) as ComponentAccess;
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.
// NeoForgeItemStack.withMapId(mapId as MapId) as ComponentAccess;
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.
// NeoForgeItemStack.withMapPostProcessing(value as MapPostProcessing) as ComponentAccess;
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.
// NeoForgeItemStack.withMaxDamage(maxDamage as int) as ComponentAccess;
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.
// NeoForgeItemStack.withNoteBlockSound(sound as ResourceLocation) as ComponentAccess;
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
// NeoForgeItemStack.without<T>(type as DataComponentType<T>) as IItemStack;
myNeoForgeItemStack . without < T>(myDataComponentType);
Return Type:
IItemStack
Removes the <componenttype:minecraft:attribute_modifiers> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutAttributeModifiers() as ComponentAccess;
myNeoForgeItemStack . withoutAttributeModifiers();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:banner_patterns> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBannerPatterns() as ComponentAccess;
myNeoForgeItemStack . withoutBannerPatterns();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:base_color> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBaseColor() as ComponentAccess;
myNeoForgeItemStack . withoutBaseColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bees> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBees() as ComponentAccess;
myNeoForgeItemStack . withoutBees();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBlockEntityData() as ComponentAccess;
myNeoForgeItemStack . withoutBlockEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:block_state> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBlockState() as ComponentAccess;
myNeoForgeItemStack . withoutBlockState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bucket_entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBucketEntityData() as ComponentAccess;
myNeoForgeItemStack . withoutBucketEntityData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:bundle_contents> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutBundleContents() as ComponentAccess;
myNeoForgeItemStack . withoutBundleContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_break> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutCanBreak() as ComponentAccess;
myNeoForgeItemStack . withoutCanBreak();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:can_place_on> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutCanPlaceOn() as ComponentAccess;
myNeoForgeItemStack . withoutCanPlaceOn();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:charged_projectiles> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutChargedProjectiles() as ComponentAccess;
myNeoForgeItemStack . withoutChargedProjectiles();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutContainer() as ComponentAccess;
myNeoForgeItemStack . withoutContainer();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:container_loot> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutContainerLoot() as ComponentAccess;
myNeoForgeItemStack . withoutContainerLoot();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:creative_slot_lock> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutCreativeSlotLock() as ComponentAccess;
myNeoForgeItemStack . withoutCreativeSlotLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_data> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutCustomData() as ComponentAccess;
myNeoForgeItemStack . withoutCustomData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_model_data> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutCustomModelData() as ComponentAccess;
myNeoForgeItemStack . withoutCustomModelData();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:custom_name> from the ComponentAccess Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutCustomName() as ComponentAccess;
myNeoForgeItemStack . withoutCustomName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:damage> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutDamage() as ComponentAccess;
myNeoForgeItemStack . withoutDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:debug_stick_state> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutDebugStickState() as ComponentAccess;
myNeoForgeItemStack . withoutDebugStickState();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:dyed_color> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutDyedColor() as ComponentAccess;
myNeoForgeItemStack . withoutDyedColor();
Return Type:
ComponentAccess
Removes the Enchantment
from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutEnchantment(enchantment as Enchantment) as ComponentAccess;
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.
// NeoForgeItemStack.withoutEnchantmentGlintOverride() as ComponentAccess;
myNeoForgeItemStack . withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutEnchantments() as ComponentAccess;
myNeoForgeItemStack . withoutEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:entity_data> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutEntityDate() as ComponentAccess;
myNeoForgeItemStack . withoutEntityDate();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fire_resistant> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutFireResistant() as ComponentAccess;
myNeoForgeItemStack . withoutFireResistant();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:firework_explosion> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutFireworkExplosion() as ComponentAccess;
myNeoForgeItemStack . withoutFireworkExplosion();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:fireworks> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutFireworks() as ComponentAccess;
myNeoForgeItemStack . withoutFireworks();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:food> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutFood() as ComponentAccess;
myNeoForgeItemStack . withoutFood();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_additional_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutHideAdditionalTooltip() as ComponentAccess;
myNeoForgeItemStack . withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:hide_tooltip> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutHideTooltip() as ComponentAccess;
myNeoForgeItemStack . withoutHideTooltip();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:instrument> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutInstrument() as ComponentAccess;
myNeoForgeItemStack . withoutInstrument();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:intangible_projectile> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutIntangibleProjectile() as ComponentAccess;
myNeoForgeItemStack . withoutIntangibleProjectile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:item_name> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutItemName() as ComponentAccess;
myNeoForgeItemStack . withoutItemName();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lock> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutLock() as ComponentAccess;
myNeoForgeItemStack . withoutLock();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lodestone_tracker> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutLodestoneTracker() as ComponentAccess;
myNeoForgeItemStack . withoutLodestoneTracker();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:lore> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutLore() as ComponentAccess;
myNeoForgeItemStack . withoutLore();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_color> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutMapColor() as ComponentAccess;
myNeoForgeItemStack . withoutMapColor();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutMapDecorations() as ComponentAccess;
myNeoForgeItemStack . withoutMapDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_id> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutMapId() as ComponentAccess;
myNeoForgeItemStack . withoutMapId();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:map_post_processing> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutMapPostProcessing() as ComponentAccess;
myNeoForgeItemStack . withoutMapPostProcessing();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:max_damage> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutMaxDamage() as ComponentAccess;
myNeoForgeItemStack . withoutMaxDamage();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stack_size> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutMaxStackSize() as ComponentAccess;
myNeoForgeItemStack . withoutMaxStackSize();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:note_block_sound> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutNoteBlockSound() as ComponentAccess;
myNeoForgeItemStack . withoutNoteBlockSound();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:ominous_bottle_amplifier> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutOminousBottleAmplifier() as ComponentAccess;
myNeoForgeItemStack . withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:pot_decorations> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutPotDecorations() as ComponentAccess;
myNeoForgeItemStack . withoutPotDecorations();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:potion_contents> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutPotionContents() as ComponentAccess;
myNeoForgeItemStack . withoutPotionContents();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:profile> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutProfile() as ComponentAccess;
myNeoForgeItemStack . withoutProfile();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:rarity> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutRarity() as ComponentAccess;
myNeoForgeItemStack . withoutRarity();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:recipes> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutRecipes() as ComponentAccess;
myNeoForgeItemStack . withoutRecipes();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:repair_cost> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutRepairCost() as ComponentAccess;
myNeoForgeItemStack . withoutRepairCost();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:stored_enchantments> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutStoredEnchantments() as ComponentAccess;
myNeoForgeItemStack . withoutStoredEnchantments();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:suspicious_stew_effects> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutSuspiciousStewEffects() as ComponentAccess;
myNeoForgeItemStack . withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:tool> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutTool() as ComponentAccess;
myNeoForgeItemStack . withoutTool();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:trim> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutTrim() as ComponentAccess;
myNeoForgeItemStack . withoutTrim();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:unbreakable> from the ComponentAccess Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutUnbreakable() as ComponentAccess;
myNeoForgeItemStack . withoutUnbreakable();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:writable_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutWritableBookContent() as ComponentAccess;
myNeoForgeItemStack . withoutWritableBookContent();
Return Type:
ComponentAccess
Removes the <componenttype:minecraft:written_book_content> from the ComponentAccess. Returns : The new instance with the modified data.
// NeoForgeItemStack.withoutWrittenBookContent() as ComponentAccess;
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.
// NeoForgeItemStack.withPotDecorations(back as Item, left as Item, right as Item, front as Item) as ComponentAccess;
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.
// NeoForgeItemStack.withPotDecorations(decorations as PotDecorations) as ComponentAccess;
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.
// NeoForgeItemStack.withPotionContents(potion as Potion) as ComponentAccess;
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.
// NeoForgeItemStack.withPotionContents(potion as Potion, customEffects as List<MobEffectInstance>) as ComponentAccess;
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.
// NeoForgeItemStack.withPotionContents(potion as Potion, customColor as int, customEffects as List<MobEffectInstance>) as ComponentAccess;
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.
// NeoForgeItemStack.withPotionContents(contents as PotionContents) as ComponentAccess;
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.
// NeoForgeItemStack.withProfile(profile as ResolvableProfile) as ComponentAccess;
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.
// NeoForgeItemStack.withRarity(rarity as Rarity) as ComponentAccess;
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.
// NeoForgeItemStack.withRecipes(recipes as List<ResourceLocation>) as ComponentAccess;
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.
// NeoForgeItemStack.withRepairCost(cost as int) as ComponentAccess;
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.
// NeoForgeItemStack.withStoredEnchantments(enchantments as ItemEnchantments) as ComponentAccess;
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.
// NeoForgeItemStack.withSuspiciousStewEffects(effects as List<Entry>) as ComponentAccess;
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.
// NeoForgeItemStack.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;
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<Rule>, 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.
// NeoForgeItemStack.withTool(tool as Tool) as ComponentAccess;
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.
// NeoForgeItemStack.withTrim(trim as ArmorTrim) as ComponentAccess;
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.
// NeoForgeItemStack.withUnbreakable(unbreakable as Unbreakable) as ComponentAccess;
myNeoForgeItemStack . withUnbreakable(myUnbreakable);
Return Type:
ComponentAccess
Returns : The new instance with the modified data.
// NeoForgeItemStack.withWritableBookContent(pages as List<Filterable<string>>) as ComponentAccess;
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.
// NeoForgeItemStack.withWritableBookContent(content as WritableBookContent) as ComponentAccess;
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.
// NeoForgeItemStack.withWrittenBookContent(content as WrittenBookContent) as ComponentAccess;
myNeoForgeItemStack . withWrittenBookContent(myWrittenBookContent);
Return Type:
ComponentAccess
Gets the data in <componenttype:minecraft:writable_book_content> // NeoForgeItemStack.writableBookContent as WritableBookContent
myNeoForgeItemStack . writableBookContent
Return Type:
WritableBookContent
Gets the data in <componenttype:minecraft:written_book_content> // NeoForgeItemStack.writtenBookContent as WrittenBookContent
myNeoForgeItemStack . writtenBookContent
Return Type:
WrittenBookContent