Interface CombatEntry
Represents a combat entry
-
Method Summary
Modifier and TypeMethodDescriptionstatic CombatEntrycombatEntry(DamageSource damageSource, float damage, @Nullable FallLocationType fallLocationType, float fallDistance) Creates a new combat entrystatic CombatEntrycombatEntry(LivingEntity entity, DamageSource damageSource, float damage) Creates a new combat entry.floatGets the amount of damage caused.Gets the damage source.floatGets 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:
-