mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-01 12:41:50 +01:00
Implemented getRemainingAir/setRemainingAir/getMaximumAir/setMaximumAir on LivingEntity
This commit is contained in:
parent
c75e53935f
commit
7369ef7300
2 changed files with 17 additions and 1 deletions
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue