diff options
author | Erik Broes <erikbroes@grum.nl> | 2011-03-24 00:32:41 +0100 |
---|---|---|
committer | Erik Broes <erikbroes@grum.nl> | 2011-03-24 00:32:41 +0100 |
commit | 31293488663c6cd73a566f96165f817072a37571 (patch) | |
tree | 3af4ff3c4025f27bb6a7c7aa60bd01bb664c5f47 /src | |
parent | 267e74521222b73972d899996e00dfcce2800afc (diff) | |
download | craftbukkit-31293488663c6cd73a566f96165f817072a37571.tar craftbukkit-31293488663c6cd73a566f96165f817072a37571.tar.gz craftbukkit-31293488663c6cd73a566f96165f817072a37571.tar.lz craftbukkit-31293488663c6cd73a566f96165f817072a37571.tar.xz craftbukkit-31293488663c6cd73a566f96165f817072a37571.zip |
Implementation of LivingEntity maximumNoDamageTicks, noDamageTicks, lastDamage
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/net/minecraft/server/EntityLiving.java | 2 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java | 24 |
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; + } } |