2020-05-01 22:03:47 +00:00
|
|
|
From 4bbba33157c98db6b74b394a0725b98fa7ef1e24 Mon Sep 17 00:00:00 2001
|
2016-03-09 04:21:08 +00:00
|
|
|
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-05-01 22:03:47 +00:00
|
|
|
index 966d23add1..da86ee4149 100644
|
2016-03-09 04:21:08 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2020-02-25 18:57:15 +00:00
|
|
|
@@ -623,4 +623,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));
|
2016-03-09 04:21:08 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public int getArrowsStuck() {
|
2017-05-14 18:05:01 +00:00
|
|
|
+ return getHandle().getArrowCount();
|
2016-03-09 04:21:08 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setArrowsStuck(int arrows) {
|
2017-05-14 18:05:01 +00:00
|
|
|
+ getHandle().setArrowCount(arrows);
|
2016-03-09 04:21:08 +00:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
--
|
2020-05-01 22:03:47 +00:00
|
|
|
2.26.2
|
2016-03-09 04:21:08 +00:00
|
|
|
|