public interface ImmutableDamageableData extends ImmutableDataManipulator<ImmutableDamageableData,DamageableData>
ImmutableDataManipulator
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 |
---|---|
ImmutableOptionalValue<EntitySnapshot> |
lastAttacker()
Gets the
ImmutableOptionalValue for the last attacker. |
ImmutableOptionalValue<Double> |
lastDamage()
Gets the last amount of damage taken by this entity as an optional value.
|
asMutable, copy, with, with
getContentVersion, toContainer
ImmutableOptionalValue<EntitySnapshot> lastAttacker()
ImmutableOptionalValue
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.
ImmutableOptionalValue<Double> lastDamage()
This data will usually only be present within 100 ticks of the attack occurring.