2020-08-23 19:41:34 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
|
|
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
|
2020-09-19 13:29:53 +02:00
|
|
|
index a2f5639904881d9bef7d1550dbed810e4b17c8de..9bf525b795ff1d88d2596b1f2bc787ce0df047bb 100644
|
2020-08-23 19:41:34 +02:00
|
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
2020-09-19 13:29:53 +02:00
|
|
|
@@ -805,5 +805,28 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
2020-08-23 19:41:34 +02:00
|
|
|
* @param jumping entity jump state
|
|
|
|
*/
|
|
|
|
void setJumping(boolean jumping);
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * Plays pickup item animation towards this entity.
|
2020-09-02 14:20:10 +02:00
|
|
|
+ * <p>
|
2020-08-23 19:41:34 +02:00
|
|
|
+ * <b>This will remove the item on the client.</b>
|
2020-09-02 14:20:10 +02:00
|
|
|
+ * <p>
|
2020-08-23 19:41:34 +02:00
|
|
|
+ * 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.
|
2020-09-02 14:20:10 +02:00
|
|
|
+ * <p>
|
2020-08-23 19:41:34 +02:00
|
|
|
+ * <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
|
|
|
|
}
|