接口 ProjectileSource

所有已知子接口:
AbstractHorse, AbstractSkeleton, AbstractVillager, Ageable, Allay, Ambient, Animals, ArmorStand, Axolotl, Bat, Bee, Blaze, BlockProjectileSource, Breedable, Camel, Cat, CaveSpider, ChestedHorse, Chicken, Cod, ComplexLivingEntity, Cow, Creature, Creeper, Dolphin, Donkey, Drowned, ElderGuardian, EnderDragon, Enderman, Endermite, Enemy, Evoker, Fish, Flying, Fox, Frog, Ghast, Giant, GlowSquid, Goat, Golem, Guardian, Hoglin, Horse, HumanEntity, Husk, Illager, Illusioner, IronGolem, LivingEntity, Llama, MagmaCube, Mob, Monster, Mule, MushroomCow, NPC, Ocelot, Panda, Parrot, Phantom, Pig, Piglin, PiglinAbstract, PiglinBrute, PigZombie, Pillager, Player, PolarBear, PufferFish, Rabbit, Raider, Ravager, Salmon, Sheep, Shulker, Silverfish, Skeleton, SkeletonHorse, Slime, Sniffer, Snowman, Spellcaster, Spider, Squid, Steerable, Stray, Strider, Tadpole, Tameable, TraderLlama, TropicalFish, Turtle, Vex, Villager, Vindicator, WanderingTrader, Warden, WaterMob, Witch, Wither, WitherSkeleton, Wolf, Zoglin, Zombie, ZombieHorse, ZombieVillager

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

    • launchProjectile

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

      原文:Launches a Projectile from the ProjectileSource.

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

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

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

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