Interface ProjectileSource
- 
- All Known Subinterfaces:
- Aerial,- Ageable,- Agent,- Ambient,- Animal,- Aquatic,- AreaEffectCloud,- ArmorStand,- Arrow,- ArrowEntity,- Bat,- Bee,- Blaze,- BlockOccupiedMinecart,- BlockProjectileSource,- Boat,- Boss,- CarrierMinecart<M>,- Cat,- CaveSpider,- ChestMinecart,- Chicken,- ClientPlayer,- Cod,- CommandBlockMinecart,- ComplexLiving<T>,- ComplexLivingPart<P>,- Cow,- Creature,- Creeper,- DamagingProjectile,- Dispenser,- Dolphin,- Donkey,- DragonFireball,- Drowned,- Egg,- ElderGuardian,- EndCrystal,- EnderDragon,- EnderDragonPart,- Enderman,- Endermite,- EnderPearl,- Entity,- EntityProjectileSource,- EntityTargetingProjectile,- Evoker,- EvokerFangs,- ExperienceBottle,- ExperienceOrb,- Explosive,- ExplosiveFireball,- EyeOfEnder,- FallingBlock,- FireballEntity,- FireworkRocket,- Fish,- FishingBobber,- Fox,- FurnaceMinecart,- FusedExplosive,- Ghast,- Giant,- Golem,- Guardian,- Hanging,- Hoglin,- HopperMinecart,- Horse,- HorseLike,- Hostile,- Human,- Humanoid,- Husk,- Illager,- Illusioner,- IronGolem,- Item,- ItemFrame,- LeashKnot,- LightningBolt,- Living,- Llama,- LlamaLike,- LlamaSpit,- LocalPlayer,- MagmaCube,- Minecart,- MinecartLike,- Monster,- Mooshroom,- Mule,- Ocelot,- PackHorse,- Painting,- Panda,- Parrot,- Patroller,- Phantom,- Pig,- Piglin,- PiglinBrute,- PiglinLike,- Pillager,- Player,- PolarBear,- Potion,- PrimedTNT,- Projectile,- Pufferfish,- Rabbit,- Raider,- Ranger,- Ravager,- RemotePlayer,- Salmon,- SchoolingFish,- ServerPlayer,- Sheep,- Shulker,- ShulkerBullet,- Silverfish,- Sittable,- Skeleton,- SkeletonHorse,- SkeletonLike,- Slime,- SmallFireball,- Snowball,- SnowGolem,- SpawnerMinecart,- SpectralArrow,- Spellcaster,- Spider,- Squid,- Stray,- Strider,- TameableAnimal,- TameableHorse,- TNTMinecart,- Trader,- TraderLlama,- Trident,- TropicalFish,- Turtle,- Vehicle,- Vex,- Villager,- Vindicator,- WanderingTrader,- WeatherEffect,- Witch,- Wither,- WitherSkeleton,- WitherSkull,- Wolf,- Zoglin,- Zombie,- ZombieHorse,- ZombieLike,- ZombieVillager,- ZombifiedPiglin
 
 public interface ProjectileSourceRepresents a valid source of a projectile.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default <T extends Projectile>
 Optional<T>launchProjectile(Supplier<EntityType<T>> projectileType)Launches aProjectilefrom this projectile source.default <T extends Projectile>
 Optional<T>launchProjectile(Supplier<EntityType<T>> projectileType, Vector3d velocity)Launches aProjectilefrom this projectile source.<T extends Projectile>
 Optional<T>launchProjectile(EntityType<T> projectileType)Launches aProjectilefrom this projectile source.<T extends Projectile>
 Optional<T>launchProjectile(EntityType<T> projectileType, Vector3d velocity)Launches aProjectilefrom this projectile source.default <T extends Projectile>
 Optional<T>launchProjectileTo(Supplier<EntityType<T>> projectileType, Entity target)Launches a newProjectilefrom this projectile source.<T extends Projectile>
 Optional<T>launchProjectileTo(EntityType<T> projectileType, Entity target)Launches a newProjectilefrom this projectile source.
 
- 
- 
- 
Method Detail- 
launchProjectile<T extends Projectile> Optional<T> launchProjectile(EntityType<T> projectileType) Launches aProjectilefrom this projectile source.- Type Parameters:
- T- The Type of Projectile
- Parameters:
- projectileType- The type of the projectile
- Returns:
- The projectile instance if it was launched, or absent
 
 - 
launchProjectiledefault <T extends Projectile> Optional<T> launchProjectile(Supplier<EntityType<T>> projectileType) Launches aProjectilefrom this projectile source.- Type Parameters:
- T- The Type of Projectile
- Parameters:
- projectileType- The type of the projectile
- Returns:
- The projectile instance if it was launched, or absent
 
 - 
launchProjectile<T extends Projectile> Optional<T> launchProjectile(EntityType<T> projectileType, Vector3d velocity) Launches aProjectilefrom this projectile source.- Type Parameters:
- T- The Type of Projectile
- Parameters:
- projectileType- The type of the projectile
- velocity- The velocity to launch the projectile
- Returns:
- The projectile instance if it was launched, or absent
 
 - 
launchProjectiledefault <T extends Projectile> Optional<T> launchProjectile(Supplier<EntityType<T>> projectileType, Vector3d velocity) Launches aProjectilefrom this projectile source.- Type Parameters:
- T- The Type of Projectile
- Parameters:
- projectileType- The type of the projectile
- velocity- The velocity to launch the projectile
- Returns:
- The projectile instance if it was launched, or absent
 
 - 
launchProjectileTo<T extends Projectile> Optional<T> launchProjectileTo(EntityType<T> projectileType, Entity target) Launches a newProjectilefrom this projectile source.- Type Parameters:
- T- The Type of Projectile
- Parameters:
- projectileType- The type of the projectile
- target- the target to launch the projectile at
- Returns:
- the projectile if successfully launched, Optional.empty()otherwise
 
 - 
launchProjectileTodefault <T extends Projectile> Optional<T> launchProjectileTo(Supplier<EntityType<T>> projectileType, Entity target) Launches a newProjectilefrom this projectile source.- Type Parameters:
- T- The Type of Projectile
- Parameters:
- projectileType- The type of the projectile
- target- the target to launch the projectile at
- Returns:
- the projectile if successfully launched, Optional.empty()otherwise
 
 
- 
 
-