Contents
Class Damage.EntitySource
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.damage.Damage.EntitySource
- All Implemented Interfaces:
Damage.Source
- Direct Known Subclasses:
Damage.EntityEffectSource, Damage.ProjectileSource
- Enclosing class:
Damage
A damage source that contains an affiliated entity
-
Constructor Summary
ConstructorsConstructorDescriptionEntitySource(Ref<EntityStore> sourceRef) Default Constructor for aDamage.EntitySourceinstance -
Method Summary
Modifier and TypeMethodDescriptiongetDeathMessage(Damage info, Ref<EntityStore> targetRef, ComponentAccessor<EntityStore> componentAccessor) Generates a death message from this source and any information provided ininfo.getRef()The reference to the entity that caused the damage event.
-
Constructor Details
-
EntitySource
Default Constructor for aDamage.EntitySourceinstance- Parameters:
sourceRef- The reference to the affiliated entity
-
-
Method Details
-
getRef
The reference to the entity that caused the damage event.- Returns:
- The reference.
-
getDeathMessage
@Nonnull public Message getDeathMessage(@Nonnull Damage info, @Nonnull Ref<EntityStore> targetRef, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Description copied from interface:Damage.SourceGenerates a death message from this source and any information provided ininfo.- Specified by:
getDeathMessagein interfaceDamage.Source- 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
- Specified by:
getSourceTypein interfaceDamage.Source- Returns:
- the
DamageSourceTypeof this source.
-