Paper/Spigot-Server-Patches/0060-Add-methods-for-working-with-arrows-stuck-in-living-.patch

31 lines
998 B
Diff
Raw Normal View History

2018-07-21 03:57:43 +08:00
From 6ed7bec1024ce7726a7feed2ca16e3b80ef3df07 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
2018-07-21 03:57:43 +08:00
index 1620d9a74e..506d0d4e48 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
2018-07-21 03:57:43 +08:00
@@ -509,4 +509,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public boolean isCollidable() {
return getHandle().collides;
}
+
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
2017-05-15 02:05:01 +08:00
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
2017-05-15 02:05:01 +08:00
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}
--
2.18.0