2021-06-11 14:02:28 +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
|
2024-09-15 21:39:53 +02:00
|
|
|
index c2352d75e02f7be27fcf9ea69df1bd104a2449bd..88d6a5aaf2a686186fab4916480a04f6503d887c 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
2024-09-15 21:39:53 +02:00
|
|
|
@@ -1181,4 +1181,29 @@ public interface LivingEntity extends Attributable, Damageable, ProjectileSource
|
2021-06-11 14:02:28 +02:00
|
|
|
*/
|
|
|
|
void setJumping(boolean jumping);
|
2024-04-06 21:53:39 +02:00
|
|
|
// Paper end - entity jump API
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
2024-04-06 21:53:39 +02:00
|
|
|
+ // Paper start - pickup animation API
|
2021-06-11 14:02:28 +02:00
|
|
|
+ /**
|
|
|
|
+ * 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);
|
2024-04-06 21:53:39 +02:00
|
|
|
+ // Paper end - pickup animation API
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|