Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-17 05:20:05 +01:00
Implementation of LivingEntity maximumNoDamageTicks, noDamageTicks, lastDamage
Dieser Commit ist enthalten in:
Ursprung
267e745212
Commit
3129348866
@ -61,7 +61,7 @@ public abstract class EntityLiving extends Entity {
|
|||||||
protected double ap;
|
protected double ap;
|
||||||
protected double aq;
|
protected double aq;
|
||||||
float ar = 0.0F;
|
float ar = 0.0F;
|
||||||
protected int lastDamage = 0;
|
public int lastDamage = 0; // CraftBukkit protected -> public
|
||||||
protected int at = 0;
|
protected int at = 0;
|
||||||
protected float au;
|
protected float au;
|
||||||
protected float av;
|
protected float av;
|
||||||
|
@ -179,4 +179,28 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
|||||||
loc.setY(loc.getY() + getEyeHeight());
|
loc.setY(loc.getY() + getEyeHeight());
|
||||||
return loc;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren