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;
CrossbowItem extends ProjectileWeaponItem
.
CrossbowItem
implements the following interfaces:
ItemLike
Undocumented Interfaces FeatureElement
, IItemExtension
// CrossbowItem.addAttributeModifier(attribute as Attribute, modifier as AttributeModifier, slot as EquipmentSlotGroup);
myCrossbowItem . addAttributeModifier(myAttribute, myAttributeModifier, myEquipmentSlotGroup);
// CrossbowItem.addEnchantment(enchantment as Enchantment, level as int);
myCrossbowItem . addEnchantment(myEnchantment, myInt);
Gets a predicate for the supported projectiles for this item. // CrossbowItem.allSupportedProjectiles as function(t as ItemStack) as bool
myCrossbowItem . allSupportedProjectiles
Return Type:
function(t as ItemStack ) as bool
A predicate which only accepts arrow items // CrossbowItem.ARROW_ONLY() as function(t as ItemStack) as bool;
CrossbowItem . ARROW_ONLY();
Return Type:
function(t as ItemStack ) as bool
A predicate which supports arrow items and fireworks // CrossbowItem.ARROW_OR_FIREWORK() as function(t as ItemStack) as bool;
CrossbowItem . ARROW_OR_FIREWORK();
Return Type:
function(t as ItemStack ) as bool
// CrossbowItem.attributeModifiers = (modifiers as ItemAttributeModifiers);
myCrossbowItem . attributeModifiers = myItemAttributeModifiers;
// CrossbowItem.bannerPatterns = (patterns as BannerPatternLayers);
myCrossbowItem . bannerPatterns = myBannerPatternLayers;
// CrossbowItem.baseColor = (baseColor as DyeColor);
myCrossbowItem . baseColor = myDyeColor;
Parameters:
baseColor: DyeColor
Type: DyeColor
// CrossbowItem.bees = (occupants as List<Occupant>);
myCrossbowItem . bees = myList;
// CrossbowItem.blockEntityData = (data as CustomData);
myCrossbowItem . blockEntityData = myCustomData;
// CrossbowItem.blockState = (blockState as BlockItemStateProperties);
myCrossbowItem . blockState = myBlockItemStateProperties;
// CrossbowItem.bucketEntityData = (data as CustomData);
myCrossbowItem . bucketEntityData = myCustomData;
// CrossbowItem.bundleContents = (bundleContents as BundleContents);
myCrossbowItem . bundleContents = myBundleContents;
// 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
// CrossbowItem.chargedProjectiles = (chargedProjectiles as ChargedProjectiles);
myCrossbowItem . chargedProjectiles = myChargedProjectiles;
// CrossbowItem.commandString as string
myCrossbowItem . commandString
Return Type:
string
// CrossbowItem.commandString() as string;
myCrossbowItem . commandString();
Return Type:
string
// CrossbowItem.commonItemComponents() as DataComponentMap;
CrossbowItem . commonItemComponents();
Return Type:
DataComponentMap
// CrossbowItem.container = (container as ItemContainerContents);
myCrossbowItem . container = myItemContainerContents;
// CrossbowItem.containerLoot = (containerLoot as SeededContainerLoot);
myCrossbowItem . containerLoot = mySeededContainerLoot;
// CrossbowItem.creativeSlotLock = (creativeSlotLock as bool);
myCrossbowItem . creativeSlotLock = myBool;
Parameters:
creativeSlotLock: bool
Type: bool
// CrossbowItem.customData = (customData as CustomData);
myCrossbowItem . customData = myCustomData;
// CrossbowItem.customModelData = (modelData as CustomModelData);
myCrossbowItem . customModelData = myCustomModelData;
// CrossbowItem.customName = (component as Component);
myCrossbowItem . customName = myComponent;
// CrossbowItem.debugStickState = (debugStickState as DebugStickState);
myCrossbowItem . debugStickState = myDebugStickState;
// CrossbowItem.defaultInstance as IItemStack
myCrossbowItem . defaultInstance
Return Type:
IItemStack
// CrossbowItem.defaultInstance() as IItemStack;
myCrossbowItem . defaultInstance();
Return Type:
IItemStack
// CrossbowItem as IItemStack
myCrossbowItem as IItemStack
Return Type:
IItemStack
Gets the default projectile range for this item. // CrossbowItem.defaultProjectileRange as int
myCrossbowItem . defaultProjectileRange
Return Type:
int
// CrossbowItem.dyedColor = (color as DyedItemColor);
myCrossbowItem . dyedColor = myDyedItemColor;
// CrossbowItem.enchantmentGlintOverride = (value as bool);
myCrossbowItem . enchantmentGlintOverride = myBool;
// CrossbowItem.enchantments = (enchantments as ItemEnchantments);
myCrossbowItem . enchantments = myItemEnchantments;
// CrossbowItem.entityData = (data as CustomData);
myCrossbowItem . entityData = myCustomData;
// CrossbowItem.fireResistant = (intangibleProjectile as bool);
myCrossbowItem . fireResistant = myBool;
Parameters:
intangibleProjectile: bool
Type: bool
// CrossbowItem.fireworkExplosion = (explosion as FireworkExplosion);
myCrossbowItem . fireworkExplosion = myFireworkExplosion;
// CrossbowItem.fireworks = (fireworks as Fireworks);
myCrossbowItem . fireworks = myFireworks;
// CrossbowItem.food = (food as FoodProperties);
myCrossbowItem . food = myFoodProperties;
Gets the charged duration of the given stack. Returns : the charged duration of the given stack.
// CrossbowItem.getChargeDuration(crossbowStack as ItemStack) as int;
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
// CrossbowItem.instrument = (instrument as Instrument);
myCrossbowItem . instrument = myInstrument;
// CrossbowItem.intangibleProjectile = (intangibleProjectile as bool);
myCrossbowItem . intangibleProjectile = myBool;
Parameters:
intangibleProjectile: bool
Type: bool
Checks if the stack is charged Returns : true if charged, false otherwise.
// CrossbowItem.isCharged(crossbowStack as ItemStack) as bool;
CrossbowItem . isCharged( < item : minecraft:crossbow > );
Return Type:
bool
// CrossbowItem.itemName = (component as Component);
myCrossbowItem . itemName = myComponent;
// CrossbowItem.lockCode = (code as LockCode);
myCrossbowItem . lockCode = myLockCode;
Parameters:
code: LockCode
Type: LockCode
// CrossbowItem.lodestoneTracker = (tracker as LodestoneTracker);
myCrossbowItem . lodestoneTracker = myLodestoneTracker;
// CrossbowItem.lore = (lore as ItemLore);
myCrossbowItem . lore = myItemLore;
// CrossbowItem.mapColor = (mapColor as MapItemColor);
myCrossbowItem . mapColor = myMapItemColor;
// CrossbowItem.mapDecorations = (mapDecorations as MapDecorations);
myCrossbowItem . mapDecorations = myMapDecorations;
// CrossbowItem.mapId = (id as MapId);
myCrossbowItem . mapId = myMapId;
// CrossbowItem.mapPostProcessing = (mapPostProcessing as MapPostProcessing);
myCrossbowItem . mapPostProcessing = myMapPostProcessing;
// CrossbowItem.maxDamage = (maxDamage as int);
myCrossbowItem . maxDamage = myInt;
// CrossbowItem.maxStackSize = (maxStackSize as int);
myCrossbowItem . maxStackSize = myInt;
Parameters:
maxStackSize: int
Type: int
// CrossbowItem.noteBlockSound = (sound as ResourceLocation);
myCrossbowItem . noteBlockSound = myResourceLocation;
// CrossbowItem.ominousBottleAmplifier = (amplifier as int);
myCrossbowItem . ominousBottleAmplifier = myInt;
// 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:
power: float
Type: float
accuracy: float
Type: float
// CrossbowItem.potDecorations = (decorations as PotDecorations);
myCrossbowItem . potDecorations = myPotDecorations;
// CrossbowItem.potionContents = (potionContents as PotionContents);
myCrossbowItem . potionContents = myPotionContents;
Parameters:
potionContents: PotionContents
Type: PotionContents
// CrossbowItem.profile = (profile as ResolvableProfile);
myCrossbowItem . profile = myResolvableProfile;
// CrossbowItem.rarity = (rarity as Rarity);
myCrossbowItem . rarity = myRarity;
// CrossbowItem.recipes = (recipes as List<ResourceLocation>);
myCrossbowItem . recipes = myList;
// CrossbowItem.registryName as ResourceLocation
myCrossbowItem . registryName
Return Type:
ResourceLocation
// CrossbowItem.registryName() as ResourceLocation;
myCrossbowItem . registryName();
Return Type:
ResourceLocation
// CrossbowItem.remove(type as DataComponentType<T>);
myCrossbowItem . remove(myDataComponentType);
// CrossbowItem.repairCost = (cost as int);
myCrossbowItem . repairCost = myInt;
// CrossbowItem.setComponent<T>(type as DataComponentType<T>, value as T);
myCrossbowItem . setComponent < T>(myDataComponentType, myT);
// CrossbowItem.setJsonComponent(type as DataComponentType<T>, value as IData);
myCrossbowItem . setJsonComponent(myDataComponentType, myIData);
// CrossbowItem.storedEnchantments = (storedEnchantments as ItemEnchantments);
myCrossbowItem . storedEnchantments = myItemEnchantments;
Gets a predicate for the supported held projectiles for this item. held projectiles are projectiles that can only be used when held in the off-hand while shooting / charging
// CrossbowItem.supportedHeldProjectiles as function(t as ItemStack) as bool
myCrossbowItem . supportedHeldProjectiles
Return Type:
function(t as ItemStack ) as bool
// CrossbowItem.suspiciousStewEffects = (suspiciousStewEffects as SuspiciousStewEffects);
myCrossbowItem . suspiciousStewEffects = mySuspiciousStewEffects;
// CrossbowItem.tool = (tool as Tool);
myCrossbowItem . tool = myTool;
// CrossbowItem.trim = (trim as ArmorTrim);
myCrossbowItem . trim = myArmorTrim;
// CrossbowItem.unbreakable = (unbreakable as Unbreakable);
myCrossbowItem . unbreakable = myUnbreakable;
// CrossbowItem.writableBookContent = (writableBookContent as WritableBookContent);
myCrossbowItem . writableBookContent = myWritableBookContent;
// CrossbowItem.writtenBookContent = (writtenBookContent as WrittenBookContent);
myCrossbowItem . writtenBookContent = myWrittenBookContent;