public class DamageTracker extends Object
Modifier and Type | Field and Description |
---|---|
private int |
ageOnLastAttacked |
private int |
ageOnLastDamage |
private int |
ageOnLastUpdate |
private LivingEntity |
entity |
private String |
fallDeathSuffix |
private boolean |
hasDamage |
private List<DamageRecord> |
recentDamage |
private boolean |
recentlyAttacked |
Constructor and Description |
---|
DamageTracker(LivingEntity entity) |
Modifier and Type | Method and Description |
---|---|
private void |
clearFallDeathSuffix() |
LivingEntity |
getBiggestAttacker() |
private DamageRecord |
getBiggestFall() |
Text |
getDeathMessage() |
LivingEntity |
getEntity() |
private String |
getFallDeathSuffix(DamageRecord damageRecord) |
int |
getTimeSinceLastAttack() |
void |
onDamage(DamageSource damageSource,
float originalHealth,
float float2) |
void |
setFallDeathSuffix() |
void |
update() |
private final List<DamageRecord> recentDamage
private final LivingEntity entity
private int ageOnLastDamage
private int ageOnLastAttacked
private int ageOnLastUpdate
private boolean recentlyAttacked
private boolean hasDamage
private String fallDeathSuffix
public DamageTracker(LivingEntity entity)
public void setFallDeathSuffix()
public void onDamage(DamageSource damageSource, float originalHealth, float float2)
public Text getDeathMessage()
@Nullable public LivingEntity getBiggestAttacker()
@Nullable private DamageRecord getBiggestFall()
private String getFallDeathSuffix(DamageRecord damageRecord)
public int getTimeSinceLastAttack()
private void clearFallDeathSuffix()
public void update()
public LivingEntity getEntity()