13
0
geforkt von Mirrors/Paper
Paper/patches/unapplied/server/0423-Add-playPickupItemAnimation-to-LivingEntity.patch
2024-04-23 13:36:31 -07:00

23 Zeilen
1.0 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:22 +0200
Subject: [PATCH] Add playPickupItemAnimation to LivingEntity
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index d84503ab329ebeb4c74f10f9897661ee6799e3d3..87033a5d8dd5b67475657c3749f428a8e841a2f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -992,4 +992,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
}
}
// Paper end - entity jump API
+
+ // Paper start - pickup animation API
+ @Override
+ public void playPickupItemAnimation(final org.bukkit.entity.Item item, final int quantity) {
+ this.getHandle().take(((CraftItem) item).getHandle(), quantity);
+ }
+ // Paper end - pickup animation API
}