2019-09-22 12:12:45 +08:00
|
|
|
From 8114e0e26ee38a3683d2167e0cba2ff3423bb941 Mon Sep 17 00:00:00 2001
|
2016-03-09 12:21:08 +08: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
|
2019-09-22 12:12:45 +08:00
|
|
|
index 029c2d475..7e9aff668 100644
|
2016-03-09 12:21:08 +08:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2019-09-22 12:12:45 +08:00
|
|
|
@@ -611,4 +611,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
2019-05-22 12:14:56 +08:00
|
|
|
public <T> void setMemory(MemoryKey<T> memoryKey, T t) {
|
|
|
|
getHandle().getBehaviorController().setMemory(CraftMemoryKey.fromMemoryKey(memoryKey), CraftMemoryMapper.toNms(t));
|
2016-03-09 12:21:08 +08:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public int getArrowsStuck() {
|
2017-05-15 02:05:01 +08:00
|
|
|
+ return getHandle().getArrowCount();
|
2016-03-09 12:21:08 +08:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setArrowsStuck(int arrows) {
|
2017-05-15 02:05:01 +08:00
|
|
|
+ getHandle().setArrowCount(arrows);
|
2016-03-09 12:21:08 +08:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
--
|
2019-09-22 12:12:45 +08:00
|
|
|
2.22.1
|
2016-03-09 12:21:08 +08:00
|
|
|
|