From 7369ef730063f7b76c1cf76166f73d3ea46fb791 Mon Sep 17 00:00:00 2001 From: Dinnerbone Date: Mon, 31 Jan 2011 01:23:10 +0000 Subject: [PATCH] Implemented getRemainingAir/setRemainingAir/getMaximumAir/setMaximumAir on LivingEntity --- src/main/java/net/minecraft/server/Entity.java | 2 +- .../craftbukkit/entity/CraftLivingEntity.java | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) 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; + } }