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
  • Field Details

  • Constructor Details

    • RangedWeaponItem

      public RangedWeaponItem​(Item.Settings settings)
  • Method Details

    • getHeldProjectiles

      public Predicate<ItemStack> getHeldProjectiles()
    • getProjectiles

      public abstract Predicate<ItemStack> getProjectiles()
    • getHeldProjectile

      public static ItemStack getHeldProjectile​(LivingEntity entity, Predicate<ItemStack> predicate)
    • 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:
      getEnchantability in class Item
    • getRange

      public abstract int getRange()