Add playPickupItemAnimation to LivingEntity

This commit is contained in:
William Blake Galbreath 2020-08-23 19:36:08 +02:00
parent cbfa49ddb6
commit 52ec2a9db1

View file

@ -1181,4 +1181,29 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
*/
void setJumping(boolean jumping);
// Paper end - entity jump API
// Paper start - pickup animation API
/**
* Plays pickup item animation towards this entity.
* <p>
* <b>This will remove the item on the client.</b>
* <p>
* Quantity is inferred to be that of the {@link Item}.
*
* @param item item to pickup
*/
default void playPickupItemAnimation(@NotNull Item item) {
playPickupItemAnimation(item, item.getItemStack().getAmount());
}
/**
* Plays pickup item animation towards this entity.
* <p>
* <b>This will remove the item on the client.</b>
*
* @param item item to pickup
* @param quantity quantity of item
*/
void playPickupItemAnimation(@NotNull Item item, int quantity);
// Paper end - pickup animation API
}