Files
Purpur/patches/api/0021-Add-playPickupItemAnimation-to-LivingEntity.patch
William Blake Galbreath dd928e3864 Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
8d036cea Expose the internal current tick
0c715390 [PATCH] bounding box check for hanging entities (#2664)
527073aa Update config version
0d3b35c3 Rename baby zombie movement config option
2019-10-31 13:51:33 -05:00

40 lines
1.2 KiB
Diff

From 6469abdfd45c6db049434e337552f85b5f8cd87c Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 19 Oct 2019 02:25:05 -0500
Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
---
.../java/org/bukkit/entity/LivingEntity.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/src/main/java/org/bukkit/entity/LivingEntity.java b/src/main/java/org/bukkit/entity/LivingEntity.java
index 7196c1b79..5789b4584 100644
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
@@ -731,5 +731,22 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
* @param jumping Jump state
*/
void setJumping(boolean jumping);
+
+ /**
+ * Plays pickup item animation
+ *
+ * @param item Item to pickup
+ */
+ default void playPickupItemAnimation(@NotNull Item item) {
+ playPickupItemAnimation(item, item.getItemStack().getAmount());
+ }
+
+ /**
+ * Plays pickup item animation
+ *
+ * @param item Item to pickup
+ * @param quantity Quantity of item
+ */
+ void playPickupItemAnimation(@NotNull Item item, int quantity);
// Purpur end
}
--
2.24.0.rc1