diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java index 2eab3c435a..7b574d2eb0 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 e947241c30..89dd9e341a 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; + } }