Contents
Interface Damage.Source
- All Known Implementing Classes:
ActiveEntityEffect, Damage.CommandSource, Damage.EntityEffectSource, Damage.EntitySource, Damage.EnvironmentSource, Damage.ProjectileSource
- Enclosing class:
Damage
public static interface Damage.Source
Information about the source of a damage event.
Implement to add a new damage source or use one
of the existing ones (e.g. Damage.EntitySource.
-
Method Summary
Modifier and TypeMethodDescriptiondefault MessagegetDeathMessage(Damage info, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) Generates a death message from this source and any information provided ininfo.default DamageSourceType
-
Method Details
-
getDeathMessage
@Nonnull default Message getDeathMessage(@Nonnull Damage info, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Generates a death message from this source and any information provided ininfo.- Parameters:
info- The damage info to inspecttargetRef- The entity reference of the entity that has been killed.componentAccessor- TheComponentAccessor<EntityStore>for component access.- Returns:
- The generated death message
-
getSourceType
- Returns:
- the
DamageSourceTypeof this source.
-