aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0387-Add-playPickupItemAnimation-to-LivingEntity.patch
blob: 5b48b5baca207e93b2afa76f1ff67f7fb946cc4a (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 1873b5c22d3b351b6120cb832c6ff045d9ad38f0..0aa3fd9dce0cf90b1f74551c864e9ebf326eb1f3 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -1009,4 +1009,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
 }