Skip to content

Damage

Package: com.hypixel.hytale.server.core.modules.entity.damage

Type: class

Extends: CancellableEcsEvent implements IMetaStore

Constructors

java
public Damage(@Nonnull Source source, @Nonnull DamageCause damageCause, float amount)
java
public Damage(@Nonnull Source source, int damageCauseIndex, float amount)

Static Fields

NameType
MESSAGE_GENERAL_DAMAGE_CAUSE_UNKNOWNMessage
META_REGISTRYMetaRegistry
HIT_LOCATIONMetaKey
HIT_ANGLEMetaKey
IMPACT_PARTICLESMetaKey
IMPACT_SOUND_EFFECTMetaKey
PLAYER_IMPACT_SOUND_EFFECTMetaKey
CAMERA_EFFECTMetaKey
DEATH_ICONMetaKey
BLOCKEDMetaKey
STAMINA_DRAIN_MULTIPLIERMetaKey
CAN_BE_PREDICTEDMetaKey
KNOCKBACK_COMPONENTMetaKey
NULL_SOURCESource
COMMAND_NAME_UNKNOWNString

Fields

NameType
metaStoreIMetaStoreImpl
initialAmountfloat
damageCauseIndexint
sourceSource
amountfloat
modelParticlesModelParticle[]
worldParticlesWorldParticle[]
viewDistancedouble
soundEventIndexint
typeString
sourceRefRef
projectileRef
commandSenderCommandSender
commandNameString

Static Methods

MethodReturns
CameraEffect(int cameraEffectIndex)record

Methods

MethodReturns
getDamageCauseIndex()int
setDamageCauseIndex(int damageCauseIndex)void
getCause()DamageCause
getSource()Source
setSource(@Nonnull Source source)void
getAmount()float
setAmount(float amount)void
getInitialAmount()float
getDeathMessage(@Nonnull Ref targetRef, @Nonnull ComponentAccessor componentAccessor)Message
getMetaStore()IMetaStoreImpl
Particles(@Nullable ModelParticle[] modelParticles, @Nullable WorldParticle[] worldParticles, double viewDistance)public
getModelParticles()ModelParticle[]
setModelParticles(@Nullable ModelParticle[] modelParticles)void
getWorldParticles()WorldParticle[]
setWorldParticles(@Nullable WorldParticle[] worldParticles)void
getViewDistance()double
setViewDistance(double viewDistance)void
SoundEffect(int soundEventIndex)public
setSoundEventIndex(int soundEventIndex)void
getSoundEventIndex()int
getEffectIndex()int
getDeathMessage(@Nonnull Damage info, @Nonnull Ref targetRef, @Nonnull ComponentAccessor componentAccessor)default Message
EnvironmentSource(@Nonnull String type)public
getType()String
EntitySource(@Nonnull Ref sourceRef)public
getRef()Ref
ProjectileSource(@Nonnull Ref shooter, @Nonnull Ref projectile)public
getProjectile()Ref
CommandSource(@Nonnull CommandSender commandSender, @Nonnull AbstractCommand cmd)public
CommandSource(@Nonnull CommandSender commandSender, @Nullable String commandName)public

Unofficial documentation · Any questions? Found a mistake? Have something you want documented? Join the Discord server at the top and let us know in #hytale!