类 CrossbowItem
java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ProjectileWeaponItem
net.minecraft.world.item.CrossbowItem
- 所有已实现的接口:
FeatureElement
,Vanishable
,ItemLike
,IForgeItem
-
嵌套类概要
从类继承的嵌套类/接口 net.minecraft.world.item.Item
Item.Properties
-
字段概要
字段修饰符和类型字段说明private static final float
static final int
private static final float
private static final int
private static final float
private boolean
private static final float
private boolean
private static final String
private static final String
从类继承的字段 net.minecraft.world.item.ProjectileWeaponItem
ARROW_ONLY, ARROW_OR_FIREWORK
从类继承的字段 net.minecraft.world.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, EAT_DURATION, MAX_BAR_WIDTH, MAX_STACK_SIZE
从接口继承的字段 net.minecraft.world.flag.FeatureElement
FILTERED_REGISTRIES
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private static void
addChargedProjectile
(ItemStack pCrossbowStack, ItemStack pAmmoStack) void
appendHoverText
(ItemStack pStack, Level pLevel, List<Component> pTooltip, TooltipFlag pFlag) private static void
clearChargedProjectiles
(ItemStack pCrossbowStack) static boolean
containsChargedProjectile
(ItemStack pCrossbowStack, Item pAmmoItem) private static AbstractArrow
getArrow
(Level pLevel, LivingEntity pLivingEntity, ItemStack pCrossbowStack, ItemStack pAmmoStack) getChargedProjectiles
(ItemStack pCrossbowStack) static int
getChargeDuration
(ItemStack pCrossbowStack) int
private static float
getPowerForTime
(int pUseTime, ItemStack pCrossbowStack) private static float
getRandomShotPitch
(boolean pIsHighPitched, RandomSource pRandom) private static float
getShootingPower
(ItemStack pCrossbowStack) private static float[]
getShotPitches
(RandomSource pRandom) private SoundEvent
getStartSound
(int pEnchantmentLevel) getUseAnimation
(ItemStack pStack) int
getUseDuration
(ItemStack pStack) static boolean
private static boolean
loadProjectile
(LivingEntity pShooter, ItemStack pCrossbowStack, ItemStack pAmmoStack, boolean pHasAmmo, boolean pIsCreative) private static void
onCrossbowShot
(Level pLevel, LivingEntity pShooter, ItemStack pCrossbowStack) void
onUseTick
(Level pLevel, LivingEntity pLivingEntity, ItemStack pStack, int pCount) static void
performShooting
(Level pLevel, LivingEntity pShooter, InteractionHand pUsedHand, ItemStack pCrossbowStack, float pVelocity, float pInaccuracy) void
releaseUsing
(ItemStack pStack, Level pLevel, LivingEntity pEntityLiving, int pTimeLeft) static void
setCharged
(ItemStack pCrossbowStack, boolean pIsCharged) private static void
shootProjectile
(Level pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pCrossbowStack, ItemStack pAmmoStack, float pSoundPitch, boolean pIsCreativeMode, float pVelocity, float pInaccuracy, float pProjectileAngle) private static boolean
tryLoadProjectiles
(LivingEntity pShooter, ItemStack pCrossbowStack) use
(Level pLevel, Player pPlayer, InteractionHand pHand) boolean
useOnRelease
(ItemStack pStack) 从类继承的方法 net.minecraft.world.item.ProjectileWeaponItem
getEnchantmentValue, getHeldProjectile
从类继承的方法 net.minecraft.world.item.Item
asItem, builtInRegistryHolder, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, canFitInsideContainerItems, finishUsingItem, getBarColor, getBarWidth, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getId, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getRenderPropertiesInternal, getTooltipImage, hasCraftingRemainingItem, hurtEnemy, initializeClient, interactLivingEntity, inventoryTick, isBarVisible, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, onDestroyed, overrideOtherStackedOnMe, overrideStackedOnOther, requiredFeatures, shouldOverrideMultiplayerNbt, toString, useOn, verifyTagAfterLoad
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
从接口继承的方法 net.minecraft.world.flag.FeatureElement
isEnabled
从接口继承的方法 net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canGrindstoneRepair, canPerformAction, canWalkOnPowderedSnow, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getAllEnchantments, getArmorTexture, getAttributeModifiers, getBurnTime, getCraftingRemainingItem, getCreatorModId, getDamage, getDefaultTooltipHideFlags, getEnchantmentLevel, getEnchantmentValue, getEntityLifespan, getEquipmentSlot, getFoodProperties, getHighlightTip, getMaxDamage, getMaxStackSize, getShareTag, getSweepHitBox, getXpRepairRatio, hasCraftingRemainingItem, hasCustomEntity, initCapabilities, isBookEnchantable, isCorrectToolForDrops, isDamageable, isDamaged, isEnderMask, isNotReplaceableByPickAction, isPiglinCurrency, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDestroyed, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onStopUsing, readShareTag, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation
-
字段详细资料
-
TAG_CHARGED
- 另请参阅:
-
TAG_CHARGED_PROJECTILES
- 另请参阅:
-
MAX_CHARGE_DURATION
private static final int 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- 另请参阅:
-
-
构造器详细资料
-
CrossbowItem
-
-
方法详细资料
-
getSupportedHeldProjectiles
-
getAllSupportedProjectiles
-
use
-
getShootingPower
-
releaseUsing
- 覆盖:
releaseUsing
在类中Item
-
tryLoadProjectiles
-
loadProjectile
private static boolean loadProjectile(LivingEntity pShooter, ItemStack pCrossbowStack, ItemStack pAmmoStack, boolean pHasAmmo, boolean pIsCreative) -
isCharged
-
setCharged
-
addChargedProjectile
-
getChargedProjectiles
-
clearChargedProjectiles
-
containsChargedProjectile
-
shootProjectile
private static void shootProjectile(Level pLevel, LivingEntity pShooter, InteractionHand pHand, ItemStack pCrossbowStack, ItemStack pAmmoStack, float pSoundPitch, boolean pIsCreativeMode, float pVelocity, float pInaccuracy, float pProjectileAngle) -
getArrow
private static AbstractArrow getArrow(Level pLevel, LivingEntity pLivingEntity, ItemStack pCrossbowStack, ItemStack pAmmoStack) -
performShooting
public static void performShooting(Level pLevel, LivingEntity pShooter, InteractionHand pUsedHand, ItemStack pCrossbowStack, float pVelocity, float pInaccuracy) -
getShotPitches
-
getRandomShotPitch
-
onCrossbowShot
-
onUseTick
-
getUseDuration
- 覆盖:
getUseDuration
在类中Item
-
getChargeDuration
-
getUseAnimation
- 覆盖:
getUseAnimation
在类中Item
-
getStartSound
-
getPowerForTime
-
appendHoverText
public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltip, TooltipFlag pFlag) - 覆盖:
appendHoverText
在类中Item
-
useOnRelease
- 覆盖:
useOnRelease
在类中Item
-
getDefaultProjectileRange
public int getDefaultProjectileRange()
-