Uses of Class
net.minecraft.entity.damage.DamageSource
Package
Description
This and its subpackages make up the brain system used by some modern Minecraft entities,
such as villagers, piglins, and axolotls.
-
Uses of DamageSource in net.minecraft.advancement.criterion
Modifier and TypeMethodDescriptionboolean
EntityHurtPlayerCriterion.Conditions.matches
(ServerPlayerEntity player, DamageSource damageSource, float dealt, float taken, boolean blocked) boolean
PlayerHurtEntityCriterion.Conditions.matches
(ServerPlayerEntity player, LootContext entity, DamageSource damageSource, float dealt, float taken, boolean blocked) boolean
OnKilledCriterion.Conditions.test
(ServerPlayerEntity player, LootContext entity, DamageSource killingBlow) void
EntityHurtPlayerCriterion.trigger
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) void
OnKilledCriterion.trigger
(ServerPlayerEntity player, Entity entity, DamageSource killingDamage) void
PlayerHurtEntityCriterion.trigger
(ServerPlayerEntity player, Entity entity, DamageSource damage, float dealt, float taken, boolean blocked) -
Uses of DamageSource in net.minecraft.block
Modifier and TypeMethodDescriptionAnvilBlock.getDamageSource
(Entity attacker) default DamageSource
LandingBlock.getDamageSource
(Entity attacker) PointedDripstoneBlock.getDamageSource
(Entity attacker) -
Uses of DamageSource in net.minecraft.client.network
Modifier and TypeMethodDescriptionprotected void
ClientPlayerEntity.applyDamage
(DamageSource source, float amount) boolean
ClientPlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
OtherClientPlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity. -
Uses of DamageSource in net.minecraft.enchantment
Modifier and TypeMethodDescriptionstatic void
Enchantment.applyTargetedEffect
(TargetedEnchantmentEffectType<EnchantmentEntityEffectType> effectType, ServerWorld world, int level, EnchantmentEffectContext context, Entity user, DamageSource damageSource) static LootContext
Enchantment.createEnchantedDamageLootContext
(ServerWorld world, int level, Entity entity, DamageSource damageSource) static float
EnchantmentHelper.getArmorEffectiveness
(ServerWorld world, ItemStack stack, Entity user, DamageSource damageSource, float baseArmorEffectiveness) static float
EnchantmentHelper.getDamage
(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseDamage) static float
EnchantmentHelper.getEquipmentDropChance
(ServerWorld world, LivingEntity attacker, DamageSource damageSource, float baseEquipmentDropChance) static float
EnchantmentHelper.getProtectionAmount
(ServerWorld world, LivingEntity user, DamageSource damageSource) static float
EnchantmentHelper.getSmashDamagePerFallenBlock
(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseSmashDamagePerFallenBlock) boolean
Enchantment.hasDamageImmunityTo
(ServerWorld world, int level, Entity user, DamageSource damageSource) static boolean
EnchantmentHelper.isInvulnerableTo
(ServerWorld world, LivingEntity user, DamageSource damageSource) void
Enchantment.modifyArmorEffectiveness
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat armorEffectiveness) void
Enchantment.modifyDamage
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damage) void
Enchantment.modifyDamageProtection
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damageProtection) void
Enchantment.modifyKnockback
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat knockback) static float
EnchantmentHelper.modifyKnockback
(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseKnockback) void
Enchantment.modifySmashDamagePerFallenBlock
(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat smashDamagePerFallenBlock) private void
Enchantment.modifyValue
(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffectType>>> type, ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat value) void
Enchantment.onTargetDamaged
(ServerWorld world, int level, EnchantmentEffectContext context, EnchantmentEffectTarget target, Entity user, DamageSource damageSource) static void
EnchantmentHelper.onTargetDamaged
(ServerWorld world, Entity target, DamageSource damageSource) static void
EnchantmentHelper.onTargetDamaged
(ServerWorld world, Entity target, DamageSource damageSource, @Nullable ItemStack weapon) -
Uses of DamageSource in net.minecraft.enchantment.effect.entity
Modifier and TypeMethodDescriptionprivate @Nullable DamageSource
ExplodeEnchantmentEffectType.getDamageSource
(Entity user, Vec3d pos) -
Uses of DamageSource in net.minecraft.entity
Modifier and TypeMethodDescriptionprotected float
LivingEntity.applyArmorToDamage
(DamageSource source, float amount) protected void
LivingEntity.applyDamage
(DamageSource source, float amount) boolean
LivingEntity.blockedByShield
(DamageSource source) boolean
Entity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ExperienceOrbEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ItemEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
LivingEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
LivingEntity.damageArmor
(DamageSource source, float amount) protected void
LivingEntity.damageEquipment
(DamageSource source, float amount, EquipmentSlot[] slots) protected void
LivingEntity.damageHelmet
(DamageSource source, float amount) protected void
LivingEntity.drop
(ServerWorld world, DamageSource damageSource) protected void
LivingEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
LivingEntity.dropLoot
(DamageSource damageSource, boolean causedByPlayer) static float
DamageUtil.getDamageLeft
(LivingEntity armorWearer, float damageAmount, DamageSource damageSource, float armor, float armorToughness) protected @Nullable SoundEvent
LivingEntity.getHurtSound
(DamageSource source) protected float
LivingEntity.getKnockbackAgainst
(Entity target, DamageSource damageSource) boolean
Entity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
FallingBlockEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
LivingEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
Entity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.boolean
LivingEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.protected float
LivingEntity.modifyAppliedDamage
(DamageSource source, float amount) Returns the modified damage value for the applieddamage
.void
Entity.onDamaged
(DamageSource damageSource) void
LivingEntity.onDamaged
(DamageSource damageSource) void
LivingEntity.onDeath
(DamageSource damageSource) protected void
LivingEntity.playHurtSound
(DamageSource damageSource) private boolean
LivingEntity.tryUseTotem
(DamageSource source) void
Entity.updateKilledAdvancementCriterion
(Entity entityKilled, int score, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.ai.brain
Modifier and TypeFieldDescriptionstatic final MemoryModuleType
<DamageSource> MemoryModuleType.HURT_BY
-
Uses of DamageSource in net.minecraft.entity.boss
Modifier and TypeMethodDescriptionboolean
WitherEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
WitherEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected SoundEvent
WitherEntity.getHurtSound
(DamageSource source) -
Uses of DamageSource in net.minecraft.entity.boss.dragon
Modifier and TypeMethodDescriptionvoid
EnderDragonEntity.crystalDestroyed
(EndCrystalEntity endCrystal, BlockPos pos, DamageSource source) void
EnderDragonFight.crystalDestroyed
(EndCrystalEntity enderCrystal, DamageSource source) boolean
EnderDragonEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
EnderDragonPart.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
EnderDragonEntity.damagePart
(EnderDragonPart part, DamageSource source, float amount) protected SoundEvent
EnderDragonEntity.getHurtSound
(DamageSource source) protected boolean
EnderDragonEntity.parentDamage
(DamageSource source, float amount) -
Uses of DamageSource in net.minecraft.entity.boss.dragon.phase
Modifier and TypeMethodDescriptionvoid
AbstractPhase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) void
HoldingPatternPhase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) void
Phase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) float
AbstractPhase.modifyDamageTaken
(DamageSource damageSource, float damage) float
AbstractSittingPhase.modifyDamageTaken
(DamageSource damageSource, float damage) float
Phase.modifyDamageTaken
(DamageSource damageSource, float damage) -
Uses of DamageSource in net.minecraft.entity.damage
Modifier and TypeFieldDescriptionprivate final DamageSource
DamageSources.cactus
private final DamageSource
DamageSources.campfire
private final DamageSource
DamageSources.cramming
private final DamageSource
DamageRecord.damageSource
The field for thedamageSource
record component.private final DamageSource
DamageSources.dragonBreath
private final DamageSource
DamageSources.drown
private final DamageSource
DamageSources.dryOut
private final DamageSource
DamageSources.fall
private final DamageSource
DamageSources.flyIntoWall
private final DamageSource
DamageSources.freeze
private final DamageSource
DamageSources.generic
private final DamageSource
DamageSources.genericKill
private final DamageSource
DamageSources.hotFloor
private final DamageSource
DamageSources.inFire
private final DamageSource
DamageSources.inWall
private final DamageSource
DamageSources.lava
private final DamageSource
DamageSources.lightningBolt
private final DamageSource
DamageSources.magic
private final DamageSource
DamageSources.onFire
private final DamageSource
DamageSources.outOfWorld
private final DamageSource
DamageSources.outsideBorder
private final DamageSource
DamageSources.stalagmite
private final DamageSource
DamageSources.starve
private final DamageSource
DamageSources.sweetBerryBush
private final DamageSource
DamageSources.wither
Modifier and TypeMethodDescriptionDamageSources.arrow
(PersistentProjectileEntity source, @Nullable Entity attacker) DamageSources.badRespawnPoint
(Vec3d position) DamageSources.cactus()
DamageSources.campfire()
DamageSources.cramming()
private DamageSource
DamageSources.create
(RegistryKey<DamageType> key) private DamageSource
DamageSources.create
(RegistryKey<DamageType> key, @Nullable Entity attacker) private DamageSource
DamageSources.create
(RegistryKey<DamageType> key, @Nullable Entity source, @Nullable Entity attacker) DamageRecord.damageSource()
Returns the value of thedamageSource
record component.DamageSources.dragonBreath()
DamageSources.drown()
DamageSources.dryOut()
DamageSources.fall()
DamageSources.fallingAnvil
(Entity attacker) DamageSources.fallingBlock
(Entity attacker) DamageSources.fallingStalactite
(Entity attacker) DamageSources.fireball
(AbstractFireballEntity source, @Nullable Entity attacker) DamageSources.fireworks
(FireworkRocketEntity source, @Nullable Entity attacker) DamageSources.flyIntoWall()
DamageSources.freeze()
DamageSources.generic()
DamageSources.genericKill()
DamageSources.hotFloor()
DamageSources.indirectMagic
(Entity source, @Nullable Entity attacker) DamageSources.inFire()
DamageSources.inWall()
DamageSources.lava()
DamageSources.lightningBolt()
DamageSources.magic()
DamageSources.mobAttack
(LivingEntity attacker) DamageSources.mobAttackNoAggro
(LivingEntity attacker) DamageSources.mobProjectile
(Entity source, @Nullable LivingEntity attacker) DamageSources.onFire()
DamageSources.outOfWorld()
DamageSources.outsideBorder()
DamageSources.playerAttack
(PlayerEntity attacker) DamageSources.spit
(Entity source, @Nullable LivingEntity attacker) DamageSources.stalagmite()
DamageSources.starve()
DamageSources.sting
(LivingEntity attacker) DamageSources.sweetBerryBush()
DamageSources.windCharge
(Entity source, @Nullable LivingEntity attacker) DamageSources.wither()
DamageSources.witherSkull
(WitherSkullEntity source, Entity attacker) Modifier and TypeMethodDescriptionprivate static boolean
DamageTracker.isAttackerLiving
(DamageSource damageSource) void
DamageTracker.onDamage
(DamageSource damageSource, float damage) ModifierConstructorDescriptionDamageRecord
(DamageSource damageSource, float float2, @Nullable FallLocation fallLocation, float float3) -
Uses of DamageSource in net.minecraft.entity.decoration
Modifier and TypeMethodDescriptionprivate void
ArmorStandEntity.breakAndDropItem
(ServerWorld world, DamageSource damageSource) private void
EndCrystalEntity.crystalDestroyed
(DamageSource source) boolean
ArmorStandEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
BlockAttachedEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
EndCrystalEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ItemFrameEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected @Nullable SoundEvent
ArmorStandEntity.getHurtSound
(DamageSource source) private void
ArmorStandEntity.onBreak
(ServerWorld world, DamageSource damageSource) private void
ArmorStandEntity.updateHealth
(ServerWorld world, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.entity.effect
Modifier and TypeMethodDescriptionvoid
InfestedStatusEffect.onEntityDamage
(LivingEntity entity, int amplifier, DamageSource source, float amount) void
StatusEffect.onEntityDamage
(LivingEntity entity, int amplifier, DamageSource source, float amount) void
StatusEffectInstance.onEntityDamage
(LivingEntity entity, DamageSource source, float amount) -
Uses of DamageSource in net.minecraft.entity.mob
Modifier and TypeMethodDescriptionboolean
EndermanEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
GhastEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
GuardianEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
HoglinEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
PiglinBruteEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
PiglinEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ShulkerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
SilverfishEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
WardenEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ZoglinEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ZombieEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.private boolean
EndermanEntity.damageFromPotion
(DamageSource source, PotionEntity potion, float amount) protected void
CreeperEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
EndermanEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
MobEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
PiglinEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
SkeletonEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
WitherSkeletonEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
ZombieEntity.dropEquipment
(ServerWorld world, DamageSource source, boolean causedByPlayer) protected void
MobEntity.dropLoot
(DamageSource damageSource, boolean causedByPlayer) protected SoundEvent
BlazeEntity.getHurtSound
(DamageSource source) protected SoundEvent
BoggedEntity.getHurtSound
(DamageSource source) protected SoundEvent
BreezeEntity.getHurtSound
(DamageSource source) protected SoundEvent
CreeperEntity.getHurtSound
(DamageSource source) protected SoundEvent
DrownedEntity.getHurtSound
(DamageSource source) protected SoundEvent
ElderGuardianEntity.getHurtSound
(DamageSource source) protected SoundEvent
EndermanEntity.getHurtSound
(DamageSource source) protected SoundEvent
EndermiteEntity.getHurtSound
(DamageSource source) protected SoundEvent
EvokerEntity.getHurtSound
(DamageSource source) protected SoundEvent
GhastEntity.getHurtSound
(DamageSource source) protected SoundEvent
GuardianEntity.getHurtSound
(DamageSource source) protected SoundEvent
HoglinEntity.getHurtSound
(DamageSource source) protected SoundEvent
HostileEntity.getHurtSound
(DamageSource source) protected SoundEvent
HuskEntity.getHurtSound
(DamageSource source) protected SoundEvent
IllusionerEntity.getHurtSound
(DamageSource source) protected SoundEvent
MagmaCubeEntity.getHurtSound
(DamageSource source) protected SoundEvent
PhantomEntity.getHurtSound
(DamageSource source) protected SoundEvent
PiglinBruteEntity.getHurtSound
(DamageSource source) protected SoundEvent
PiglinEntity.getHurtSound
(DamageSource source) protected SoundEvent
PillagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
RavagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
ShulkerEntity.getHurtSound
(DamageSource source) protected SoundEvent
SilverfishEntity.getHurtSound
(DamageSource source) protected SoundEvent
SkeletonEntity.getHurtSound
(DamageSource source) protected SoundEvent
SkeletonHorseEntity.getHurtSound
(DamageSource source) protected SoundEvent
SlimeEntity.getHurtSound
(DamageSource source) protected SoundEvent
SpiderEntity.getHurtSound
(DamageSource source) protected SoundEvent
StrayEntity.getHurtSound
(DamageSource source) protected SoundEvent
VexEntity.getHurtSound
(DamageSource source) protected SoundEvent
VindicatorEntity.getHurtSound
(DamageSource source) protected SoundEvent
WardenEntity.getHurtSound
(DamageSource source) protected SoundEvent
WitchEntity.getHurtSound
(DamageSource source) protected SoundEvent
WitherSkeletonEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZoglinEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZombieEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZombieHorseEntity.getHurtSound
(DamageSource source) ZombieVillagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZombifiedPiglinEntity.getHurtSound
(DamageSource source) boolean
BreezeEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
CreeperEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.private static boolean
GhastEntity.isFireballFromPlayer
(DamageSource damageSource) Returns whetherdamageSource
is caused by a player's fireball.boolean
BreezeEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.boolean
GhastEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.boolean
WardenEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.protected float
WitchEntity.modifyAppliedDamage
(DamageSource source, float amount) Returns the modified damage value for the applieddamage
.protected void
MobEntity.playHurtSound
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.passive
Modifier and TypeMethodDescriptionprotected void
AnimalEntity.applyDamage
(DamageSource source, float amount) protected void
ArmadilloEntity.applyDamage
(DamageSource source, float amount) protected void
CamelEntity.applyDamage
(DamageSource source, float amount) protected void
WolfEntity.applyDamage
(DamageSource source, float amount) boolean
AbstractHorseEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
AllayEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ArmadilloEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
AxolotlEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
BatEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
BeeEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
GlowSquidEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
IronGolemEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
PandaEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ParrotEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
SquidEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
WolfEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
WolfEntity.damageArmor
(DamageSource source, float amount) protected void
FoxEntity.drop
(ServerWorld world, DamageSource damageSource) protected SoundEvent
AllayEntity.getHurtSound
(DamageSource source) protected SoundEvent
ArmadilloEntity.getHurtSound
(DamageSource source) protected SoundEvent
AxolotlEntity.getHurtSound
(DamageSource source) protected SoundEvent
BatEntity.getHurtSound
(DamageSource source) protected SoundEvent
BeeEntity.getHurtSound
(DamageSource source) protected SoundEvent
CamelEntity.getHurtSound
(DamageSource source) protected SoundEvent
CatEntity.getHurtSound
(DamageSource source) protected SoundEvent
ChickenEntity.getHurtSound
(DamageSource source) protected SoundEvent
CodEntity.getHurtSound
(DamageSource source) protected SoundEvent
CowEntity.getHurtSound
(DamageSource source) protected SoundEvent
DolphinEntity.getHurtSound
(DamageSource source) protected SoundEvent
DonkeyEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
FoxEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
FrogEntity.getHurtSound
(DamageSource source) protected SoundEvent
GlowSquidEntity.getHurtSound
(DamageSource source) protected SoundEvent
GoatEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
GolemEntity.getHurtSound
(DamageSource source) protected SoundEvent
HorseEntity.getHurtSound
(DamageSource source) protected SoundEvent
IronGolemEntity.getHurtSound
(DamageSource source) protected SoundEvent
LlamaEntity.getHurtSound
(DamageSource source) protected SoundEvent
MuleEntity.getHurtSound
(DamageSource source) protected SoundEvent
OcelotEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
PandaEntity.getHurtSound
(DamageSource source) protected SoundEvent
ParrotEntity.getHurtSound
(DamageSource source) protected SoundEvent
PigEntity.getHurtSound
(DamageSource source) protected SoundEvent
PolarBearEntity.getHurtSound
(DamageSource source) protected SoundEvent
PufferfishEntity.getHurtSound
(DamageSource source) protected SoundEvent
RabbitEntity.getHurtSound
(DamageSource source) protected SoundEvent
SalmonEntity.getHurtSound
(DamageSource source) protected SoundEvent
SheepEntity.getHurtSound
(DamageSource source) protected SoundEvent
SnifferEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
SnowGolemEntity.getHurtSound
(DamageSource source) protected SoundEvent
SquidEntity.getHurtSound
(DamageSource source) protected SoundEvent
StriderEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
TadpoleEntity.getHurtSound
(DamageSource source) protected SoundEvent
TropicalFishEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
TurtleEntity.getHurtSound
(DamageSource source) protected SoundEvent
VillagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
WanderingTraderEntity.getHurtSound
(DamageSource source) protected SoundEvent
WolfEntity.getHurtSound
(DamageSource source) boolean
AbstractHorseEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
LlamaEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.void
IronGolemEntity.onDeath
(DamageSource damageSource) void
MerchantEntity.onDeath
(DamageSource damageSource) void
SnifferEntity.onDeath
(DamageSource damageSource) void
TameableEntity.onDeath
(DamageSource damageSource) void
VillagerEntity.onDeath
(DamageSource damageSource) void
WolfEntity.onDeath
(DamageSource damageSource) private boolean
WolfEntity.shouldArmorAbsorbDamage
(DamageSource source) -
Uses of DamageSource in net.minecraft.entity.player
Modifier and TypeMethodDescriptionprotected void
PlayerEntity.applyDamage
(DamageSource source, float amount) boolean
PlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
PlayerEntity.damageArmor
(DamageSource source, float amount) protected void
PlayerEntity.damageHelmet
(DamageSource source, float amount) protected float
PlayerEntity.getDamageAgainst
(Entity target, float baseDamage, DamageSource damageSource) protected SoundEvent
PlayerEntity.getHurtSound
(DamageSource source) boolean
PlayerEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
PlayerEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.void
PlayerEntity.onDeath
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.projectile
Modifier and TypeMethodDescriptionboolean
DragonFireballEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ExplosiveProjectileEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ShulkerBulletEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
SmallFireballEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
WitherSkullEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.FireworkRocketEntity.getKnockback
(LivingEntity target, DamageSource source) ProjectileEntity.getKnockback
(LivingEntity target, DamageSource source) protected void
PersistentProjectileEntity.knockback
(LivingEntity target, DamageSource source) -
Uses of DamageSource in net.minecraft.entity.projectile.thrown
Modifier and TypeMethodDescriptionPotionEntity.getKnockback
(LivingEntity target, DamageSource source) -
Uses of DamageSource in net.minecraft.entity.raid
Modifier and TypeMethodDescriptionboolean
RaiderEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.void
RaiderEntity.onDeath
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.vehicle
Modifier and TypeMethodDescriptionboolean
TntMinecartEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
VehicleEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
TntMinecartEntity.explode
(@Nullable DamageSource damageSource, double power) boolean
TntMinecartEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.void
ChestBoatEntity.killAndDropSelf
(DamageSource source) void
StorageMinecartEntity.killAndDropSelf
(DamageSource source) void
TntMinecartEntity.killAndDropSelf
(DamageSource source) protected void
VehicleEntity.killAndDropSelf
(DamageSource source) default void
VehicleInventory.onBroken
(DamageSource source, World world, Entity vehicle) (package private) boolean
TntMinecartEntity.shouldAlwaysKill
(DamageSource source) (package private) boolean
VehicleEntity.shouldAlwaysKill
(DamageSource source) private static boolean
TntMinecartEntity.shouldDetonate
(DamageSource source) -
Uses of DamageSource in net.minecraft.item
Modifier and TypeMethodDescriptionfloat
Item.getBonusAttackDamage
(Entity target, float baseAttackDamage, DamageSource damageSource) float
MaceItem.getBonusAttackDamage
(Entity target, float baseAttackDamage, DamageSource damageSource) boolean
ItemStack.takesDamageFrom
(DamageSource source) -
Uses of DamageSource in net.minecraft.loot.context
Modifier and TypeFieldDescriptionstatic final LootContextParameter
<DamageSource> LootContextParameters.DAMAGE_SOURCE
-
Uses of DamageSource in net.minecraft.network.packet.s2c.play
-
Uses of DamageSource in net.minecraft.predicate
Modifier and TypeMethodDescriptionboolean
DamagePredicate.test
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) -
Uses of DamageSource in net.minecraft.predicate.entity
Modifier and TypeMethodDescriptionboolean
DamageSourcePredicate.test
(ServerPlayerEntity player, DamageSource damageSource) boolean
DamageSourcePredicate.test
(ServerWorld world, Vec3d pos, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.command
Modifier and TypeMethodDescriptionprivate static int
DamageCommand.execute
(ServerCommandSource source, Entity target, float amount, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.network
Modifier and TypeMethodDescriptionboolean
ServerPlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected float
ServerPlayerEntity.getDamageAgainst
(Entity target, float baseDamage, DamageSource damageSource) boolean
ServerPlayerEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.void
ServerPlayerEntity.onDeath
(DamageSource damageSource) void
ServerPlayerEntity.updateKilledAdvancementCriterion
(Entity entityKilled, int score, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.world
Modifier and TypeMethodDescriptionServerWorld.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.void
ServerWorld.sendEntityDamage
(Entity entity, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world
Modifier and TypeMethodDescriptionWorld.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType) World.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, boolean particles, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent) World.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.World.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, Vec3d pos, float power, boolean createFire, World.ExplosionSourceType explosionSourceType) Creates an explosion.void
World.sendEntityDamage
(Entity entity, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.explosion
Modifier and TypeMethodDescriptionstatic DamageSource
Explosion.createDamageSource
(World world, @Nullable Entity source) ModifierConstructorDescriptionExplosion
(World world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, Explosion.DestructionType destructionType, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent)