Contents
Class DamageDataComponent
java.lang.Object
com.hypixel.hytale.server.core.entity.damage.DamageDataComponent
- All Implemented Interfaces:
Component<EntityStore>, Cloneable
A component that holds the damage-related data for an entity.
-
Field Summary
Fields inherited from interface Component
EMPTY_ARRAY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()static ComponentType<EntityStore, DamageDataComponent> voidsetCurrentWielding(WieldingInteraction currentWielding) Called to set the current wielding interaction of the entity.voidsetLastChargeTime(Instant lastChargeTime) Called to set the last charge time for the entity.voidsetLastCombatAction(Instant lastCombatAction) Called to set the last combat action time.voidsetLastDamageTime(Instant lastDamageTime) Called to set the last damage time for the entity.Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Component
cloneSerializable
-
Constructor Details
-
DamageDataComponent
public DamageDataComponent()
-
-
Method Details
-
getComponentType
- Returns:
- the component type for the
DamageDataComponentcomponent.
-
getLastCombatAction
- Returns:
- the last time the entity performed a combat action.
-
setLastCombatAction
Called to set the last combat action time.- Parameters:
lastCombatAction- The time to set as the last combat action.
-
getLastDamageTime
- Returns:
- the last time the entity received damage.
-
setLastDamageTime
Called to set the last damage time for the entity.- Parameters:
lastDamageTime- The time to set as the last damage time.
-
getLastChargeTime
- Returns:
- the last time the entity charged an attack, or
nullif never.
-
setLastChargeTime
Called to set the last charge time for the entity.- Parameters:
lastChargeTime- The time to set as the last charge time.
-
getCurrentWielding
- Returns:
- the current wielding interaction of the entity, or
nullif none.
-
setCurrentWielding
Called to set the current wielding interaction of the entity.- Parameters:
currentWielding- The wielding interaction to set.
-
clone
- Specified by:
clonein interfaceComponent<EntityStore>- Returns:
- a clone instance of the original component instance.
-