mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-15 12:02:49 +01:00
Implementation of LivingEntity maximumNoDamageTicks, noDamageTicks, lastDamage
This commit is contained in:
parent
267e745212
commit
3129348866
2 changed files with 25 additions and 1 deletions
|
@ -61,7 +61,7 @@ public abstract class EntityLiving extends Entity {
|
|||
protected double ap;
|
||||
protected double aq;
|
||||
float ar = 0.0F;
|
||||
protected int lastDamage = 0;
|
||||
public int lastDamage = 0; // CraftBukkit protected -> public
|
||||
protected int at = 0;
|
||||
protected float au;
|
||||
protected float av;
|
||||
|
|
|
@ -179,4 +179,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||
loc.setY(loc.getY() + getEyeHeight());
|
||||
return loc;
|
||||
}
|
||||
|
||||
public int getMaximumNoDamageTicks() {
|
||||
return getHandle().maxNoDamageTicks;
|
||||
}
|
||||
|
||||
public void setMaximumNoDamageTicks(int ticks) {
|
||||
getHandle().maxNoDamageTicks = ticks;
|
||||
}
|
||||
|
||||
public int getLastDamage() {
|
||||
return getHandle().lastDamage;
|
||||
}
|
||||
|
||||
public void setLastDamage(int damage) {
|
||||
getHandle().lastDamage = damage;
|
||||
}
|
||||
|
||||
public int getNoDamageTicks() {
|
||||
return getHandle().noDamageTicks;
|
||||
}
|
||||
|
||||
public void setNoDamageTicks(int ticks) {
|
||||
getHandle().noDamageTicks = ticks;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue