接口 Projectile

所有超级接口:
CommandSender, Entity, Metadatable, Nameable, Permissible, PersistentDataHolder, ServerOperator
所有已知子接口:
AbstractArrow, AbstractWindCharge, Arrow, BreezeWindCharge, DragonFireball, Egg, EnderPearl, Fireball, Firework, FishHook, LargeFireball, LingeringPotion, LlamaSpit, ShulkerBullet, SizedFireball, SmallFireball, Snowball, SpectralArrow, SplashPotion, ThrowableProjectile, ThrownExpBottle, ThrownPotion, TippedArrow, Trident, WindCharge, WitherSkull

public interface Projectile extends Entity
表示可被射击实体的概念

原文: Represents a shootable entity.

  • 方法详细资料

    • getShooter

      获取该抛射物的发射者.

      原文:Retrieve the shooter of this projectile.

      返回:
      发射该抛射物的 ProjectileSource
    • setShooter

      void setShooter(@Nullable @Nullable ProjectileSource source)
      设置该抛射物的发射者.

      原文:Set the shooter of this projectile.

      参数:
      source - 发射该抛射物的 ProjectileSource
    • doesBounce

      @Deprecated boolean doesBounce()
      已过时。
      不起任何作用
      判断该抛射物在击中物体时是否应该弹跳.

      如果一个小型火球不弹跳,则会使目标着火.

      原文:Determine if this projectile should bounce or not when it hits.

      If a small fireball does not bounce it will set the target on fire.

      返回:
      如果应该弹跳,则返回true。
    • setBounce

      @Deprecated void setBounce(boolean doesBounce)
      已过时。
      不起任何作用
      设置该抛射物在击中物体时是否应该弹跳.

      原文:Set whether or not this projectile should bounce or not when it hits something.

      参数:
      doesBounce - 是否应该弹跳