summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java24
2 files changed, 25 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 94882460..fcededa7 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -61,7 +61,7 @@ public abstract class EntityLiving extends Entity {
protected double ap;
protected double aq;
float ar = 0.0F;
- protected int lastDamage = 0;
+ public int lastDamage = 0; // CraftBukkit protected -> public
protected int at = 0;
protected float au;
protected float av;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 51a6c91b..812e8297 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -179,4 +179,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
loc.setY(loc.getY() + getEyeHeight());
return loc;
}
+
+ public int getMaximumNoDamageTicks() {
+ return getHandle().maxNoDamageTicks;
+ }
+
+ public void setMaximumNoDamageTicks(int ticks) {
+ getHandle().maxNoDamageTicks = ticks;
+ }
+
+ public int getLastDamage() {
+ return getHandle().lastDamage;
+ }
+
+ public void setLastDamage(int damage) {
+ getHandle().lastDamage = damage;
+ }
+
+ public int getNoDamageTicks() {
+ return getHandle().noDamageTicks;
+ }
+
+ public void setNoDamageTicks(int ticks) {
+ getHandle().noDamageTicks = ticks;
+ }
}