2019-06-25 21:18:50 +02:00
|
|
|
From e17fd478da771d89e0b77adb036d3152650f0827 Mon Sep 17 00:00:00 2001
|
2016-03-09 05:21:08 +01: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-06-06 17:36:57 +02:00
|
|
|
index 82b3c0a7de..aa50435bec 100644
|
2016-03-09 05:21:08 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2019-05-22 06:14:56 +02:00
|
|
|
@@ -598,4 +598,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));
|
2016-03-09 05:21:08 +01:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public int getArrowsStuck() {
|
2017-05-14 20:05:01 +02:00
|
|
|
+ return getHandle().getArrowCount();
|
2016-03-09 05:21:08 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setArrowsStuck(int arrows) {
|
2017-05-14 20:05:01 +02:00
|
|
|
+ getHandle().setArrowCount(arrows);
|
2016-03-09 05:21:08 +01:00
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
--
|
2019-06-25 21:18:50 +02:00
|
|
|
2.22.0
|
2016-03-09 05:21:08 +01:00
|
|
|
|