Interface EntityCombatTracker
public interface EntityCombatTracker
Represents an Entity's Combat Tracker
-
Method Summary
Modifier and TypeMethodDescriptionintFetches how long this Mob has been in combat, in ticks@NotNull List<CombatEntry> Creates an immutable list of the CombatEntries of this CombatTracker.@NotNull StringFetches the current death message of the Entity according togetLatestEntry().@Nullable CombatEntryFetches the latest CombatEntry of this CombatTracker.booleanWhether this Mob had its last damage cancelled.booleanWhether this Mob is currently in combat.booleanWhether this Mob is currently taking damage.voidrecordEntry(@NotNull CombatEntry entry) Adds a CombatEntry togetCombatEntries().
-
Method Details
-
getCurrentDeathMessage
Fetches the current death message of the Entity according togetLatestEntry().- Returns:
- Death message of the Entity
-
getLatestEntry
Fetches the latest CombatEntry of this CombatTracker.- Returns:
- Latest CombatEntry of this CombatTracker
-
getCombatEntries
Creates an immutable list of the CombatEntries of this CombatTracker.- Returns:
- All CombatEntries for this CombatTracker
-
recordEntry
Adds a CombatEntry togetCombatEntries().- Parameters:
entry- CombatEntry to add
-
getCombatDuration
int getCombatDuration()Fetches how long this Mob has been in combat, in ticks- Returns:
- Combat Duration in ticks
-
isTakingDamage
boolean isTakingDamage()Whether this Mob is currently taking damage.- Returns:
- true if taking damage, else false
-
isInCombat
boolean isInCombat()Whether this Mob is currently in combat.- Returns:
- true if in combat, else false
-
hasLastDamageCancelled
boolean hasLastDamageCancelled()Whether this Mob had its last damage cancelled.- Returns:
- true if last damage was cancelled, else false
-