aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0395-Add-playPickupItemAnimation-to-LivingEntity.patch
blob: 0fcb956c33654d1fd11c145a6a0f1231f0a4d9d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 9cf3e1e20799caf4ba469ef6d5d86bfe176641f7..344ef786330d1247fdfb56ef04be130c9ffb7d8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -979,4 +979,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
 }