PaperMC/patches/unapplied/server/0393-Add-playPickupItemAnimation-to-LivingEntity.patch
2024-10-22 19:28:57 +02:00

22 lines
1 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 733c69a2cfa60fb8c920400e3d9acfc2465090e5..fad7d8130f6db70c7bfca9d02027d8a41f5309c1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -990,4 +990,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
}