damage Source
public final static DamageSource damageSource(World $self, RegistryKey<DamageType> damageKey)(source)
Utility function to create a DamageSource.
Parameters
damage Key
The registry key of the damage type
public final static DamageSource damageSource(World $self, RegistryKey<DamageType> damageKey, Entity attacker)(source)
Utility function to create a DamageSource.
Parameters
damage Key
The registry key of the damage type
attacker
The causer entity of the damage
public final static DamageSource damageSource(World $self, RegistryKey<DamageType> damageKey, Entity source, Entity attacker)(source)
Utility function to create a DamageSource.
Parameters
damage Key
The registry key of the damage type
source
The causer entity of the damage
attacker
The owner of source