mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 02:55:47 +01:00
28 lines
1.1 KiB
Diff
28 lines
1.1 KiB
Diff
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
|
|
index 966d23add13a3139adead8f8969c0a4ff34929c6..da86ee41499b02959755328544307aed39752483 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
@@ -623,4 +623,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
|
|
}
|