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

31 lines
998 B
Diff
Raw Normal View History

2019-05-06 04:58:04 +02:00
From 60c47a3db5b36b1b1742c452527d895223afb2a9 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
2019-05-06 04:58:04 +02:00
index 4b5b2ae34e..540f6ea8ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
2019-05-06 04:58:04 +02:00
@@ -585,4 +585,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
public boolean isCollidable() {
return getHandle().collides;
}
+
+ // Paper start
+ @Override
+ public int getArrowsStuck() {
2017-05-14 20:05:01 +02:00
+ return getHandle().getArrowCount();
+ }
+
+ @Override
+ public void setArrowsStuck(int arrows) {
2017-05-14 20:05:01 +02:00
+ getHandle().setArrowCount(arrows);
+ }
+ // Paper end
}
--
2019-04-23 06:47:07 +02:00
2.21.0