aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0057-Add-methods-for-working-with-arrows-stuck-in-living-.patch
blob: 7f2cd8db29f6cc5e95080b3640365c813d17b3d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 8114e0e26ee38a3683d2167e0cba2ff3423bb941 Mon Sep 17 00:00:00 2001
From: mrapple <tony@oc.tc>
Date: Sun, 25 Nov 2012 13:43:39 -0600
Subject: [PATCH] Add methods for working with arrows stuck in living entities


diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 029c2d475..7e9aff668 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -611,4 +611,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
     public <T> void setMemory(MemoryKey<T> memoryKey, T t) {
         getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t));
     }
+
+    // Paper start
+    @Override
+    public int getArrowsStuck() {
+        return getHandle().getArrowCount();
+    }
+
+    @Override
+    public void setArrowsStuck(int arrows) {
+        getHandle().setArrowCount(arrows);
+    }
+    // Paper end
 }
-- 
2.22.1