接口 ProjectileSource

所有已知子接口:
AbstractHorse, Ageable, Ambient, Animals, ArmorStand, Bat, Blaze, BlockProjectileSource, CaveSpider, ChestedHorse, Chicken, ComplexLivingEntity, Cow, Creature, Creeper, Donkey, ElderGuardian, EnderDragon, Enderman, Endermite, Evoker, Flying, Ghast, Giant, Golem, Guardian, Horse, HumanEntity, Husk, Illager, Illusioner, IronGolem, LivingEntity, Llama, MagmaCube, Monster, Mule, MushroomCow, NPC, Ocelot, Parrot, Pig, PigZombie, Player, PolarBear, Rabbit, Sheep, Shulker, Silverfish, Skeleton, SkeletonHorse, Slime, Snowman, Spellcaster, Spider, Squid, Stray, Vex, Villager, Vindicator, WaterMob, Witch, Wither, WitherSkeleton, Wolf, Zombie, ZombieHorse, ZombieVillager

public interface ProjectileSource
代表一个有效的抛射物发射源。
  • 方法详细资料

    • launchProjectile

      <T extends Projectile> T launchProjectile(Class<? extends T> projectile)
      让ProjectileSource发射一个Projectile

      原文:Launches a Projectile from the ProjectileSource.

      参数:
      projectile - 要让ProjectileSource发射的抛射物类型
      返回:
      发射的抛射物实例对象
    • launchProjectile

      <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity)
      让ProjectileSource以一个初始速度向量发射Projectile

      原文:Launches a Projectile from the ProjectileSource with an initial velocity.

      参数:
      projectile - 要让ProjectileSource发射的抛射物类型
      velocity - 抛射物的速度向量
      返回:
      发射的抛射物实例对象