Interface ProjectileSource

All Known Subinterfaces:
Ageable, Ambient, Animals, ArmorStand, Bat, Blaze, BlockProjectileSource, CaveSpider, Chicken, ComplexLivingEntity, Cow, Creature, Creeper, EnderDragon, Enderman, Endermite, Flying, Ghast, Giant, Golem, Guardian, Horse, HumanEntity, IronGolem, LivingEntity, MagmaCube, Monster, MushroomCow, NPC, Ocelot, Pig, PigZombie, Player, Rabbit, Sheep, Silverfish, Skeleton, Slime, Snowman, Spider, Squid, Villager, WaterMob, Witch, Wither, Wolf, Zombie

public interface ProjectileSource
Represents a valid source of a projectile.
  • Method Summary

    Modifier and Type Method Description
    <T extends Projectile>
    T
    launchProjectile​(java.lang.Class<? extends T> projectile)
    Launches a Projectile from the ProjectileSource.
    <T extends Projectile>
    T
    launchProjectile​(java.lang.Class<? extends T> projectile, Vector velocity)
    Launches a Projectile from the ProjectileSource with an initial velocity.
  • Method Details

    • launchProjectile

      <T extends Projectile> T launchProjectile​(java.lang.Class<? extends T> projectile)
      Launches a Projectile from the ProjectileSource.
      Type Parameters:
      T - a projectile subclass
      Parameters:
      projectile - class of the projectile to launch
      Returns:
      the launched projectile
    • launchProjectile

      <T extends Projectile> T launchProjectile​(java.lang.Class<? extends T> projectile, Vector velocity)
      Launches a Projectile from the ProjectileSource with an initial velocity.
      Type Parameters:
      T - a projectile subclass
      Parameters:
      projectile - class of the projectile to launch
      velocity - the velocity with which to launch
      Returns:
      the launched projectile