ItemDefinition
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.ItemDefinition;Implements
ItemDefinition
implements the following interfaces:
Undocumented Interfaces
FeatureElement,IItemExtension
Members
// Item.addAttributeModifier(attribute as Attribute, modifier as AttributeModifier, slot as EquipmentSlotGroup);myItem.addAttributeModifier(myAttribute, myAttributeModifier, myEquipmentSlotGroup);Parameters:
modifier: AttributeModifier Type: AttributeModifier slot: EquipmentSlotGroup Type: EquipmentSlotGroup myItem.addEnchantment(myEnchantment, myInt);Parameters:
enchantment: Enchantment Type: Enchantment level: int Type: int // Item as ItemDefinitionmyItem as Item
Return Type:
ItemDefinition
myItem.attributeModifiers = myItemAttributeModifiers;Parameters:
modifiers: ItemAttributeModifiers Type: ItemAttributeModifiers myItem.bannerPatterns = myBannerPatternLayers;Parameters:
patterns: BannerPatternLayers Type: BannerPatternLayers myItem.bees = myList;Parameters:
occupants: List<BeehiveBlockEntityOccupant> Type: List<BeehiveBlockEntityOccupant> myItem.blockEntityData = myCustomData;Parameters:
data: CustomData Type: CustomData myItem.blockState = myBlockItemStateProperties;Parameters:
blockState: BlockItemStateProperties Type: BlockItemStateProperties myItem.bucketEntityData = myCustomData;Parameters:
data: CustomData Type: CustomData myItem.bundleContents = myBundleContents;Parameters:
bundleContents: BundleContents Type: BundleContents myItem.canBreak = myAdventureModePredicate;Parameters:
predicate: AdventureModePredicate Type: AdventureModePredicate myItem.canPlaceOn = myAdventureModePredicate;Parameters:
predicate: AdventureModePredicate Type: AdventureModePredicate myItem.chargedProjectiles = myChargedProjectiles;Parameters:
chargedProjectiles: ChargedProjectiles Type: ChargedProjectiles // Item.commandString as stringmyItem.commandString
Return Type:
string
// Item.commandString() as string;myItem.commandString();
Return Type:
string
myItem.container = myItemContainerContents;Parameters:
container: ItemContainerContents Type: ItemContainerContents myItem.containerLoot = mySeededContainerLoot;Parameters:
containerLoot: SeededContainerLoot Type: SeededContainerLoot // Item.creativeSlotLock = (creativeSlotLock as bool);myItem.creativeSlotLock = myBool;Parameters:
creativeSlotLock: bool Type: bool myItem.customData = myCustomData;Parameters:
customData: CustomData Type: CustomData myItem.customModelData = myCustomModelData;Parameters:
modelData: CustomModelData Type: CustomModelData myItem.debugStickState = myDebugStickState;Parameters:
debugStickState: DebugStickState Type: DebugStickState // Item.defaultInstance as IItemStackmyItem.defaultInstance
Return Type:
IItemStack
// Item as IItemStackmyItem as IItemStack
Return Type:
IItemStack
myItem.dyedColor = myDyedItemColor;Parameters:
color: DyedItemColor Type: DyedItemColor // Item.enchantmentGlintOverride = (value as bool);myItem.enchantmentGlintOverride = myBool;Parameters:
value: bool Type: bool myItem.enchantments = myItemEnchantments;Parameters:
enchantments: ItemEnchantments Type: ItemEnchantments myItem.entityData = myCustomData;Parameters:
data: CustomData Type: CustomData // Item.fireResistant = (intangibleProjectile as bool);myItem.fireResistant = myBool;Parameters:
intangibleProjectile: bool Type: bool myItem.fireworkExplosion = myFireworkExplosion;Parameters:
explosion: FireworkExplosion Type: FireworkExplosion myItem.food = myFoodProperties;Parameters:
food: FoodProperties Type: FoodProperties // Item.hideAdditionalTooltip = (hideAdditionalTooltip as bool);myItem.hideAdditionalTooltip = myBool;Parameters:
hideAdditionalTooltip: bool Type: bool // Item.hideTooltip = (hideTooltip as bool);myItem.hideTooltip = myBool;Parameters:
hideTooltip: bool Type: bool myItem.instrument = myInstrument;Parameters:
instrument: Instrument Type: Instrument // Item.intangibleProjectile = (intangibleProjectile as bool);myItem.intangibleProjectile = myBool;Parameters:
intangibleProjectile: bool Type: bool myItem.lodestoneTracker = myLodestoneTracker;Parameters:
tracker: LodestoneTracker Type: LodestoneTracker myItem.mapColor = myMapItemColor;Parameters:
mapColor: MapItemColor Type: MapItemColor myItem.mapDecorations = myMapDecorations;Parameters:
mapDecorations: MapDecorations Type: MapDecorations myItem.mapPostProcessing = myMapPostProcessing;Parameters:
mapPostProcessing: MapPostProcessing Type: MapPostProcessing // Item.maxDamage = (maxDamage as int);myItem.maxDamage = myInt;Parameters:
maxDamage: int Type: int // Item.maxStackSize = (maxStackSize as int);myItem.maxStackSize = myInt;Parameters:
maxStackSize: int Type: int myItem.noteBlockSound = myResourceLocation;Parameters:
sound: ResourceLocation Type: ResourceLocation // Item.ominousBottleAmplifier = (amplifier as int);myItem.ominousBottleAmplifier = myInt;Parameters:
amplifier: int Type: int myItem.potDecorations = myPotDecorations;Parameters:
decorations: PotDecorations Type: PotDecorations myItem.potionContents = myPotionContents;Parameters:
potionContents: PotionContents Type: PotionContents myItem.profile = myResolvableProfile;Parameters:
profile: ResolvableProfile Type: ResolvableProfile myItem.recipes = myList;Parameters:
recipes: List<ResourceLocation> Type: List<ResourceLocation> // Item.registryName as ResourceLocationmyItem.registryName
Return Type:
ResourceLocation
myItem.remove(myDataComponentType);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> // Item.repairCost = (cost as int);myItem.repairCost = myInt;Parameters:
cost: int Type: int myItem.setComponent<T>(myDataComponentType, myT);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> value: T Type: T myItem.setJsonComponent(myDataComponentType, myIData);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> myItem.storedEnchantments = myItemEnchantments;Parameters:
storedEnchantments: ItemEnchantments Type: ItemEnchantments myItem.suspiciousStewEffects = mySuspiciousStewEffects;Parameters:
suspiciousStewEffects: SuspiciousStewEffects Type: SuspiciousStewEffects myItem.unbreakable = myUnbreakable;Parameters:
unbreakable: Unbreakable Type: Unbreakable myItem.writableBookContent = myWritableBookContent;Parameters:
writableBookContent: WritableBookContent Type: WritableBookContent myItem.writtenBookContent = myWrittenBookContent;Parameters:
writtenBookContent: WrittenBookContent Type: WrittenBookContent