2016-08-27 23:41:58 +00:00
|
|
|
From 154d80b8db25446e496480dedefa1f4c4d9f4537 Mon Sep 17 00:00:00 2001
|
2016-03-09 04:21:08 +00: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/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
2016-08-07 05:01:31 +00:00
|
|
|
index 8aaab9e..89e6ef5 100644
|
2016-03-09 04:21:08 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
2016-06-09 03:57:14 +00:00
|
|
|
@@ -1307,10 +1307,12 @@ public abstract class EntityLiving extends Entity {
|
2016-03-09 04:21:08 +00:00
|
|
|
return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
|
|
|
|
}
|
|
|
|
|
2016-06-09 03:57:14 +00:00
|
|
|
+ public final int getStuckArrows() { return this.cb(); } // Paper - OBFHELPER
|
|
|
|
public final int cb() {
|
2016-03-09 04:21:08 +00:00
|
|
|
return ((Integer) this.datawatcher.get(EntityLiving.h)).intValue();
|
|
|
|
}
|
|
|
|
|
2016-06-09 03:57:14 +00:00
|
|
|
+ public final void setStuckArrows(int arrows) { this.f(arrows); } // Paper - OBFHELPER
|
|
|
|
public final void f(int i) {
|
2016-03-09 04:21:08 +00:00
|
|
|
this.datawatcher.set(EntityLiving.h, Integer.valueOf(i));
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2016-08-07 05:01:31 +00:00
|
|
|
index a123d5e..79d60a6 100644
|
2016-03-09 04:21:08 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2016-08-07 05:01:31 +00:00
|
|
|
@@ -559,4 +559,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
2016-03-28 01:48:50 +00:00
|
|
|
public boolean isCollidable() {
|
|
|
|
return getHandle().collides;
|
2016-03-09 04:21:08 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public int getArrowsStuck() {
|
|
|
|
+ return this.getHandle().getStuckArrows();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setArrowsStuck(int arrows) {
|
|
|
|
+ this.getHandle().setStuckArrows(arrows);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
--
|
2016-08-07 05:01:31 +00:00
|
|
|
2.9.2.windows.1
|
2016-03-09 04:21:08 +00:00
|
|
|
|