aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2021-12-31 19:05:42 -0800
committerGitHub <[email protected]>2021-12-31 19:05:42 -0800
commit3a43821c382ed99b3e64892381c263a23e9cc56a (patch)
treee888155bfa82cf00ed387b933141aebc5abe6add /patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch
parent8b1734123e9de38fa939481fbc7e4417ca176633 (diff)
downloadPaper-3a43821c382ed99b3e64892381c263a23e9cc56a.tar.gz
Paper-3a43821c382ed99b3e64892381c263a23e9cc56a.zip
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Diffstat (limited to 'patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch')
-rw-r--r--patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch b/patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch
new file mode 100644
index 0000000000..1416b1373a
--- /dev/null
+++ b/patches/api/0216-Add-playPickupItemAnimation-to-LivingEntity.patch
@@ -0,0 +1,39 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: William Blake Galbreath <[email protected]>
+Date: Sun, 23 Aug 2020 19:36:08 +0200
+Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
+
+
+diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
+index 5ab8db52160049e36464df4e20e374b8849ef29c..1b6c2b2cfb910e7651e7f18ea407e31db685af8a 100644
+--- a/src/main/java/org/bukkit/entity/LivingEntity.java
++++ b/src/main/java/org/bukkit/entity/LivingEntity.java
+@@ -822,5 +822,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
+ * @param jumping entity jump state
+ */
+ void setJumping(boolean jumping);
++
++ /**
++ * 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
+ }