net.minecraft.entity.damage

public class DamageSource

net.minecraft.world.damagesource.DamageSource
net.minecraft.class_1282
net.minecraft.entity.damage.DamageSource

Field summary

Modifier and TypeField
private final RegistryEntry<DamageType>
type
field_42291
type
private final Entity
causingEntity
field_42292
attacker
private final Entity
directEntity
field_42293
source
private final Vec3d
damageSourcePosition
field_42294
position

Constructor summary

ModifierConstructor
private (RegistryEntry<DamageType> type, Entity source, Entity attacker, Vec3d position)
public (RegistryEntry<DamageType> type, Entity source, Entity attacker)
public (RegistryEntry<DamageType> type, Vec3d position)
public (RegistryEntry<DamageType> type, Entity attacker)
public (RegistryEntry<DamageType> type)

Method summary

Modifier and TypeMethod
public float
getFoodExhaustion()
method_5528()
getExhaustion()
public boolean
isDirect()
method_60489()
isDirect()
public Entity
getDirectEntity()
method_5526()
getSource()
public Entity
getEntity()
method_5529()
getAttacker()
public ItemStack
getWeaponItem()
method_60948()
getWeaponStack()
public Text
getLocalizedDeathMessage(LivingEntity victim)
method_5506(class_1309 arg0)
getDeathMessage(LivingEntity killed)
public String
getMsgId()
method_5525()
getName()
public boolean
scalesWithDifficulty()
method_5514()
isScaledWithDifficulty()
public boolean
isCreativePlayer()
method_5530()
isSourceCreativePlayer()
public Vec3d
getSourcePosition()
method_5510()
getPosition()
public Vec3d
sourcePositionRaw()
method_48791()
getStoredPosition()
public boolean
is(TagKey<DamageType> tag)
method_48789(class_6862<class_8110> arg0)
isIn(TagKey<DamageType> tag)
public boolean
is(ResourceKey<DamageType> typeKey)
method_49708(class_5321<class_8110> arg0)
isOf(RegistryKey<DamageType> typeKey)
public DamageType
type()
method_48792()
getType()
public RegistryEntry<DamageType>
typeHolder()
method_48793()
getTypeRegistryEntry()