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.PropertiesNested classes/interfaces inherited from class net.minecraftforge.registries.ForgeRegistryEntry
ForgeRegistryEntry.UncheckedRegistryEntry<V extends IForgeRegistryEntry<V>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanFields inherited from class net.minecraft.item.ShootableItem
ARROW_ONLY, ARROW_OR_FIREWORKFields inherited from class net.minecraft.item.Item
BASE_ATTACK_DAMAGE_UUID, BASE_ATTACK_SPEED_UUID, BY_BLOCK, canRepair, category, randomFields inherited from class net.minecraftforge.registries.ForgeRegistryEntry
delegate -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddChargedProjectile(ItemStack p_220029_0_, ItemStack p_220029_1_) voidappendHoverText(ItemStack p_77624_1_, World p_77624_2_, List<ITextComponent> p_77624_3_, ITooltipFlag p_77624_4_) private static voidclearChargedProjectiles(ItemStack p_220027_0_) static booleancontainsChargedProjectile(ItemStack p_220019_0_, Item p_220019_1_) private static AbstractArrowEntitygetArrow(World p_220024_0_, LivingEntity p_220024_1_, ItemStack p_220024_2_, ItemStack p_220024_3_) getChargedProjectiles(ItemStack p_220018_0_) static intgetChargeDuration(ItemStack p_220026_0_) intprivate static floatgetPowerForTime(int p_220031_0_, ItemStack p_220031_1_) private static floatgetRandomShotPitch(boolean p_220032_0_) private static floatgetShootingPower(ItemStack p_220013_0_) private static float[]getShotPitches(Random p_220028_0_) private SoundEventgetStartSound(int p_220025_1_) getUseAnimation(ItemStack p_77661_1_) intgetUseDuration(ItemStack p_77626_1_) static booleanprivate static booleanloadProjectile(LivingEntity p_220023_0_, ItemStack p_220023_1_, ItemStack p_220023_2_, boolean p_220023_3_, boolean p_220023_4_) private static voidonCrossbowShot(World p_220015_0_, LivingEntity p_220015_1_, ItemStack p_220015_2_) voidonUseTick(World p_219972_1_, LivingEntity p_219972_2_, ItemStack p_219972_3_, int p_219972_4_) static voidperformShooting(World p_220014_0_, LivingEntity p_220014_1_, Hand p_220014_2_, ItemStack p_220014_3_, float p_220014_4_, float p_220014_5_) voidreleaseUsing(ItemStack p_77615_1_, World p_77615_2_, LivingEntity p_77615_3_, int p_77615_4_) static voidsetCharged(ItemStack p_220011_0_, boolean p_220011_1_) private static voidshootProjectile(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 booleantryLoadProjectiles(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, getHeldProjectileMethods 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, verifyTagAfterLoadMethods inherited from class net.minecraftforge.registries.ForgeRegistryEntry
getRegistryName, getRegistryType, setRegistryName, setRegistryName, setRegistryNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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:
getSupportedHeldProjectilesin classShootableItem
-
getAllSupportedProjectiles
- Specified by:
getAllSupportedProjectilesin classShootableItem
-
use
-
releaseUsing
public void releaseUsing(ItemStack p_77615_1_, World p_77615_2_, LivingEntity p_77615_3_, int p_77615_4_) - Overrides:
releaseUsingin 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:
getUseDurationin classItem
-
getChargeDuration
-
getUseAnimation
- Overrides:
getUseAnimationin 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:
appendHoverTextin classItem
-
getShootingPower
-
getDefaultProjectileRange
public int getDefaultProjectileRange()- Specified by:
getDefaultProjectileRangein classShootableItem
-