Interface CombatEntry
Represents a combat entry
-
Method Summary
Modifier and TypeMethodDescriptionstatic CombatEntry
combatEntry
(DamageSource damageSource, float damage, @Nullable FallLocationType fallLocationType, float fallDistance) Creates a new combat entrystatic CombatEntry
combatEntry
(LivingEntity entity, DamageSource damageSource, float damage) Creates a new combat entry.float
Gets the amount of damage caused.Gets the damage source.float
Gets the fall distance at the time of this damage.Gets the fall location type at the time of this damage.
-
Method Details
-
getDamageSource
DamageSource getDamageSource()Gets the damage source.- Returns:
- the damage source
-
getDamage
float getDamage()Gets the amount of damage caused.- Returns:
- the amount of damage caused
-
getFallLocationType
@Nullable FallLocationType getFallLocationType()Gets the fall location type at the time of this damage.- Returns:
- the fall location type
-
getFallDistance
float getFallDistance()Gets the fall distance at the time of this damage.- Returns:
- the fall distance
-
combatEntry
Creates a new combat entry.The fall location and fall distance will be calculated from the entity's current state.
- Parameters:
entity
- entitydamageSource
- damage sourcedamage
- damage amount- Returns:
- combat entry
- See Also:
-
combatEntry
static CombatEntry combatEntry(DamageSource damageSource, float damage, @Nullable FallLocationType fallLocationType, float fallDistance) Creates a new combat entry- Parameters:
damageSource
- damage sourcedamage
- damage amountfallLocationType
- fall location typefallDistance
- fall distance- Returns:
- a new combat entry
- See Also:
-