public interface DamageableData extends DataManipulator<DamageableData,ImmutableDamageableData>
DataManipulator
for retaining the last known "attacker" for an
Entity
. If there is no known last attacker, the lastAttacker()
may have an Optional.EMPTY
value.
This data will usually only stay around for 100 ticks, which is generally around 5 or so seconds.
Modifier and Type | Method and Description |
---|---|
OptionalValue<EntitySnapshot> |
lastAttacker()
Gets the
OptionalValue for the last attacker. |
OptionalValue<Double> |
lastDamage()
Gets the last amount of damage taken by this entity as an optional value.
|
asImmutable, copy, fill, fill, from, set, set, set, set, transform
getContentVersion, toContainer
OptionalValue<EntitySnapshot> lastAttacker()
OptionalValue
for the last attacker.
This will usually be an entity snapshot of a Living
.
This data will usually only be present within 100 ticks of the attack occurring.
Keys.LAST_ATTACKER
OptionalValue<Double> lastDamage()
This data will usually only be present within 100 ticks of the attack occurring.
Keys.LAST_DAMAGE