mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-27 23:10:16 +01:00
Add playPickupItemAnimation to LivingEntity
This commit is contained in:
parent
cbfa49ddb6
commit
52ec2a9db1
1 changed files with 25 additions and 0 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue