Package net.minecraft.item
Class RangedWeaponItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.RangedWeaponItem
- All Implemented Interfaces:
ItemConvertible,ToggleableFeature
- Direct Known Subclasses:
BowItem,CrossbowItem
- Mappings:
Namespace Name named net/minecraft/item/RangedWeaponItemintermediary net/minecraft/class_1811official cvn
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings, Item.TooltipContext -
Field Summary
FieldsModifier and TypeFieldDescriptionFields inherited from class net.minecraft.item.Item
BASE_ATTACK_DAMAGE_MODIFIER_ID, BASE_ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, DEFAULT_MAX_COUNT, ITEM_BAR_STEPS, MAX_MAX_COUNTFields inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
FEATURE_ENABLED_REGISTRY_KEYS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ProjectileEntitycreateArrowEntity(World world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) intGets the enchantability of an item.static ItemStackgetHeldProjectile(LivingEntity entity, Predicate<ItemStack> predicate) protected static ItemStackgetProjectile(ItemStack stack, ItemStack projectileStack, LivingEntity shooter, boolean multishot) abstract intgetRange()protected intgetWeaponStackDamage(ItemStack projectile) load(ItemStack stack, ItemStack projectileStack, LivingEntity shooter) protected abstract voidshoot(LivingEntity shooter, ProjectileEntity projectile, int index, float speed, float divergence, float yaw, @Nullable LivingEntity target) protected voidshootAll(ServerWorld world, LivingEntity shooter, Hand hand, ItemStack stack, List<ItemStack> projectiles, float speed, float divergence, boolean critical, @Nullable LivingEntity target) Methods inherited from class net.minecraft.item.Item
appendTooltip, asItem, byRawId, canBeNested, canMine, canRepair, finishUsing, fromBlock, getAttributeModifiers, getBonusAttackDamage, getBreakSound, getComponents, getDefaultStack, getDrinkSound, getEatSound, getItemBarColor, getItemBarStep, getMaxCount, getMaxUseTime, getMiningSpeed, getName, getName, getOrCreateTranslationKey, getRawId, getRecipeRemainder, getRegistryEntry, getRequiredFeatures, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, inventoryTick, isCorrectForDrops, isEnchantable, isItemBarVisible, isNetworkSynced, isUsedOnRelease, onClicked, onCraft, onCraftByPlayer, onItemEntityDestroyed, onStackClicked, onStoppedUsing, postDamageEntity, postHit, postMine, postProcessComponents, raycast, toString, usageTick, use, useOnBlock, useOnEntityMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.minecraft.resource.featuretoggle.ToggleableFeature
isEnabled
-
Field Details
-
BOW_PROJECTILES
- Mappings:
Namespace Name Mixin selector named BOW_PROJECTILESLnet/minecraft/item/RangedWeaponItem;BOW_PROJECTILES:Ljava/util/function/Predicate;intermediary field_18281Lnet/minecraft/class_1811;field_18281:Ljava/util/function/Predicate;official cLcvn;c:Ljava/util/function/Predicate;
-
CROSSBOW_HELD_PROJECTILES
- Mappings:
Namespace Name Mixin selector named CROSSBOW_HELD_PROJECTILESLnet/minecraft/item/RangedWeaponItem;CROSSBOW_HELD_PROJECTILES:Ljava/util/function/Predicate;intermediary field_18282Lnet/minecraft/class_1811;field_18282:Ljava/util/function/Predicate;official jLcvn;j:Ljava/util/function/Predicate;
-
-
Constructor Details
-
RangedWeaponItem
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/item/Item;<init>(Lnet/minecraft/item/Item$Settings;)Vintermediary <init>Lnet/minecraft/class_1792;<init>(Lnet/minecraft/class_1792$class_1793;)Vofficial <init>Lcul;<init>(Lcul$a;)V
-
-
Method Details
-
getHeldProjectiles
- Mappings:
Namespace Name Mixin selector named getHeldProjectilesLnet/minecraft/item/RangedWeaponItem;getHeldProjectiles()Ljava/util/function/Predicate;intermediary method_20310Lnet/minecraft/class_1811;method_20310()Ljava/util/function/Predicate;official dLcvn;d()Ljava/util/function/Predicate;
-
getProjectiles
- Mappings:
Namespace Name Mixin selector named getProjectilesLnet/minecraft/item/RangedWeaponItem;getProjectiles()Ljava/util/function/Predicate;intermediary method_19268Lnet/minecraft/class_1811;method_19268()Ljava/util/function/Predicate;official bLcvn;b()Ljava/util/function/Predicate;
-
getHeldProjectile
- Mappings:
Namespace Name Mixin selector named getHeldProjectileLnet/minecraft/item/RangedWeaponItem;getHeldProjectile(Lnet/minecraft/entity/LivingEntity;Ljava/util/function/Predicate;)Lnet/minecraft/item/ItemStack;intermediary method_18815Lnet/minecraft/class_1811;method_18815(Lnet/minecraft/class_1309;Ljava/util/function/Predicate;)Lnet/minecraft/class_1799;official aLcvn;a(Lbtn;Ljava/util/function/Predicate;)Lcuq;
-
getEnchantability
public int getEnchantability()Gets the enchantability of an item. This specifies the ability of an item to receive enchantments when enchanted using an enchanting table. As the value increases, the amount and level of enchantments applied increase.If the value of this method is 0, the item cannot be enchanted using an enchanting table.
- Overrides:
getEnchantabilityin classItem- Mappings:
Namespace Name Mixin selector named getEnchantabilityLnet/minecraft/item/Item;getEnchantability()Iintermediary method_7837Lnet/minecraft/class_1792;method_7837()Iofficial gLcul;g()I
-
getRange
public abstract int getRange()- Mappings:
Namespace Name Mixin selector named getRangeLnet/minecraft/item/RangedWeaponItem;getRange()Iintermediary method_24792Lnet/minecraft/class_1811;method_24792()Iofficial cLcvn;c()I
-
shootAll
protected void shootAll(ServerWorld world, LivingEntity shooter, Hand hand, ItemStack stack, List<ItemStack> projectiles, float speed, float divergence, boolean critical, @Nullable @Nullable LivingEntity target) - Mappings:
Namespace Name Mixin selector named shootAllLnet/minecraft/item/RangedWeaponItem;shootAll(Lnet/minecraft/server/world/ServerWorld;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/util/Hand;Lnet/minecraft/item/ItemStack;Ljava/util/List;FFZLnet/minecraft/entity/LivingEntity;)Vintermediary method_57393Lnet/minecraft/class_1811;method_57393(Lnet/minecraft/class_3218;Lnet/minecraft/class_1309;Lnet/minecraft/class_1268;Lnet/minecraft/class_1799;Ljava/util/List;FFZLnet/minecraft/class_1309;)Vofficial aLcvn;a(Laqu;Lbtn;Lbqq;Lcuq;Ljava/util/List;FFZLbtn;)V
-
getWeaponStackDamage
- Mappings:
Namespace Name Mixin selector named getWeaponStackDamageLnet/minecraft/item/RangedWeaponItem;getWeaponStackDamage(Lnet/minecraft/item/ItemStack;)Iintermediary method_57345Lnet/minecraft/class_1811;method_57345(Lnet/minecraft/class_1799;)Iofficial jLcvn;j(Lcuq;)I
-
shoot
protected abstract void shoot(LivingEntity shooter, ProjectileEntity projectile, int index, float speed, float divergence, float yaw, @Nullable @Nullable LivingEntity target) - Mappings:
Namespace Name Mixin selector named shootLnet/minecraft/item/RangedWeaponItem;shoot(Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/entity/projectile/ProjectileEntity;IFFFLnet/minecraft/entity/LivingEntity;)Vintermediary method_7763Lnet/minecraft/class_1811;method_7763(Lnet/minecraft/class_1309;Lnet/minecraft/class_1676;IFFFLnet/minecraft/class_1309;)Vofficial aLcvn;a(Lbtn;Lcnp;IFFFLbtn;)V
-
createArrowEntity
protected ProjectileEntity createArrowEntity(World world, LivingEntity shooter, ItemStack weaponStack, ItemStack projectileStack, boolean critical) - Mappings:
Namespace Name Mixin selector named createArrowEntityLnet/minecraft/item/RangedWeaponItem;createArrowEntity(Lnet/minecraft/world/World;Lnet/minecraft/entity/LivingEntity;Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Z)Lnet/minecraft/entity/projectile/ProjectileEntity;intermediary method_57344Lnet/minecraft/class_1811;method_57344(Lnet/minecraft/class_1937;Lnet/minecraft/class_1309;Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Z)Lnet/minecraft/class_1676;official aLcvn;a(Ldcw;Lbtn;Lcuq;Lcuq;Z)Lcnp;
-
load
protected static List<ItemStack> load(ItemStack stack, ItemStack projectileStack, LivingEntity shooter) - Mappings:
Namespace Name Mixin selector named loadLnet/minecraft/item/RangedWeaponItem;load(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;)Ljava/util/List;intermediary method_57390Lnet/minecraft/class_1811;method_57390(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;)Ljava/util/List;official aLcvn;a(Lcuq;Lcuq;Lbtn;)Ljava/util/List;
-
getProjectile
protected static ItemStack getProjectile(ItemStack stack, ItemStack projectileStack, LivingEntity shooter, boolean multishot) - Mappings:
Namespace Name Mixin selector named getProjectileLnet/minecraft/item/RangedWeaponItem;getProjectile(Lnet/minecraft/item/ItemStack;Lnet/minecraft/item/ItemStack;Lnet/minecraft/entity/LivingEntity;Z)Lnet/minecraft/item/ItemStack;intermediary method_57391Lnet/minecraft/class_1811;method_57391(Lnet/minecraft/class_1799;Lnet/minecraft/class_1799;Lnet/minecraft/class_1309;Z)Lnet/minecraft/class_1799;official aLcvn;a(Lcuq;Lcuq;Lbtn;Z)Lcuq;
-