类 CrossbowItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ProjectileWeaponItem
net.minecraft.world.item.CrossbowItem
- 所有已实现的接口:
FeatureElement
,ItemLike
,IItemExtension
-
嵌套类概要
嵌套类从类继承的嵌套类/接口 net.minecraft.world.item.Item
Item.Properties, Item.TooltipContext
-
字段概要
字段修饰符和类型字段说明private static final float
static final int
private static final CrossbowItem.ChargingSounds
private static final float
private static final float
private static final float
private boolean
static final float
private static final float
private boolean
从类继承的字段 net.minecraft.world.item.ProjectileWeaponItem
ARROW_ONLY, ARROW_OR_FIREWORK
从类继承的字段 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
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected Projectile
createProjectile
(Level p_331583_, LivingEntity p_40863_, ItemStack p_40864_, ItemStack p_40865_, boolean p_40866_) static int
getChargeDuration
(ItemStack p_352255_, LivingEntity p_345687_) (专用程序包) CrossbowItem.ChargingSounds
getChargingSounds
(ItemStack p_345050_) int
protected int
getDurabilityUse
(ItemStack p_331489_) private static float
getPowerForTime
(int p_40854_, ItemStack p_40855_, LivingEntity p_344803_) private static org.joml.Vector3f
getProjectileShotVector
(LivingEntity p_331584_, Vec3 p_331590_, float p_331104_) private static float
getRandomShotPitch
(boolean p_220026_, RandomSource p_220027_) private static float
getShootingPower
(ChargedProjectiles p_330249_) private static float
getShotPitch
(RandomSource p_331176_, int p_331542_) getUseAnimation
(ItemStack p_40935_) int
getUseDuration
(ItemStack p_40938_, LivingEntity p_344898_) static boolean
void
onUseTick
(Level p_40910_, LivingEntity p_40911_, ItemStack p_40912_, int p_40913_) void
performShooting
(Level p_40888_, LivingEntity p_40889_, InteractionHand p_40890_, ItemStack p_40891_, float p_40892_, float p_40893_, LivingEntity p_331602_) boolean
releaseUsing
(ItemStack p_40875_, Level p_40876_, LivingEntity p_40877_, int p_40878_) protected void
shootProjectile
(LivingEntity p_40896_, Projectile p_332122_, int p_331865_, float p_40900_, float p_40902_, float p_40903_, LivingEntity p_330303_) private static boolean
tryLoadProjectiles
(LivingEntity p_40860_, ItemStack p_40861_) use
(Level p_40920_, Player p_40921_, InteractionHand p_40922_) boolean
useOnRelease
(ItemStack p_150801_) 从类继承的方法 net.minecraft.world.item.ProjectileWeaponItem
customArrow, draw, getAllSupportedProjectiles, getDefaultCreativeAmmo, getHeldProjectile, getSupportedHeldProjectiles, shoot, useAmmo
从类继承的方法 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, overrideOtherStackedOnMe, overrideStackedOnOther, postHurtEnemy, requiredFeatures, shouldPrintOpWarning, toString, useOn, verifyComponentsAfterLoad
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 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
-
字段详细资料
-
MAX_CHARGE_DURATION
private static final float MAX_CHARGE_DURATION- 另请参阅:
-
DEFAULT_RANGE
public static final int DEFAULT_RANGE- 另请参阅:
-
startSoundPlayed
private boolean startSoundPlayed -
midLoadSoundPlayed
private boolean midLoadSoundPlayed -
START_SOUND_PERCENT
private static final float START_SOUND_PERCENT- 另请参阅:
-
MID_SOUND_PERCENT
private static final float MID_SOUND_PERCENT- 另请参阅:
-
ARROW_POWER
private static final float ARROW_POWER- 另请参阅:
-
FIREWORK_POWER
private static final float FIREWORK_POWER- 另请参阅:
-
MOB_ARROW_POWER
public static final float MOB_ARROW_POWER- 另请参阅:
-
DEFAULT_SOUNDS
-
-
构造器详细资料
-
CrossbowItem
-
-
方法详细资料
-
getSupportedHeldProjectiles
-
getAllSupportedProjectiles
-
use
-
getShootingPower
-
releaseUsing
public boolean releaseUsing(ItemStack p_40875_, Level p_40876_, LivingEntity p_40877_, int p_40878_) - 覆盖:
releaseUsing
在类中Item
-
tryLoadProjectiles
-
isCharged
-
shootProjectile
protected void shootProjectile(LivingEntity p_40896_, Projectile p_332122_, int p_331865_, float p_40900_, float p_40902_, float p_40903_, @Nullable LivingEntity p_330303_) - 指定者:
shootProjectile
在类中ProjectileWeaponItem
-
getProjectileShotVector
private static org.joml.Vector3f getProjectileShotVector(LivingEntity p_331584_, Vec3 p_331590_, float p_331104_) -
createProjectile
protected Projectile createProjectile(Level p_331583_, LivingEntity p_40863_, ItemStack p_40864_, ItemStack p_40865_, boolean p_40866_) - 覆盖:
createProjectile
在类中ProjectileWeaponItem
-
getDurabilityUse
- 覆盖:
getDurabilityUse
在类中ProjectileWeaponItem
-
performShooting
public void performShooting(Level p_40888_, LivingEntity p_40889_, InteractionHand p_40890_, ItemStack p_40891_, float p_40892_, float p_40893_, @Nullable LivingEntity p_331602_) -
getShotPitch
-
getRandomShotPitch
-
onUseTick
-
getUseDuration
- 覆盖:
getUseDuration
在类中Item
-
getChargeDuration
-
getUseAnimation
- 覆盖:
getUseAnimation
在类中Item
-
getChargingSounds
-
getPowerForTime
-
useOnRelease
- 覆盖:
useOnRelease
在类中Item
-
getDefaultProjectileRange
public int getDefaultProjectileRange()
-