Contents
Class Damage.EnvironmentSource
java.lang.Object
com.hypixel.hytale.server.core.modules.entity.damage.Damage.EnvironmentSource
- All Implemented Interfaces:
Damage.Source
- Enclosing class:
Damage
A damage source that is caused by the environment, such as block explosions.
-
Constructor Summary
ConstructorsConstructorDescriptionEnvironmentSource(String deathMessageKey) Default Constructor for aDamage.EnvironmentSourceinstance -
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.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Damage.Source
getSourceType
-
Constructor Details
-
EnvironmentSource
Default Constructor for aDamage.EnvironmentSourceinstance- Parameters:
deathMessageKey- The localization key of the death message for this environment damage.
-
-
Method Details
-
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
-