Package net.minecraft.world.item
Class BowItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ProjectileWeaponItem
net.minecraft.world.item.BowItem
- All Implemented Interfaces:
FeatureElement
,ItemLike
,IItemExtension
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
Fields inherited from class net.minecraft.world.item.ProjectileWeaponItem
ARROW_ONLY, ARROW_OR_FIREWORK
Fields inherited from class net.minecraft.world.item.Item
ABSOLUTE_MAX_STACK_SIZE, APPROXIMATELY_INFINITE_USE_DURATION, BASE_ATTACK_DAMAGE_ID, BASE_ATTACK_SPEED_ID, BY_BLOCK, canCombineRepair, CODEC, DEFAULT_MAX_STACK_SIZE, descriptionId, MAX_BAR_WIDTH, STREAM_CODEC
Fields inherited from interface net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
static float
getPowerForTime
(int pCharge) Gets the velocity of the arrow entity from the bow's chargegetUseAnimation
(ItemStack pStack) int
getUseDuration
(ItemStack pStack, LivingEntity pEntity) boolean
releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pEntity, int pTimeLeft) protected void
shootProjectile
(LivingEntity pShooter, Projectile pProjectile, int pIndex, float pVelocity, float pInaccuracy, float pAngle, LivingEntity pTarget) use
(Level pLevel, Player pPlayer, InteractionHand pHand) Methods inherited from class net.minecraft.world.item.ProjectileWeaponItem
createProjectile, customArrow, draw, getAllSupportedProjectiles, getDefaultCreativeAmmo, getDurabilityUse, getHeldProjectile, getSupportedHeldProjectiles, getSupportedHeldProjectiles, shoot, useAmmo
Methods inherited from class net.minecraft.world.item.Item
appendHoverText, asItem, builtInRegistryHolder, byBlock, byId, canDestroyBlock, canFitInsideContainerItems, components, finishUsingItem, getAttackDamageBonus, getBarColor, getBarWidth, getCraftingRemainder, getDamageSource, getDefaultInstance, getDefaultMaxStackSize, getDescriptionId, getDestroySpeed, getId, getName, getName, getPlayerPOVHitResult, getTooltipImage, hurtEnemy, interactLivingEntity, inventoryTick, isBarVisible, isCombineRepairable, isCorrectToolForDrops, isFoil, mineBlock, modifyDefaultComponentsFrom, onCraftedBy, onCraftedPostProcess, onDestroyed, onUseTick, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, requiredFeatures, shouldPrintOpWarning, toString, useOn, useOnRelease, verifyComponentsAfterLoad
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.flag.FeatureElement
isEnabled
Methods inherited from interface net.neoforged.neoforge.common.extensions.IItemExtension
applyEnchantments, canBeHurtBy, canContinueUsing, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, getAllEnchantments, getBurnTime, getCraftingRemainder, getCreatorModId, getDamage, getDefaultAttributeModifiers, getEnchantmentLevel, getEntityLifespan, getEquipmentSlot, getHighlightTip, getMaxDamage, getMaxStackSize, getSweepHitBox, getXpRepairRatio, hasCustomEntity, isDamageable, isDamaged, isGazeDisguise, isNotReplaceableByPickAction, isPiglinCurrency, isPrimaryItemFor, makesPiglinsNeutral, onAnimalArmorTick, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onItemUseFirst, onLeftClickEntity, onStopUsing, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, supportsEnchantment
-
Field Details
-
MAX_DRAW_DURATION
public static final int MAX_DRAW_DURATION- See Also:
-
DEFAULT_RANGE
public static final int DEFAULT_RANGE- See Also:
-
-
Constructor Details
-
BowItem
-
-
Method Details
-
releaseUsing
- Overrides:
releaseUsing
in classItem
-
shootProjectile
protected void shootProjectile(LivingEntity pShooter, Projectile pProjectile, int pIndex, float pVelocity, float pInaccuracy, float pAngle, @Nullable LivingEntity pTarget) - Specified by:
shootProjectile
in classProjectileWeaponItem
-
getPowerForTime
public static float getPowerForTime(int pCharge) Gets the velocity of the arrow entity from the bow's charge -
getUseDuration
- Overrides:
getUseDuration
in classItem
-
getUseAnimation
- Overrides:
getUseAnimation
in classItem
-
use
-
getAllSupportedProjectiles
- Specified by:
getAllSupportedProjectiles
in classProjectileWeaponItem
-
getDefaultProjectileRange
public int getDefaultProjectileRange()- Specified by:
getDefaultProjectileRange
in classProjectileWeaponItem
-