Package net.minecraft.item
Class RangedWeaponItem
java.lang.Object
net.minecraft.item.Item
net.minecraft.item.RangedWeaponItem
- All Implemented Interfaces:
ItemConvertible
- Direct Known Subclasses:
BowItem,CrossbowItem
public abstract class RangedWeaponItem extends Item
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.item.Item
Item.Settings -
Field Summary
Fields Modifier and Type Field Description static Predicate<ItemStack>BOW_PROJECTILESstatic Predicate<ItemStack>CROSSBOW_HELD_PROJECTILESFields inherited from class net.minecraft.item.Item
ATTACK_DAMAGE_MODIFIER_ID, ATTACK_SPEED_MODIFIER_ID, BLOCK_ITEMS, group -
Constructor Summary
Constructors Constructor Description RangedWeaponItem(Item.Settings settings) -
Method Summary
Modifier and Type Method Description intgetEnchantability()Gets the enchantability of an item.static ItemStackgetHeldProjectile(LivingEntity entity, Predicate<ItemStack> predicate)Predicate<ItemStack>getHeldProjectiles()abstract Predicate<ItemStack>getProjectiles()abstract intgetRange()Methods inherited from class net.minecraft.item.Item
appendStacks, appendTooltip, asItem, byRawId, canMine, canRepair, damage, finishUsing, fromBlock, getAttributeModifiers, getDefaultStack, getDrinkSound, getEatSound, getEquipSound, getFoodComponent, getGroup, getItemBarColor, getItemBarStep, getMaxCount, getMaxDamage, getMaxUseTime, getMiningSpeedMultiplier, getName, getName, getOrCreateTranslationKey, getRarity, getRawId, getRecipeRemainder, getTooltipData, getTranslationKey, getTranslationKey, getUseAction, hasGlint, hasRecipeRemainder, hasStoredInventory, inventoryTick, isDamageable, isEnchantable, isFireproof, isFood, isIn, isItemBarVisible, isNetworkSynced, isSuitableFor, isUsedOnRelease, method_33261, onClicked, onCraft, onStackClicked, onStoppedUsing, postHit, postMine, postProcessTag, raycast, shouldSyncTagToClient, toString, usageTick, use, useOnBlock, useOnEntity
-
Field Details
-
BOW_PROJECTILES
-
CROSSBOW_HELD_PROJECTILES
-
-
Constructor Details
-
RangedWeaponItem
-
-
Method Details
-
getHeldProjectiles
-
getProjectiles
-
getHeldProjectile
-
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
-
getRange
public abstract int getRange()
-