2017-05-15 02:05:01 +08:00
|
|
|
From 6d78130c5cdd3c5e947ca2f4cd3c2c4bc9eff7c3 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
|
2017-05-15 02:05:01 +08:00
|
|
|
index 062a0fd55..8ed91e82a 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
|
2017-02-11 08:12:58 +08:00
|
|
|
@@ -572,4 +572,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
2016-03-28 09:48:50 +08:00
|
|
|
public boolean isCollidable() {
|
|
|
|
return getHandle().collides;
|
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
|
|
|
|
}
|
|
|
|
--
|
2017-05-15 02:05:01 +08:00
|
|
|
2.13.0
|
2016-03-09 12:21:08 +08:00
|
|
|
|