Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
526795bacd
* Update patches to handle vineflower decompiler * update patches again to handle inlined simple lambdas * update vf again and re-apply/rebuild patches * update patches after removal of verify-merges flag * fix compile issue * remove maven local * fix some issues * address more issues * fix collision patch * use paperweight release * more fixes * update fineflower and fix patches again * add missing comment descriptor --------- Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
41 Zeilen
1.5 KiB
Diff
41 Zeilen
1.5 KiB
Diff
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
|
|
index 1a7d802e8c3204408402ce58377108ffac2662b9..7dbb3737cd175365b89a5c8d0542b16e812b8629 100644
|
|
--- a/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/entity/LivingEntity.java
|
|
@@ -1169,4 +1169,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
|
|
}
|