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