summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-01-31 01:23:10 +0000
committerDinnerbone <dinnerbone@dinnerbone.com>2011-01-31 01:23:10 +0000
commit7369ef730063f7b76c1cf76166f73d3ea46fb791 (patch)
treea91668044131d0cbd257ace5c38e6a7fb3a9d08c
parentc75e53935f1bf518d71bffcb5cd67647cf9e5c1a (diff)
downloadcraftbukkit-7369ef730063f7b76c1cf76166f73d3ea46fb791.tar
craftbukkit-7369ef730063f7b76c1cf76166f73d3ea46fb791.tar.gz
craftbukkit-7369ef730063f7b76c1cf76166f73d3ea46fb791.tar.lz
craftbukkit-7369ef730063f7b76c1cf76166f73d3ea46fb791.tar.xz
craftbukkit-7369ef730063f7b76c1cf76166f73d3ea46fb791.zip
Implemented getRemainingAir/setRemainingAir/getMaximumAir/setMaximumAir on LivingEntity
-rw-r--r--src/main/java/net/minecraft/server/Entity.java2
-rw-r--r--src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java16
2 files changed, 17 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2eab3c43..7b574d2e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -62,7 +62,7 @@ public abstract class Entity {
public int ticksLived;
public int maxFireTicks;
public int fireTicks;
- protected int maxAirTicks;
+ public int maxAirTicks; // Craftbukkit: Make public
protected boolean ab;
public int noDamageTicks;
public int airTicks;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index e947241c..89dd9e34 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -96,4 +96,20 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
return null;
}
+
+ public int getRemainingAir() {
+ return entity.airTicks;
+ }
+
+ public void setRemainingAir(int ticks) {
+ entity.airTicks = ticks;
+ }
+
+ public int getMaximumAir() {
+ return entity.maxAirTicks;
+ }
+
+ public void setMaximumAir(int ticks) {
+ entity.maxAirTicks = ticks;
+ }
}