接口 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
代表一个有效的抛射物发射源。
-
方法概要
修饰符和类型方法说明<T extends Projectile>
TlaunchProjectile(Class<? extends T> projectile) 让ProjectileSource发射一个Projectile。<T extends Projectile>
TlaunchProjectile(Class<? extends T> projectile, Vector velocity) 让ProjectileSource以一个初始速度向量发射Projectile。
-
方法详细资料
-
launchProjectile
让ProjectileSource发射一个Projectile。原文:Launches a
Projectilefrom the ProjectileSource.- 参数:
projectile- 要让ProjectileSource发射的抛射物类型- 返回:
- 发射的抛射物实例对象
-
launchProjectile
让ProjectileSource以一个初始速度向量发射Projectile。原文:Launches a
Projectilefrom the ProjectileSource with an initial velocity.- 参数:
projectile- 要让ProjectileSource发射的抛射物类型velocity- 抛射物的速度向量- 返回:
- 发射的抛射物实例对象
-