2016-11-17 03:23:38 +01:00
|
|
|
From 1f97c9460dc9da319a81d4abae1ed9e7b5773949 Mon Sep 17 00:00:00 2001
|
2016-03-09 05:21:08 +01: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-11-17 03:23:38 +01:00
|
|
|
index 87a8a3e..97eac7a 100644
|
2016-03-09 05:21:08 +01:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
2016-11-17 03:23:38 +01:00
|
|
|
@@ -1376,10 +1376,12 @@ public abstract class EntityLiving extends Entity {
|
2016-03-09 05:21:08 +01:00
|
|
|
return (float) this.getAttributeInstance(GenericAttributes.maxHealth).getValue();
|
|
|
|
}
|
|
|
|
|
2016-11-17 03:23:38 +01:00
|
|
|
+ public final int getStuckArrows() { return this.cc(); } // Paper - OBFHELPER
|
|
|
|
public final int cc() {
|
|
|
|
return ((Integer) this.datawatcher.get(EntityLiving.bq)).intValue();
|
2016-03-09 05:21:08 +01:00
|
|
|
}
|
|
|
|
|
2016-06-09 05:57:14 +02:00
|
|
|
+ public final void setStuckArrows(int arrows) { this.f(arrows); } // Paper - OBFHELPER
|
|
|
|
public final void f(int i) {
|
2016-11-17 03:23:38 +01:00
|
|
|
this.datawatcher.set(EntityLiving.bq, Integer.valueOf(i));
|
2016-03-09 05:21:08 +01:00
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2016-11-17 03:23:38 +01:00
|
|
|
index aaea4e8..2a77cd4 100644
|
2016-03-09 05:21:08 +01:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
2016-08-07 07:01:31 +02:00
|
|
|
@@ -559,4 +559,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
2016-03-28 03:48:50 +02:00
|
|
|
public boolean isCollidable() {
|
|
|
|
return getHandle().collides;
|
2016-03-09 05:21:08 +01:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ // Paper start
|
|
|
|
+ @Override
|
|
|
|
+ public int getArrowsStuck() {
|
|
|
|
+ return this.getHandle().getStuckArrows();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void setArrowsStuck(int arrows) {
|
|
|
|
+ this.getHandle().setStuckArrows(arrows);
|
|
|
|
+ }
|
|
|
|
+ // Paper end
|
|
|
|
}
|
|
|
|
--
|
2016-11-17 03:23:38 +01:00
|
|
|
2.10.2
|
2016-03-09 05:21:08 +01:00
|
|
|
|