summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;
+ }
}