NeoForgeItemStack
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
import crafttweaker.api.item.NeoForgeItemStack;
Implements
NeoForgeItemStack
implements the following interfaces:
IItemStack
,IIngredient
,IIngredientWithAmount
,DataComponentHolder
,ComponentAccess<IItemStack>
,CommandStringDisplayable
Undocumented Interfaces
IDataComponentHolderExtension
Operators
myIIngredient in myNeoForgeItemStack
Parameters:
Return Type:
bool
// (NeoForgeItemStack * (amount as int)) as IIngredientWithAmountmyNeoForgeItemStack * myInt
Parameters:
amount: int
Type: int
Return Type:
IIngredientWithAmount
myNeoForgeItemStack | myIIngredient
Parameters:
other: IIngredient
Type: IIngredient
Return Type:
IIngredientList
myNeoForgeItemStack % myDouble
Parameters:
percentage: double
Type: double
Return Type:
Percentaged<IItemStack>
// (NeoForgeItemStack * (amount as int)) as IItemStackmyNeoForgeItemStack * myInt
Parameters:
amount: int
Type: int
- new amount
Return Type:
IItemStack
Members
Please use Item Components instead.
// NeoForgeItemStack.addGlobalAttributeModifier(attribute as Attribute, id as ResourceLocation, value as double, operation as AttributeOperation, slotTypes as EquipmentSlot[]);myNeoForgeItemStack.addGlobalAttributeModifier(myAttribute, myResourceLocation, myDouble, myOperation, myEquipmentSlot[]);
Parameters:
id: ResourceLocation
Type: ResourceLocation
value: double
Type: double
operation: AttributeOperation
Type: AttributeOperation
slotTypes: EquipmentSlot[]
Type: EquipmentSlot[]
// NeoForgeItemStack.amount as intmyNeoForgeItemStack.amount
Return Type:
int
// NeoForgeItemStack.amount as intmyNeoForgeItemStack.amount
Return Type:
int
myNeoForgeItemStack.applyComponents(myDataComponentMap);
Parameters:
map: DataComponentMap
Type: DataComponentMap
Return Type:
IItemStack
myNeoForgeItemStack.applyComponents(myDataComponentPatch);
Parameters:
patch: DataComponentPatch
Type: DataComponentPatch
Return Type:
IItemStack
myNeoForgeItemStack.applyComponentsAndValidate(myDataComponentPatch);
Parameters:
patch: DataComponentPatch
Type: DataComponentPatch
Return Type:
IItemStack
myNeoForgeItemStack.asIIngredientWithAmount();
Return Type:
IIngredientWithAmount
// NeoForgeItemStack as IIngredientWithAmountmyNeoForgeItemStack as IIngredientWithAmount
Return Type:
IIngredientWithAmount
// NeoForgeItemStack as IIngredientWithAmountmyNeoForgeItemStack as IIngredientWithAmount
Return Type:
IIngredientWithAmount
myNeoForgeItemStack.asVanillaIngredient();
Return Type:
Ingredient
// NeoForgeItemStack as IngredientmyNeoForgeItemStack as Ingredient
Return Type:
Ingredient
myNeoForgeItemStack as Percentaged<IItemStack>
Return Type:
Percentaged<IItemStack>
// NeoForgeItemStack.attributeModifiers as ItemAttributeModifiersmyNeoForgeItemStack.attributeModifiers
Return Type:
ItemAttributeModifiers
// NeoForgeItemStack.bannerPatterns as BannerPatternLayersmyNeoForgeItemStack.bannerPatterns
Return Type:
BannerPatternLayers
// NeoForgeItemStack.BASE_ATTACK_DAMAGE_ID as ResourceLocationNeoForgeItemStack.BASE_ATTACK_DAMAGE_ID
Return Type:
ResourceLocation
// NeoForgeItemStack.BASE_ATTACK_SPEED_ID as ResourceLocationNeoForgeItemStack.BASE_ATTACK_SPEED_ID
Return Type:
ResourceLocation
myNeoForgeItemStack.bees
Return Type:
List<BeehiveBlockEntityOccupant>
// NeoForgeItemStack.blockEntityData as CustomDatamyNeoForgeItemStack.blockEntityData
Return Type:
CustomData
// NeoForgeItemStack.blockState as BlockItemStatePropertiesmyNeoForgeItemStack.blockState
Return Type:
BlockItemStateProperties
// NeoForgeItemStack.bucketEntityData as CustomDatamyNeoForgeItemStack.bucketEntityData
Return Type:
CustomData
// NeoForgeItemStack.bundleContents as BundleContentsmyNeoForgeItemStack.bundleContents
Return Type:
BundleContents
// NeoForgeItemStack.burnTime as intmyNeoForgeItemStack.burnTime
Return Type:
int
// NeoForgeItemStack.burnTime = (time as int);myNeoForgeItemStack.burnTime = myInt;
Parameters:
time: int
Type: int
- the new burn time // NeoForgeItemStack.burnTime(time as int);myNeoForgeItemStack.burnTime(500);
Parameters:
time: int
Type: int
- the new burn time // NeoForgeItemStack.canBreak as AdventureModePredicatemyNeoForgeItemStack.canBreak
Return Type:
AdventureModePredicate
// NeoForgeItemStack.canPlaceOn as AdventureModePredicatemyNeoForgeItemStack.canPlaceOn
Return Type:
AdventureModePredicate
// NeoForgeItemStack.chargedProjectiles as ChargedProjectilesmyNeoForgeItemStack.chargedProjectiles
Return Type:
ChargedProjectiles
// NeoForgeItemStack.clearTooltip(leaveName as bool = false);myNeoForgeItemStack.clearTooltip(myBool);
Parameters:
leaveName: bool
(optional) Type: bool
Default Value: false
// NeoForgeItemStack.commandString as stringmyNeoForgeItemStack.commandString
Return Type:
string
// NeoForgeItemStack.commandString as stringmyNeoForgeItemStack.commandString
Return Type:
string
// NeoForgeItemStack.commandString() as string;myNeoForgeItemStack.commandString();
Return Type:
string
// NeoForgeItemStack.componentsPatch as DataComponentPatchmyNeoForgeItemStack.componentsPatch
Return Type:
DataComponentPatch
myNeoForgeItemStack.condition(myIIngredientCondition);
Parameters:
condition: IIngredientCondition
Type: IIngredientCondition
Return Type:
IIngredient
// NeoForgeItemStack.container as ItemContainerContentsmyNeoForgeItemStack.container
Return Type:
ItemContainerContents
// NeoForgeItemStack.containerLoot as SeededContainerLootmyNeoForgeItemStack.containerLoot
Return Type:
SeededContainerLoot
myNeoForgeItemStack.contains((<item:minecraft:iron_ingot> | <item:minecraft:gold_ingot>));
Parameters:
Return Type:
bool
// NeoForgeItemStack.CRAFTTWEAKER_DATA_KEY as stringNeoForgeItemStack.CRAFTTWEAKER_DATA_KEY
Return Type:
string
// NeoForgeItemStack.creativeSlotLock as boolmyNeoForgeItemStack.creativeSlotLock
Return Type:
bool
// NeoForgeItemStack.customData as CustomDatamyNeoForgeItemStack.customData
Return Type:
CustomData
// NeoForgeItemStack.customModelData as CustomModelDatamyNeoForgeItemStack.customModelData
Return Type:
CustomModelData
// NeoForgeItemStack.damage as intmyNeoForgeItemStack.damage
Return Type:
int
// NeoForgeItemStack.damageableItem as boolmyNeoForgeItemStack.damageableItem
Return Type:
bool
// NeoForgeItemStack.damaged as boolmyNeoForgeItemStack.damaged
Return Type:
bool
// NeoForgeItemStack.debugStickState as DebugStickStatemyNeoForgeItemStack.debugStickState
Return Type:
DebugStickState
// NeoForgeItemStack.definition as ItemDefinitionmyNeoForgeItemStack.definition
Return Type:
ItemDefinition
// NeoForgeItemStack as ItemDefinitionmyNeoForgeItemStack as Item
Return Type:
ItemDefinition
// NeoForgeItemStack.descriptionId as stringmyNeoForgeItemStack.descriptionId
Return Type:
string
// NeoForgeItemStack.dyedColor as DyedItemColormyNeoForgeItemStack.dyedColor
Return Type:
DyedItemColor
// NeoForgeItemStack.empty as boolmyNeoForgeItemStack.empty
Return Type:
bool
Returns: true if empty, false otherwise
// NeoForgeItemStack.empty() as bool;myNeoForgeItemStack.empty();
Return Type:
bool
If it is present, it is first checked to determine whether there is special behaviour, otherwise the code checks for enchantments.
// NeoForgeItemStack.enchantmentGlintOverride as boolmyNeoForgeItemStack.enchantmentGlintOverride
Return Type:
bool
// NeoForgeItemStack.enchantments as ItemEnchantmentsmyNeoForgeItemStack.enchantments
Return Type:
ItemEnchantments
// NeoForgeItemStack.entityData as CustomDatamyNeoForgeItemStack.entityData
Return Type:
CustomData
// NeoForgeItemStack.fireworkExplosion as FireworkExplosionmyNeoForgeItemStack.fireworkExplosion
Return Type:
FireworkExplosion
// NeoForgeItemStack.food as FoodPropertiesmyNeoForgeItemStack.food
Return Type:
FoodProperties
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>);
Parameters:
Return Type:
List<AttributeModifier>[Attribute]
myNeoForgeItemStack.getBurnTime(myIRecipeManager);
Parameters:
manager: IRecipeManager<Recipe>
Type: IRecipeManager<Recipe>
Return Type:
int
myNeoForgeItemStack.getRemainingItem(<item:minecraft:iron_ingot>);
Parameters:
Return Type:
IItemStack
Returns: use duration
myNeoForgeItemStack.getUseDuration(entity);
Parameters:
entity: LivingEntity
Type: LivingEntity
Return Type:
int
Returns: This IItemStack if mutable, a new one with the new amount otherwise.
myNeoForgeItemStack.grow(2);
Parameters:
amount: int
(optional) Type: int
- The amount to grow by.
Default Value: 1
Return Type:
IItemStack
// NeoForgeItemStack.hasAttributeModifiers as boolmyNeoForgeItemStack.hasAttributeModifiers
Return Type:
bool
// NeoForgeItemStack.hasBannerPatterns as boolmyNeoForgeItemStack.hasBannerPatterns
Return Type:
bool
Used for shield colouring.
// NeoForgeItemStack.hasBaseColor as boolmyNeoForgeItemStack.hasBaseColor
Return Type:
bool
// NeoForgeItemStack.hasBees as boolmyNeoForgeItemStack.hasBees
Return Type:
bool
// NeoForgeItemStack.hasBlockEntityData as boolmyNeoForgeItemStack.hasBlockEntityData
Return Type:
bool
// NeoForgeItemStack.hasBlockState as boolmyNeoForgeItemStack.hasBlockState
Return Type:
bool
// NeoForgeItemStack.hasBucketEntityData as boolmyNeoForgeItemStack.hasBucketEntityData
Return Type:
bool
// NeoForgeItemStack.hasBundleContents as boolmyNeoForgeItemStack.hasBundleContents
Return Type:
bool
// NeoForgeItemStack.hasCanBreak as boolmyNeoForgeItemStack.hasCanBreak
Return Type:
bool
// NeoForgeItemStack.hasCanPlaceOn as boolmyNeoForgeItemStack.hasCanPlaceOn
Return Type:
bool
This component is used for crossbows.
// NeoForgeItemStack.hasChargedProjectiles as boolmyNeoForgeItemStack.hasChargedProjectiles
Return Type:
bool
// NeoForgeItemStack.hasContainer as boolmyNeoForgeItemStack.hasContainer
Return Type:
bool
// NeoForgeItemStack.hasContainerLoot as boolmyNeoForgeItemStack.hasContainerLoot
Return Type:
bool
// NeoForgeItemStack.hasCustomData as boolmyNeoForgeItemStack.hasCustomData
Return Type:
bool
// NeoForgeItemStack.hasCustomModelData as boolmyNeoForgeItemStack.hasCustomModelData
Return Type:
bool
// NeoForgeItemStack.hasCustomName as boolmyNeoForgeItemStack.hasCustomName
Return Type:
bool
// NeoForgeItemStack.hasDamage as boolmyNeoForgeItemStack.hasDamage
Return Type:
bool
// NeoForgeItemStack.hasDebugStickState as boolmyNeoForgeItemStack.hasDebugStickState
Return Type:
bool
// NeoForgeItemStack.hasDyedColor as boolmyNeoForgeItemStack.hasDyedColor
Return Type:
bool
// NeoForgeItemStack.hasEnchantmentGlintOverride as boolmyNeoForgeItemStack.hasEnchantmentGlintOverride
Return Type:
bool
// NeoForgeItemStack.hasEnchantments as boolmyNeoForgeItemStack.hasEnchantments
Return Type:
bool
// NeoForgeItemStack.hasEntityData as boolmyNeoForgeItemStack.hasEntityData
Return Type:
bool
// NeoForgeItemStack.hasFireworkExplosion as boolmyNeoForgeItemStack.hasFireworkExplosion
Return Type:
bool
// NeoForgeItemStack.hasFireworks as boolmyNeoForgeItemStack.hasFireworks
Return Type:
bool
Foil is the glint / effect that is added to enchanted ItemStacks (and other items).
// NeoForgeItemStack.hasFoil as boolmyNeoForgeItemStack.hasFoil
Return Type:
bool
// NeoForgeItemStack.hasFood as boolmyNeoForgeItemStack.hasFood
Return Type:
bool
// NeoForgeItemStack.hasInstrument as boolmyNeoForgeItemStack.hasInstrument
Return Type:
bool
// NeoForgeItemStack.hasItemName as boolmyNeoForgeItemStack.hasItemName
Return Type:
bool
// NeoForgeItemStack.hasLock as boolmyNeoForgeItemStack.hasLock
Return Type:
bool
// NeoForgeItemStack.hasLodestoneTracker as boolmyNeoForgeItemStack.hasLodestoneTracker
Return Type:
bool
// NeoForgeItemStack.hasLore as boolmyNeoForgeItemStack.hasLore
Return Type:
bool
// NeoForgeItemStack.hasMapColor as boolmyNeoForgeItemStack.hasMapColor
Return Type:
bool
MapDecorations are additional elements that render on a map, such as waypoints.
// NeoForgeItemStack.hasMapDecorations as boolmyNeoForgeItemStack.hasMapDecorations
Return Type:
bool
// NeoForgeItemStack.hasMapId as boolmyNeoForgeItemStack.hasMapId
Return Type:
bool
This componenet stores additional info on the map, such as the scale or whether to lock it.
// NeoForgeItemStack.hasMapPostProcessing as boolmyNeoForgeItemStack.hasMapPostProcessing
Return Type:
bool
// NeoForgeItemStack.hasMaxDamage as boolmyNeoForgeItemStack.hasMaxDamage
Return Type:
bool
// NeoForgeItemStack.hasMaxStackSize as boolmyNeoForgeItemStack.hasMaxStackSize
Return Type:
bool
// NeoForgeItemStack.hasNoteBlockSound as boolmyNeoForgeItemStack.hasNoteBlockSound
Return Type:
bool
// NeoForgeItemStack.hasOminousBottleAmplifier as boolmyNeoForgeItemStack.hasOminousBottleAmplifier
Return Type:
bool
// NeoForgeItemStack.hasPotDecorations as boolmyNeoForgeItemStack.hasPotDecorations
Return Type:
bool
Stores Potion Data on an item.
// NeoForgeItemStack.hasPotionContents as boolmyNeoForgeItemStack.hasPotionContents
Return Type:
bool
// NeoForgeItemStack.hasProfile as boolmyNeoForgeItemStack.hasProfile
Return Type:
bool
// NeoForgeItemStack.hasRarity as boolmyNeoForgeItemStack.hasRarity
Return Type:
bool
Used for Knowledge Books.
// NeoForgeItemStack.hasRecipes as boolmyNeoForgeItemStack.hasRecipes
Return Type:
bool
// NeoForgeItemStack.hasRepairCost as boolmyNeoForgeItemStack.hasRepairCost
Return Type:
bool
The stored enchantments component is only present in enchanted books, since it just stores the enchantments under a lid for future use. The item is not enchanted.
// NeoForgeItemStack.hasStoredEnchantments as boolmyNeoForgeItemStack.hasStoredEnchantments
Return Type:
bool
// NeoForgeItemStack.hasSuspiciousStewEffects as boolmyNeoForgeItemStack.hasSuspiciousStewEffects
Return Type:
bool
// NeoForgeItemStack.hasTool as boolmyNeoForgeItemStack.hasTool
Return Type:
bool
// NeoForgeItemStack.hasTrim as boolmyNeoForgeItemStack.hasTrim
Return Type:
bool
// NeoForgeItemStack.hasUnbreakable as boolmyNeoForgeItemStack.hasUnbreakable
Return Type:
bool
// NeoForgeItemStack.hasWritableBookContent as boolmyNeoForgeItemStack.hasWritableBookContent
Return Type:
bool
// NeoForgeItemStack.hasWrittenBookContent as boolmyNeoForgeItemStack.hasWrittenBookContent
Return Type:
bool
// NeoForgeItemStack.hideAdditionalTooltip as boolmyNeoForgeItemStack.hideAdditionalTooltip
Return Type:
bool
// NeoForgeItemStack.hideTooltip as boolmyNeoForgeItemStack.hideTooltip
Return Type:
bool
// NeoForgeItemStack.ingredient as IIngredientmyNeoForgeItemStack.ingredient
Return Type:
IIngredient
// NeoForgeItemStack.instrument as InstrumentmyNeoForgeItemStack.instrument
Return Type:
Instrument
// NeoForgeItemStack.isEnchantable as boolmyNeoForgeItemStack.isEnchantable
Return Type:
bool
// NeoForgeItemStack.isFireResistant as boolmyNeoForgeItemStack.isFireResistant
Return Type:
bool
// NeoForgeItemStack.isImmutable as boolmyNeoForgeItemStack.isImmutable
Return Type:
bool
// NeoForgeItemStack.isImmutable() as bool;myNeoForgeItemStack.isImmutable();
Return Type:
bool
// NeoForgeItemStack.isIntangibleProjectile as boolmyNeoForgeItemStack.isIntangibleProjectile
Return Type:
bool
// NeoForgeItemStack.isMutable as boolmyNeoForgeItemStack.isMutable
Return Type:
bool
// NeoForgeItemStack.isMutable() as bool;myNeoForgeItemStack.isMutable();
Return Type:
bool
myNeoForgeItemStack.items
Return Type:
IItemStack[]
// NeoForgeItemStack.lodestoneTracker as LodestoneTrackermyNeoForgeItemStack.lodestoneTracker
Return Type:
LodestoneTracker
// NeoForgeItemStack.mapColor as MapItemColormyNeoForgeItemStack.mapColor
Return Type:
MapItemColor
// NeoForgeItemStack.mapDecorations as MapDecorationsmyNeoForgeItemStack.mapDecorations
Return Type:
MapDecorations
// NeoForgeItemStack.mapPostProcessing as MapPostProcessingmyNeoForgeItemStack.mapPostProcessing
Return Type:
MapPostProcessing
myNeoForgeItemStack.matches(<item:minecraft:iron_ingot>);
Parameters:
Return Type:
bool
// NeoForgeItemStack.maxDamage as intmyNeoForgeItemStack.maxDamage
Return Type:
int
// NeoForgeItemStack.maxDamage as intmyNeoForgeItemStack.maxDamage
Return Type:
int
// NeoForgeItemStack.maxStackSize as intmyNeoForgeItemStack.maxStackSize
Return Type:
int
// NeoForgeItemStack.modifyShiftTooltip(shiftedFunction as ITooltipFunction, unshiftedFunction as ITooltipFunction = null);myNeoForgeItemStack.modifyShiftTooltip(myITooltipFunction, myITooltipFunction);
Parameters:
shiftedFunction: ITooltipFunction
Type: ITooltipFunction
myNeoForgeItemStack.modifyTooltip(myITooltipFunction);
Parameters:
function: ITooltipFunction
Type: ITooltipFunction
myNeoForgeItemStack.mul(myInt);
Parameters:
amount: int
Type: int
Return Type:
IIngredientWithAmount
// NeoForgeItemStack.noteBlockSound as ResourceLocationmyNeoForgeItemStack.noteBlockSound
Return Type:
ResourceLocation
// NeoForgeItemStack.ominousBottleAmplifier as intmyNeoForgeItemStack.ominousBottleAmplifier
Return Type:
int
myNeoForgeItemStack.onlyDamagedAtLeast(myInt);
Parameters:
minDamage: int
Type: int
Return Type:
IIngredient
myNeoForgeItemStack.onlyDamagedAtMost(myInt);
Parameters:
maxDamage: int
Type: int
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
// NeoForgeItemStack.owner as stringmyNeoForgeItemStack.owner
Return Type:
string
myNeoForgeItemStack.percent(myDouble);
Parameters:
percentage: double
Type: double
Return Type:
Percentaged<IItemStack>
// NeoForgeItemStack.potDecorations as PotDecorationsmyNeoForgeItemStack.potDecorations
Return Type:
PotDecorations
// NeoForgeItemStack.potionContents as PotionContentsmyNeoForgeItemStack.potionContents
Return Type:
PotionContents
// NeoForgeItemStack.potPattern as DecoratedPotPatternmyNeoForgeItemStack.potPattern
Return Type:
DecoratedPotPattern
myNeoForgeItemStack.potPatternId
Return Type:
ResourceKey<DecoratedPotPattern>
// NeoForgeItemStack.profile as ResolvableProfilemyNeoForgeItemStack.profile
Return Type:
ResolvableProfile
// NeoForgeItemStack.prototype as DataComponentMapmyNeoForgeItemStack.prototype
Return Type:
DataComponentMap
myNeoForgeItemStack.recipes
Return Type:
List<ResourceLocation>
// NeoForgeItemStack.registryName as ResourceLocationmyNeoForgeItemStack.registryName
Return Type:
ResourceLocation
myNeoForgeItemStack.remove<T>(myDataComponentType);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
Please use Item Components instead.
myNeoForgeItemStack.removeGlobalAttribute(myAttribute, myEquipmentSlot[]);
Parameters:
slotTypes: EquipmentSlot[]
Type: EquipmentSlot[]
Please use Item Components instead.
myNeoForgeItemStack.removeGlobalAttributeModifier(myString, myEquipmentSlot[]);
Parameters:
uuid: string
Type: string
slotTypes: EquipmentSlot[]
Type: EquipmentSlot[]
Please use Item Components instead.
myNeoForgeItemStack.removeGlobalAttributeModifier(myUUID, myEquipmentSlot[]);
Parameters:
uuid: UUID
Type: UUID
slotTypes: EquipmentSlot[]
Type: EquipmentSlot[]
// NeoForgeItemStack.removeTooltip(regex as string);myNeoForgeItemStack.removeTooltip(myString);
Parameters:
regex: string
Type: string
// NeoForgeItemStack.repairCost as intmyNeoForgeItemStack.repairCost
Return Type:
int
myNeoForgeItemStack.setBurnTime(500, myIRecipeManager);
Parameters:
time: int
Type: int
- the new burn time manager: IRecipeManager<Recipe>
Type: IRecipeManager<Recipe>
Returns: This IItemStack if mutable, a new one with the new amount otherwise.
myNeoForgeItemStack.shrink(2);
Parameters:
amount: int
(optional) Type: int
- The amount to shrink by.
Default Value: 1
Return Type:
IItemStack
// NeoForgeItemStack.stackable as boolmyNeoForgeItemStack.stackable
Return Type:
bool
// NeoForgeItemStack.storedEnchantments as ItemEnchantmentsmyNeoForgeItemStack.storedEnchantments
Return Type:
ItemEnchantments
// NeoForgeItemStack.suspiciousStewEffects as SuspiciousStewEffectsmyNeoForgeItemStack.suspiciousStewEffects
Return Type:
SuspiciousStewEffects
// NeoForgeItemStack.transformCustom(uid as string, function as function(r as IItemStack) as IItemStack = null) as IIngredient;myNeoForgeItemStack.transformCustom(myString, myFunction);
Parameters:
uid: string
Type: string
function: function(r as IItemStack) as IItemStack
(optional) Type: function(r as IItemStack) as IItemStack
Default Value: null
Return Type:
IIngredient
myNeoForgeItemStack.transformDamage(myInt);
Parameters:
amount: int
(optional) Type: int
Default Value: 1
Return Type:
IIngredient
myNeoForgeItemStack.transformReplace(myIItemStack);
Parameters:
replaceWith: IItemStack
Type: IItemStack
Return Type:
IIngredient
// NeoForgeItemStack.unbreakable as UnbreakablemyNeoForgeItemStack.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:
type: DataComponentType<T>
Type: DataComponentType<T>
defaultValue: T
Type: T
data: U
Type: U
operator: BiFunction<T, T, U>
Type: BiFunction<T, T, U>
Return Type:
IItemStack
// NeoForgeItemStack.update<T>(type as DataComponentType<T>, defaultValue as T, operator as UnaryOperator<T>) as IItemStack;myNeoForgeItemStack.update<T>(myDataComponentType, myT, myUnaryOperator);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
defaultValue: T
Type: T
operator: UnaryOperator<T>
Type: UnaryOperator<T>
Return Type:
IItemStack
// NeoForgeItemStack.useOnRelease as boolmyNeoForgeItemStack.useOnRelease
Return Type:
bool
myNeoForgeItemStack.with<T>(myDataComponentType, myT);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
value: T?
Type: T?
Return Type:
IItemStack
ItemAttributeModifiers
Returns: The new instance with the modified data.
// 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(););
Parameters:
modifiers: ItemAttributeModifiers
Type: ItemAttributeModifiers
- The attributes to give to the item.
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// NeoForgeItemStack.withAttributeModifiers(modifier as ItemAttributeModifiersEntry, showInTooltip as bool = true) as ComponentAccess;myNeoForgeItemStack.withAttributeModifiers(myEntry, myBool);
Parameters:
modifier: ItemAttributeModifiersEntry
Type: ItemAttributeModifiersEntry
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
// NeoForgeItemStack.withAttributeModifiers(modifiers as List<ItemAttributeModifiersEntry>, showInTooltip as bool = true) as ComponentAccess;myNeoForgeItemStack.withAttributeModifiers(myList, myBool);
Parameters:
modifiers: List<ItemAttributeModifiersEntry>
Type: List<ItemAttributeModifiersEntry>
showInTooltip: bool
(optional) Type: bool
Default Value: true
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// NeoForgeItemStack.withBannerPatterns(layers as List<BannerPatternLayersLayer>) as ComponentAccess;myNeoForgeItemStack.withBannerPatterns(myList);
Parameters:
layers: List<BannerPatternLayersLayer>
Type: List<BannerPatternLayersLayer>
Return Type:
ComponentAccess
BannerPatternLayers
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBannerPatterns(myBannerPatternLayers);
Parameters:
layers: BannerPatternLayers
Type: BannerPatternLayers
Return Type:
ComponentAccess
DyeColor
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBaseColor(myDyeColor);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBees(myList);
Parameters:
occupants: List<BeehiveBlockEntityOccupant>
Type: List<BeehiveBlockEntityOccupant>
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBlockEntityData(myMapData);
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBlockEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
BlockItemStateProperties
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBlockState(myBlockItemStateProperties);
Parameters:
properties: BlockItemStateProperties
Type: BlockItemStateProperties
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBucketEntityData(myMapData);
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBucketEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBundleContents([<item:minecraft:diamond> * 64]);
Parameters:
Return Type:
ComponentAccess
BundleContents
Returns: The new instance with the modified data.
myNeoForgeItemStack.withBundleContents(myBundleContents);
Parameters:
contents: BundleContents
Type: BundleContents
Return Type:
ComponentAccess
Any predicate that matches will allow the Block to be broken by this ItemStack.
Returns: The new instance with the modified data.
// NeoForgeItemStack.withCanBreak(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;myNeoForgeItemStack.withCanBreak(BlockPredicate.create().of(<block:minecraft:diamond_ore>).build(), true);
Parameters:
predicates: List<BlockPredicate>
Type: List<BlockPredicate>
- The collection of predicates to test for showInTooltip: bool
(optional) Type: bool
- Whether to show the ability in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
AdventureModePredicate
Returns: The new instance with the modified data.
myNeoForgeItemStack.withCanBreak(myAdventureModePredicate);
Parameters:
predicate: AdventureModePredicate
Type: AdventureModePredicate
- The adventure mode predicate to use to determine whether the item can be used to break a block.
Return Type:
ComponentAccess
Any predicate that matches will allow the BlockItem within the ItemStack to be placed.
Returns: The new instance with the modified data.
// NeoForgeItemStack.withCanPlaceOn(predicates as List<BlockPredicate>, showInTooltip as bool = true) as ComponentAccess;myNeoForgeItemStack.withCanPlaceOn(BlockPredicate.create().of(<block:minecraft:dirt>).build(), myBool);
Parameters:
predicates: List<BlockPredicate>
Type: List<BlockPredicate>
- The collection of predicates to test for showInTooltip: bool
(optional) Type: bool
- Whether to show the restriction in the tooltip or not.
Default Value: true
Return Type:
ComponentAccess
AdventureModePredicate
Returns: The new instance with the modified data.
myNeoForgeItemStack.withCanPlaceOn(myAdventureModePredicate);
Parameters:
predicate: AdventureModePredicate
Type: AdventureModePredicate
- The adventure mode predicate to use to determine whether the current block can be placed on another block.
Return Type:
ComponentAccess
IItemStack
Returns: The new instance with the modified data.
myNeoForgeItemStack.withChargedProjectiles(<item:minecraft:arrow>);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withChargedProjectiles([<item:minecraft:arrow>]);
Parameters:
Return Type:
ComponentAccess
ChargedProjectiles
Returns: The new instance with the modified data.
// NeoForgeItemStack.withChargedProjectiles(chargedProjectiles as ChargedProjectiles) as ComponentAccess;myNeoForgeItemStack.withChargedProjectiles(myChargedProjectiles);
Parameters:
chargedProjectiles: ChargedProjectiles
Type: ChargedProjectiles
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withContainer(myList);
Parameters:
contents: List<IItemStack>
Type: List<IItemStack>
Return Type:
ComponentAccess
ItemContainerContents
Returns: The new instance with the modified data.
myNeoForgeItemStack.withContainer(myItemContainerContents);
Parameters:
contents: ItemContainerContents
Type: ItemContainerContents
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// NeoForgeItemStack.withContainerLoot(lootTable as ResourceKey<LootTable>, seed as long) as ComponentAccess;myNeoForgeItemStack.withContainerLoot(myResourceKey, myLong);
Parameters:
lootTable: ResourceKey<LootTable>
Type: ResourceKey<LootTable>
seed: long
Type: long
Return Type:
ComponentAccess
SeededContainerLoot
Returns: The new instance with the modified data.
myNeoForgeItemStack.withContainerLoot(mySeededContainerLoot);
Parameters:
loot: SeededContainerLoot
Type: SeededContainerLoot
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withCreativeSlotLock();
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withCustomData({custom_ammo_thing: 1, owner: "Benji"});
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withCustomData(myCustomData);
Parameters:
customData: CustomData
Type: CustomData
Return Type:
ComponentAccess
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);
Parameters:
data: CustomModelData
Type: CustomModelData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withCustomName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
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
DebugStickState
Returns: The new instance with the modified data.
myNeoForgeItemStack.withDebugStickState(myDebugStickState);
Parameters:
state: DebugStickState
Type: DebugStickState
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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
DyedItemColor
Returns: The new instance with the modified data.
myNeoForgeItemStack.withDyedColor(myDyedItemColor);
Parameters:
color: DyedItemColor
Type: DyedItemColor
Return Type:
ComponentAccess
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
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.
myNeoForgeItemStack.withEnchantmentGlintOverride(true);
Parameters:
value: bool
Type: bool
- The value of the override, as described above
Return Type:
ComponentAccess
ItemEnchantments
Returns: The new instance with the modified data.
myNeoForgeItemStack.withEnchantments(myItemEnchantments);
Parameters:
enchantments: ItemEnchantments
Type: ItemEnchantments
Return Type:
ComponentAccess
MapData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withEntityData(myMapData);
Return Type:
ComponentAccess
CustomData
Returns: The new instance with the modified data.
myNeoForgeItemStack.withEntityData(myCustomData);
Parameters:
data: CustomData
Type: CustomData
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withFireResistant();
Return Type:
ComponentAccess
FireworkExplosion
Returns: The new instance with the modified data.
myNeoForgeItemStack.withFireworkExplosion(myFireworkExplosion);
Parameters:
explosion: FireworkExplosion
Type: FireworkExplosion
Return Type:
ComponentAccess
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
explosions: List<FireworkExplosion>
Type: List<FireworkExplosion>
Return Type:
ComponentAccess
Fireworks
Returns: The new instance with the modified data.
myNeoForgeItemStack.withFireworks(myFireworks);
Return Type:
ComponentAccess
FoodProperties
Returns: The new instance with the modified data.
myNeoForgeItemStack.withFood(myFoodProperties);
Parameters:
food: FoodProperties
Type: FoodProperties
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withHideTooltip();
Return Type:
ComponentAccess
Instrument
Returns: The new instance with the modified data.
myNeoForgeItemStack.withInstrument(myInstrument);
Parameters:
instrument: Instrument
Type: Instrument
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withIntangibleProjectile();
Return Type:
ComponentAccess
Component
Returns: The new instance with the modified data.
myNeoForgeItemStack.withItemName(Component.literal("Fancy Water"));
Return Type:
ComponentAccess
myNeoForgeItemStack.withJsonComponent(myDataComponentType, myIData);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
myNeoForgeItemStack.withJsonComponents(myIData);
Return Type:
IItemStack
Returns: The new instance with the modified data.
myNeoForgeItemStack.withLock(myString);
Parameters:
code: string
Type: string
Return Type:
ComponentAccess
LockCode
Returns: The new instance with the modified data.
myNeoForgeItemStack.withLock(myLockCode);
Return Type:
ComponentAccess
LodestoneTracker
Returns: The new instance with the modified data.
myNeoForgeItemStack.withLodestoneTracker(myLodestoneTracker);
Parameters:
tracker: LodestoneTracker
Type: LodestoneTracker
Return Type:
ComponentAccess
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:
Return Type:
ComponentAccess
myNeoForgeItemStack.withLore(myComponent);
Return Type:
ComponentAccess
ItemLore
Returns: The new instance with the modified data.
myNeoForgeItemStack.withLore(myItemLore);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMapColor(0xFF0000);
Parameters:
rgb: int
Type: int
- The new map colour
Return Type:
ComponentAccess
MapItemColor
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMapColor(myMapItemColor);
Parameters:
color: MapItemColor
Type: MapItemColor
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// NeoForgeItemStack.withMapDecorations(decorations as MapDecorationsEntry[string]) as ComponentAccess;myNeoForgeItemStack.withMapDecorations(myMap);
Parameters:
decorations: MapDecorationsEntry[string]
Type: MapDecorationsEntry[string]
Return Type:
ComponentAccess
MapDecorations
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMapDecorations(myMapDecorations);
Parameters:
decorations: MapDecorations
Type: MapDecorations
Return Type:
ComponentAccess
A map id is only useful after the game generates one to store data. Therefore, you should always pass in the parameter for an id you know is available.
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMapId(myInt);
Parameters:
id: int
Type: int
Return Type:
ComponentAccess
MapId
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMapId(myMapId);
Return Type:
ComponentAccess
MapPostProcessing
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMapPostProcessing(myMapPostProcessing);
Parameters:
value: MapPostProcessing
Type: MapPostProcessing
Return Type:
ComponentAccess
It is likely that you need to call withDamage(0) in order for some things to function properly.
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMaxDamage(1024);
Parameters:
maxDamage: int
Type: int
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withMaxStackSize(16);
Parameters:
maxStackSize: int
Type: int
- The new maxStackSize of the ComponentAccess.
Return Type:
ComponentAccess
ResourceLocation
Returns: The new instance with the modified data.
myNeoForgeItemStack.withNoteBlockSound(myResourceLocation);
Parameters:
sound: ResourceLocation
Type: ResourceLocation
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withOminousBottleAmplifier(myInt);
Parameters:
amplifier: int
Type: int
Return Type:
ComponentAccess
myNeoForgeItemStack.without<T>(myDataComponentType);
Parameters:
type: DataComponentType<T>
Type: DataComponentType<T>
Return Type:
IItemStack
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutAttributeModifiers();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBannerPatterns();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBaseColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBees();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBlockEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBlockState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBucketEntityData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutBundleContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutCanBreak();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutCanPlaceOn();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutChargedProjectiles();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutContainer();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutContainerLoot();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutCreativeSlotLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutCustomData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutCustomModelData();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutCustomName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutDebugStickState();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutDyedColor();
Return Type:
ComponentAccess
Enchantment
from the ComponentAccess.Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutEnchantment(<enchantment:minecraft:mending>);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutEnchantmentGlintOverride();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutEntityDate();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutFireResistant();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutFireworkExplosion();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutFireworks();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutFood();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutHideAdditionalTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutHideTooltip();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutInstrument();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutIntangibleProjectile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutItemName();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutLock();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutLodestoneTracker();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutLore();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutMapColor();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutMapDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutMapId();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutMapPostProcessing();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutMaxDamage();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutMaxStackSize();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutNoteBlockSound();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutOminousBottleAmplifier();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutPotDecorations();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutPotionContents();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutProfile();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutRarity();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutRecipes();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutRepairCost();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutStoredEnchantments();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutSuspiciousStewEffects();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutTool();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutTrim();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutUnbreakable();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutWritableBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withoutWrittenBookContent();
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
// NeoForgeItemStack.withPotDecorations(back as ItemDefinition, left as ItemDefinition, right as ItemDefinition, front as ItemDefinition) as ComponentAccess;myNeoForgeItemStack.withPotDecorations(myItem, myItem, myItem, myItem);
Parameters:
back: ItemDefinition
Type: ItemDefinition
left: ItemDefinition
Type: ItemDefinition
right: ItemDefinition
Type: ItemDefinition
front: ItemDefinition
Type: ItemDefinition
Return Type:
ComponentAccess
PotDecorations
Returns: The new instance with the modified data.
myNeoForgeItemStack.withPotDecorations(myPotDecorations);
Parameters:
decorations: PotDecorations
Type: PotDecorations
Return Type:
ComponentAccess
Potion
and no custom effects
Returns: The new instance with the modified data.
myNeoForgeItemStack.withPotionContents(<potion:minecraft:swiftness>);
Return Type:
ComponentAccess
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)]);
Parameters:
customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
- The effects to grant upon consuming this potion.
Return Type:
ComponentAccess
Potion
and the given
MobEffectInstance
effects.Returns: The new instance with the modified data.
// 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. customEffects: List<MobEffectInstance>
Type: List<MobEffectInstance>
- The effects to grant upon consuming this potion.
Return Type:
ComponentAccess
PotionContents
Returns: The new instance with the modified data.
myNeoForgeItemStack.withPotionContents(myPotionContents);
Parameters:
contents: PotionContents
Type: PotionContents
Return Type:
ComponentAccess
ResolvableProfile
Returns: The new instance with the modified data.
myNeoForgeItemStack.withProfile(myResolvableProfile);
Parameters:
profile: ResolvableProfile
Type: ResolvableProfile
Return Type:
ComponentAccess
Rarity
Returns: The new instance with the modified data.
myNeoForgeItemStack.withRarity(<constant:minecraft:item/rarity:epic>);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withRecipes(myList);
Parameters:
recipes: List<ResourceLocation>
Type: List<ResourceLocation>
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withRepairCost(20);
Parameters:
cost: int
Type: int
- The repair cost
Return Type:
ComponentAccess
ItemEnchantments
Returns: The new instance with the modified data.
myNeoForgeItemStack.withStoredEnchantments(myItemEnchantments);
Parameters:
enchantments: ItemEnchantments
Type: ItemEnchantments
Return Type:
ComponentAccess
SuspiciousStewEffects
SuspiciousStewEffects.Entry is effectively a pair of Effect and duration.
Returns: The new instance with the modified data.
// NeoForgeItemStack.withSuspiciousStewEffects(effects as List<SuspiciousStewEffectsEntry>) as ComponentAccess;myNeoForgeItemStack.withSuspiciousStewEffects(myList);
Parameters:
effects: List<SuspiciousStewEffectsEntry>
Type: List<SuspiciousStewEffectsEntry>
- The list of effects to grant on consumption.
Return Type:
ComponentAccess
SuspiciousStewEffects
Returns: The new instance with the modified data.
// NeoForgeItemStack.withSuspiciousStewEffects(suspiciousStewEffects as SuspiciousStewEffects) as ComponentAccess;myNeoForgeItemStack.withSuspiciousStewEffects(mySuspiciousStewEffects);
Parameters:
suspiciousStewEffects: SuspiciousStewEffects
Type: SuspiciousStewEffects
Return Type:
ComponentAccess
Tool
instance is constructed from the parameters.Returns: The new instance with the modified data.
// 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:
Return Type:
ComponentAccess
Tool
Returns: The new instance with the modified data.
myNeoForgeItemStack.withTool(myTool);
Return Type:
ComponentAccess
ArmorTrim
Returns: The new instance with the modified data.
myNeoForgeItemStack.withTrim(myArmorTrim);
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
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
Returns: The new instance with the modified data.
myNeoForgeItemStack.withUnbreakable(myUnbreakable);
Parameters:
Return Type:
ComponentAccess
Returns: The new instance with the modified data.
myNeoForgeItemStack.withWritableBookContent(myList);
Parameters:
pages: List<Filterable<string>>
Type: List<Filterable<string>>
Return Type:
ComponentAccess
WritableBookContent
Returns: The new instance with the modified data.
myNeoForgeItemStack.withWritableBookContent(myWritableBookContent);
Parameters:
content: WritableBookContent
Type: WritableBookContent
Return Type:
ComponentAccess
WrittenBookContent
Returns: The new instance with the modified data.
myNeoForgeItemStack.withWrittenBookContent(myWrittenBookContent);
Parameters:
content: WrittenBookContent
Type: WrittenBookContent
Return Type:
ComponentAccess
// NeoForgeItemStack.writableBookContent as WritableBookContentmyNeoForgeItemStack.writableBookContent
Return Type:
WritableBookContent
// NeoForgeItemStack.writtenBookContent as WrittenBookContentmyNeoForgeItemStack.writtenBookContent
Return Type:
WrittenBookContent