mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-17 05:03:55 -07:00
[Bleeding] Added launchProjectile.
Use launchProjectile in place of individual throwSnowball, throwEgg, and shootArrow methods By: aPunch <alexpuncochar@yahoo.com>
This commit is contained in:
@@ -90,24 +90,39 @@ public interface LivingEntity extends Entity {
|
||||
/**
|
||||
* Throws an egg from the entity.
|
||||
*
|
||||
* @deprecated Use launchProjectile(Egg.class) instead
|
||||
* @return The egg thrown.
|
||||
*/
|
||||
@Deprecated
|
||||
public Egg throwEgg();
|
||||
|
||||
/**
|
||||
* Throws a snowball from the entity.
|
||||
*
|
||||
* @deprecated Use launchProjectile(Snowball.class) instead
|
||||
* @return The snowball thrown.
|
||||
*/
|
||||
@Deprecated
|
||||
public Snowball throwSnowball();
|
||||
|
||||
/**
|
||||
* Shoots an arrow from the entity.
|
||||
*
|
||||
* @deprecated Use launchProjectile(Arrow.class) instead
|
||||
* @return The arrow shot.
|
||||
*/
|
||||
@Deprecated
|
||||
public Arrow shootArrow();
|
||||
|
||||
/**
|
||||
* Launches a {@link Projectile} from the entity.
|
||||
*
|
||||
* @param projectile Class of the projectile to launch
|
||||
*
|
||||
* @return The launched projectile.
|
||||
*/
|
||||
public <T extends Projectile> T launchProjectile(Class<? extends T> projectile);
|
||||
|
||||
/**
|
||||
* Returns whether this entity is inside a vehicle.
|
||||
*
|
||||
|
Reference in New Issue
Block a user