testserver/Spigot-Server-Patches/0057-Add-methods-for-workin...

28 lines
1.1 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 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
2020-06-25 14:09:55 +00:00
index 7e95ef170c418594f5469431c052e64107c08ab5..d5b165e8275c012d775b77b8440489716a6c3c08 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
2020-06-25 14:09:55 +00:00
@@ -636,4 +636,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
2019-05-22 04:14:56 +00:00
public <T> void setMemory(MemoryKey<T> memoryKey, T t) {
getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t));
}
+
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
2017-05-14 18:05:01 +00:00
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
2017-05-14 18:05:01 +00:00
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}