Package net.minecraft.item
Class CrossbowItem
java.lang.Object
net.minecraftforge.registries.ForgeRegistryEntry<Item>
net.minecraft.item.Item
net.minecraft.item.ShootableItem
net.minecraft.item.CrossbowItem
- All Implemented Interfaces:
IVanishable
,IItemProvider
,IForgeItem
,IForgeRegistryEntry<Item>
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Properties
Nested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>>
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private boolean
Fields inherited from class net.minecraft.item.ShootableItem
ARROW_ONLY, ARROW_OR_FIREWORK
Fields inherited from class net.minecraft.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, random
Fields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
addChargedProjectile
(ItemStack p_220029_0_, ItemStack p_220029_1_) void
appendHoverText
(ItemStack p_77624_1_, World p_77624_2_, List<ITextComponent> p_77624_3_, ITooltipFlag p_77624_4_) private static void
clearChargedProjectiles
(ItemStack p_220027_0_) static boolean
containsChargedProjectile
(ItemStack p_220019_0_, Item p_220019_1_) private static AbstractArrowEntity
getArrow
(World p_220024_0_, LivingEntity p_220024_1_, ItemStack p_220024_2_, ItemStack p_220024_3_) getChargedProjectiles
(ItemStack p_220018_0_) static int
getChargeDuration
(ItemStack p_220026_0_) int
private static float
getPowerForTime
(int p_220031_0_, ItemStack p_220031_1_) private static float
getRandomShotPitch
(boolean p_220032_0_) private static float
getShootingPower
(ItemStack p_220013_0_) private static float[]
getShotPitches
(Random p_220028_0_) private SoundEvent
getStartSound
(int p_220025_1_) getUseAnimation
(ItemStack p_77661_1_) int
getUseDuration
(ItemStack p_77626_1_) static boolean
private static boolean
loadProjectile
(LivingEntity p_220023_0_, ItemStack p_220023_1_, ItemStack p_220023_2_, boolean p_220023_3_, boolean p_220023_4_) private static void
onCrossbowShot
(World p_220015_0_, LivingEntity p_220015_1_, ItemStack p_220015_2_) void
onUseTick
(World p_219972_1_, LivingEntity p_219972_2_, ItemStack p_219972_3_, int p_219972_4_) static void
performShooting
(World p_220014_0_, LivingEntity p_220014_1_, Hand p_220014_2_, ItemStack p_220014_3_, float p_220014_4_, float p_220014_5_) void
releaseUsing
(ItemStack p_77615_1_, World p_77615_2_, LivingEntity p_77615_3_, int p_77615_4_) static void
setCharged
(ItemStack p_220011_0_, boolean p_220011_1_) private static void
shootProjectile
(World p_220016_0_, LivingEntity p_220016_1_, Hand p_220016_2_, ItemStack p_220016_3_, ItemStack p_220016_4_, float p_220016_5_, boolean p_220016_6_, float p_220016_7_, float p_220016_8_, float p_220016_9_) private static boolean
tryLoadProjectiles
(LivingEntity p_220021_0_, ItemStack p_220021_1_) use
(World p_77659_1_, PlayerEntity p_77659_2_, Hand p_77659_3_) Methods inherited from class net.minecraft.item.ShootableItem
getEnchantmentValue, getHeldProjectile
Methods inherited from class net.minecraft.item.Item
allowdedIn, asItem, byBlock, byId, canAttackBlock, canBeDepleted, canBeHurtBy, fillItemCategory, finishUsingItem, getCraftingRemainingItem, getDefaultAttributeModifiers, getDefaultInstance, getDescription, getDescriptionId, getDescriptionId, getDestroySpeed, getDrinkingSound, getEatingSound, getFoodProperties, getHarvestLevel, getId, getItemCategory, getItemStackTileEntityRenderer, getMaxDamage, getMaxStackSize, getName, getOrCreateDescriptionId, getPlayerPOVHitResult, getRarity, getTags, getToolTypes, hasCraftingRemainingItem, hurtEnemy, interactLivingEntity, inventoryTick, is, isComplex, isCorrectToolForDrops, isEdible, isEnchantable, isFireResistant, isFoil, isRepairable, isValidRepairItem, mineBlock, onCraftedBy, shouldOverrideMultiplayerNbt, toString, useOn, useOnRelease, verifyTagAfterLoad
Methods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryName
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraftforge.common.extensions.IForgeItem
canApplyAtEnchantingTable, canContinueUsing, canDisableShield, canElytraFly, canEquip, canHarvestBlock, createEntity, damageItem, doesSneakBypassUse, elytraFlightTick, getArmorModel, getArmorTexture, getAttributeModifiers, getBurnTime, getBurnTime, getContainerItem, getCreativeTabs, getCreatorModId, getDamage, getDurabilityForDisplay, getEntityLifespan, getEquipmentSlot, getFontRenderer, getHighlightTip, getItem, getItemEnchantability, getItemStackLimit, getMaxDamage, getRGBDurabilityForDisplay, getShareTag, getSmeltingExperience, getXpRepairRatio, hasContainerItem, hasCustomEntity, initCapabilities, isBookEnchantable, isDamageable, isDamaged, isEnderMask, isPiglinCurrency, isShield, makesPiglinsNeutral, onArmorTick, onBlockStartBreak, onDroppedByPlayer, onEntityItemUpdate, onEntitySwing, onHorseArmorTick, onItemUseFirst, onLeftClickEntity, onUsingTick, readShareTag, renderHelmetOverlay, setDamage, shouldCauseBlockBreakReset, shouldCauseReequipAnimation, showDurabilityBar
-
Field Details
-
startSoundPlayed
private boolean startSoundPlayed -
midLoadSoundPlayed
private boolean midLoadSoundPlayed
-
-
Constructor Details
-
CrossbowItem
-
-
Method Details
-
getSupportedHeldProjectiles
- Overrides:
getSupportedHeldProjectiles
in classShootableItem
-
getAllSupportedProjectiles
- Specified by:
getAllSupportedProjectiles
in classShootableItem
-
use
-
releaseUsing
public void releaseUsing(ItemStack p_77615_1_, World p_77615_2_, LivingEntity p_77615_3_, int p_77615_4_) - Overrides:
releaseUsing
in classItem
-
tryLoadProjectiles
-
loadProjectile
private static boolean loadProjectile(LivingEntity p_220023_0_, ItemStack p_220023_1_, ItemStack p_220023_2_, boolean p_220023_3_, boolean p_220023_4_) -
isCharged
-
setCharged
-
addChargedProjectile
-
getChargedProjectiles
-
clearChargedProjectiles
-
containsChargedProjectile
-
shootProjectile
private static void shootProjectile(World p_220016_0_, LivingEntity p_220016_1_, Hand p_220016_2_, ItemStack p_220016_3_, ItemStack p_220016_4_, float p_220016_5_, boolean p_220016_6_, float p_220016_7_, float p_220016_8_, float p_220016_9_) -
getArrow
private static AbstractArrowEntity getArrow(World p_220024_0_, LivingEntity p_220024_1_, ItemStack p_220024_2_, ItemStack p_220024_3_) -
performShooting
public static void performShooting(World p_220014_0_, LivingEntity p_220014_1_, Hand p_220014_2_, ItemStack p_220014_3_, float p_220014_4_, float p_220014_5_) -
getShotPitches
-
getRandomShotPitch
private static float getRandomShotPitch(boolean p_220032_0_) -
onCrossbowShot
private static void onCrossbowShot(World p_220015_0_, LivingEntity p_220015_1_, ItemStack p_220015_2_) -
onUseTick
public void onUseTick(World p_219972_1_, LivingEntity p_219972_2_, ItemStack p_219972_3_, int p_219972_4_) -
getUseDuration
- Overrides:
getUseDuration
in classItem
-
getChargeDuration
-
getUseAnimation
- Overrides:
getUseAnimation
in classItem
-
getStartSound
-
getPowerForTime
-
appendHoverText
public void appendHoverText(ItemStack p_77624_1_, @Nullable World p_77624_2_, List<ITextComponent> p_77624_3_, ITooltipFlag p_77624_4_) - Overrides:
appendHoverText
in classItem
-
getShootingPower
-
getDefaultProjectileRange
public int getDefaultProjectileRange()- Specified by:
getDefaultProjectileRange
in classShootableItem
-