类 ArrowItem

java.lang.Object
net.minecraft.world.item.Item
net.minecraft.world.item.ArrowItem
所有已实现的接口:
FeatureElement, ProjectileItem, ItemLike, IItemExtension
直接已知子类:
SpectralArrowItem, TippedArrowItem

public class ArrowItem extends Item implements ProjectileItem
  • 构造器详细资料

  • 方法详细资料

    • createArrow

      public AbstractArrow createArrow(Level p_40513_, ItemStack p_40514_, LivingEntity p_40515_, @Nullable ItemStack p_344832_)
    • asProjectile

      public Projectile asProjectile(Level p_338330_, Position p_338329_, ItemStack p_338197_, Direction p_338469_)
      指定者:
      asProjectile 在接口中 ProjectileItem
    • isInfinite

      public boolean isInfinite(ItemStack ammo, ItemStack bow, LivingEntity livingEntity)
      Called to determine if this arrow will be infinite when fired. If an arrow is infinite, then the arrow will never be consumed (regardless of enchantments).

      Only called on the logical server.

      参数:
      ammo - The ammo stack (containing this item)
      bow - The bow stack
      livingEntity - The entity who is firing the bow
      返回:
      True if the arrow is infinite