CrossbowItem
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.projectileweapon.CrossbowItem;Extends
CrossbowItem extends ProjectileWeaponItem.
Implements
CrossbowItem
implements the following interfaces:
Undocumented Interfaces
FeatureElement,IItemExtension
Members
// CrossbowItem.addAttributeModifier(attribute as Attribute, modifier as AttributeModifier, slot as EquipmentSlotGroup);myCrossbowItem.addAttributeModifier(myAttribute, myAttributeModifier, myEquipmentSlotGroup);Parameters:
modifier: AttributeModifier Type: AttributeModifier slot: EquipmentSlotGroup Type: EquipmentSlotGroup myCrossbowItem.addEnchantment(myEnchantment, myInt);Parameters:
enchantment: Enchantment Type: Enchantment level: int Type: int // CrossbowItem as ItemDefinitionmyCrossbowItem as Item
Return Type:
ItemDefinition
myCrossbowItem.attributeModifiers = myItemAttributeModifiers;Parameters:
modifiers: ItemAttributeModifiers Type: ItemAttributeModifiers myCrossbowItem.bannerPatterns = myBannerPatternLayers;Parameters:
patterns: BannerPatternLayers Type: BannerPatternLayers // CrossbowItem.baseColor = (baseColor as DyeColor);myCrossbowItem.baseColor = myDyeColor;Parameters:
baseColor: DyeColor Type: DyeColor myCrossbowItem.bees = myList;Parameters:
occupants: List<BeehiveBlockEntityOccupant> Type: List<BeehiveBlockEntityOccupant> myCrossbowItem.blockEntityData = myCustomData;Parameters:
data: CustomData Type: CustomData myCrossbowItem.blockState = myBlockItemStateProperties;Parameters:
blockState: BlockItemStateProperties Type: BlockItemStateProperties myCrossbowItem.bucketEntityData = myCustomData;Parameters:
data: CustomData Type: CustomData myCrossbowItem.bundleContents = myBundleContents;Parameters:
bundleContents: BundleContents Type: BundleContents // CrossbowItem.canBreak = (predicate as AdventureModePredicate);myCrossbowItem.canBreak = myAdventureModePredicate;Parameters:
predicate: AdventureModePredicate Type: AdventureModePredicate // CrossbowItem.canPlaceOn = (predicate as AdventureModePredicate);myCrossbowItem.canPlaceOn = myAdventureModePredicate;Parameters:
predicate: AdventureModePredicate Type: AdventureModePredicate myCrossbowItem.chargedProjectiles = myChargedProjectiles;Parameters:
chargedProjectiles: ChargedProjectiles Type: ChargedProjectiles // CrossbowItem.commandString as stringmyCrossbowItem.commandString
Return Type:
string
// CrossbowItem.commandString() as string;myCrossbowItem.commandString();
Return Type:
string
myCrossbowItem.container = myItemContainerContents;Parameters:
container: ItemContainerContents Type: ItemContainerContents myCrossbowItem.containerLoot = mySeededContainerLoot;Parameters:
containerLoot: SeededContainerLoot Type: SeededContainerLoot // CrossbowItem.creativeSlotLock = (creativeSlotLock as bool);myCrossbowItem.creativeSlotLock = myBool;Parameters:
creativeSlotLock: bool Type: bool myCrossbowItem.customData = myCustomData;Parameters:
customData: CustomData Type: CustomData myCrossbowItem.customModelData = myCustomModelData;Parameters:
modelData: CustomModelData Type: CustomModelData myCrossbowItem.debugStickState = myDebugStickState;Parameters:
debugStickState: DebugStickState Type: DebugStickState // CrossbowItem.defaultInstance as IItemStackmyCrossbowItem.defaultInstance
Return Type:
IItemStack
// CrossbowItem as IItemStackmyCrossbowItem as IItemStack
Return Type:
IItemStack
// CrossbowItem.defaultProjectileRange as intmyCrossbowItem.defaultProjectileRange
Return Type:
int
myCrossbowItem.dyedColor = myDyedItemColor;Parameters:
color: DyedItemColor Type: DyedItemColor // CrossbowItem.enchantmentGlintOverride = (value as bool);myCrossbowItem.enchantmentGlintOverride = myBool;Parameters:
value: bool Type: bool myCrossbowItem.enchantments = myItemEnchantments;Parameters:
enchantments: ItemEnchantments Type: ItemEnchantments myCrossbowItem.entityData = myCustomData;Parameters:
data: CustomData Type: CustomData // CrossbowItem.fireResistant = (intangibleProjectile as bool);myCrossbowItem.fireResistant = myBool;Parameters:
intangibleProjectile: bool Type: bool myCrossbowItem.fireworkExplosion = myFireworkExplosion;Parameters:
explosion: FireworkExplosion Type: FireworkExplosion myCrossbowItem.food = myFoodProperties;Parameters:
food: FoodProperties Type: FoodProperties Returns: the charged duration of the given stack.
CrossbowItem.getChargeDuration(<item:minecraft:crossbow>);
Return Type:
int
// CrossbowItem.hideAdditionalTooltip = (hideAdditionalTooltip as bool);myCrossbowItem.hideAdditionalTooltip = myBool;Parameters:
hideAdditionalTooltip: bool Type: bool // CrossbowItem.hideTooltip = (hideTooltip as bool);myCrossbowItem.hideTooltip = myBool;Parameters:
hideTooltip: bool Type: bool myCrossbowItem.instrument = myInstrument;Parameters:
instrument: Instrument Type: Instrument // CrossbowItem.intangibleProjectile = (intangibleProjectile as bool);myCrossbowItem.intangibleProjectile = myBool;Parameters:
intangibleProjectile: bool Type: bool // CrossbowItem.lockCode = (code as LockCode);myCrossbowItem.lockCode = myLockCode;Parameters:
code: LockCode Type: LockCode myCrossbowItem.lodestoneTracker = myLodestoneTracker;Parameters:
tracker: LodestoneTracker Type: LodestoneTracker myCrossbowItem.mapColor = myMapItemColor;Parameters:
mapColor: MapItemColor Type: MapItemColor myCrossbowItem.mapDecorations = myMapDecorations;Parameters:
mapDecorations: MapDecorations Type: MapDecorations // CrossbowItem.mapId = (id as MapId);myCrossbowItem.mapId = myMapId;Parameters:
id: MapId Type: MapId myCrossbowItem.mapPostProcessing = myMapPostProcessing;Parameters:
mapPostProcessing: MapPostProcessing Type: MapPostProcessing // CrossbowItem.maxDamage = (maxDamage as int);myCrossbowItem.maxDamage = myInt;Parameters:
maxDamage: int Type: int // CrossbowItem.maxStackSize = (maxStackSize as int);myCrossbowItem.maxStackSize = myInt;Parameters:
maxStackSize: int Type: int myCrossbowItem.noteBlockSound = myResourceLocation;Parameters:
sound: ResourceLocation Type: ResourceLocation // CrossbowItem.ominousBottleAmplifier = (amplifier as int);myCrossbowItem.ominousBottleAmplifier = myInt;Parameters:
amplifier: int Type: int // CrossbowItem.performShooting(level as Level, shooter as LivingEntity, hand as InteractionHand, stack as ItemStack, power as float, accuracy as float, target as LivingEntity);myCrossbowItem.performShooting(myLevel, myLivingEntity, myInteractionHand, myItemStack, myFloat, myFloat, myLivingEntity);Parameters:
shooter: LivingEntity Type: LivingEntity hand: InteractionHand Type: InteractionHand power: float Type: float accuracy: float Type: float target: LivingEntity Type: LivingEntity myCrossbowItem.potDecorations = myPotDecorations;Parameters:
decorations: PotDecorations Type: PotDecorations // CrossbowItem.potionContents = (potionContents as PotionContents);myCrossbowItem.potionContents = myPotionContents;Parameters:
potionContents: PotionContents Type: PotionContents myCrossbowItem.profile = myResolvableProfile;Parameters:
profile: ResolvableProfile Type: ResolvableProfile myCrossbowItem.recipes = myList;Parameters:
recipes: List<ResourceLocation> Type: List<ResourceLocation> // CrossbowItem.registryName as ResourceLocationmyCrossbowItem.registryName
Return Type:
ResourceLocation
myCrossbowItem.remove(myDataComponentType);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> // CrossbowItem.repairCost = (cost as int);myCrossbowItem.repairCost = myInt;Parameters:
cost: int Type: int myCrossbowItem.setComponent<T>(myDataComponentType, myT);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> value: T Type: T myCrossbowItem.setJsonComponent(myDataComponentType, myIData);Parameters:
type: DataComponentType<T> Type: DataComponentType<T> myCrossbowItem.storedEnchantments = myItemEnchantments;Parameters:
storedEnchantments: ItemEnchantments Type: ItemEnchantments
held projectiles are projectiles that can only be used when held in the off-hand while shooting / charging
myCrossbowItem.supportedHeldProjectiles
Return Type:
function(t as ItemStack) as bool
myCrossbowItem.suspiciousStewEffects = mySuspiciousStewEffects;Parameters:
suspiciousStewEffects: SuspiciousStewEffects Type: SuspiciousStewEffects myCrossbowItem.unbreakable = myUnbreakable;Parameters:
unbreakable: Unbreakable Type: Unbreakable myCrossbowItem.writableBookContent = myWritableBookContent;Parameters:
writableBookContent: WritableBookContent Type: WritableBookContent myCrossbowItem.writtenBookContent = myWrittenBookContent;Parameters:
writtenBookContent: WrittenBookContent Type: WrittenBookContent