mirror of
https://github.com/PaperMC/Paper.git
synced 2026-11-26 19:09:44 -05: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:
1 parent
6e054ddf7f
commit
7046df03bc
2 files changed
+20
No files matched your search
@@ -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