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.block.entity
Modifier and TypeMethodDescriptionvoid
CreakingHeartBlockEntity.onBreak
(@Nullable DamageSource damageSource) -
Uses of DamageSource in net.minecraft.client.network
Modifier and TypeMethodDescriptionboolean
OtherClientPlayerEntity.clientDamage
(DamageSource source) -
Uses of DamageSource in net.minecraft.client.world
Modifier and TypeMethodDescriptionvoid
ClientWorld.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion. -
Uses of DamageSource in net.minecraft.component.type
Modifier and TypeMethodDescriptionboolean
DamageResistantComponent.resists
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.enchantment
Modifier and TypeMethodDescriptionstatic void
Enchantment.applyTargetedEffect
(TargetedEnchantmentEffect<EnchantmentEntityEffect> effect, 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<EnchantmentValueEffect>>> 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) static void
EnchantmentHelper.onTargetDamaged
(ServerWorld world, Entity target, DamageSource damageSource, @Nullable ItemStack weapon, Consumer<Item> breakCallback) -
Uses of DamageSource in net.minecraft.enchantment.effect.entity
Modifier and TypeMethodDescriptionprivate @Nullable DamageSource
ExplodeEnchantmentEffect.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
(ServerWorld world, DamageSource source, float amount) boolean
LivingEntity.blockedByShield
(DamageSource source) boolean
Entity.clientDamage
(DamageSource source) final boolean
ExperienceOrbEntity.clientDamage
(DamageSource source) final boolean
ItemEntity.clientDamage
(DamageSource source) final boolean
AreaEffectCloudEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.abstract boolean
Entity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
ExperienceOrbEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
EyeOfEnderEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
FallingBlockEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
ItemEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
LightningEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
LivingEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
MarkerEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
OminousItemSpawnerEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
TntEntity.damage
(ServerWorld world, 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
(ServerWorld world, 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.protected final boolean
Entity.isAlwaysInvulnerableTo
(DamageSource damageSource) boolean
LivingEntity.isInvulnerableTo
(ServerWorld world, DamageSource source) 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) final void
Entity.serverDamage
(DamageSource source, float amount) Deprecated.final boolean
Entity.sidedDamage
(DamageSource source, float amount) Deprecated.private boolean
LivingEntity.tryUseDeathProtector
(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
(ServerWorld world, 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
(ServerWorld world, EndCrystalEntity crystal, BlockPos pos, DamageSource source) void
EnderDragonFight.crystalDestroyed
(EndCrystalEntity enderCrystal, DamageSource source) boolean
EnderDragonEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
EnderDragonPart.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
EnderDragonEntity.damagePart
(ServerWorld world, EnderDragonPart part, DamageSource source, float amount) protected SoundEvent
EnderDragonEntity.getHurtSound
(DamageSource source) protected void
EnderDragonEntity.parentDamage
(ServerWorld world, 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.enderPearl
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.enderPearl()
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 static boolean
ItemFrameEntity.canDamageWhenFixed
(DamageSource damageSource) boolean
BlockAttachedEntity.clientDamage
(DamageSource source) final boolean
EndCrystalEntity.clientDamage
(DamageSource source) boolean
ItemFrameEntity.clientDamage
(DamageSource source) private void
EndCrystalEntity.crystalDestroyed
(ServerWorld world, DamageSource source) boolean
ArmorStandEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
BlockAttachedEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
DisplayEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
EndCrystalEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final boolean
InteractionEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ItemFrameEntity.damage
(ServerWorld world, 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 boolean
ItemFrameEntity.shouldDropHeldStackWhenDamaged
(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
(ServerWorld world, LivingEntity entity, int amplifier, DamageSource source, float amount) void
StatusEffect.onEntityDamage
(ServerWorld world, LivingEntity entity, int amplifier, DamageSource source, float amount) void
StatusEffectInstance.onEntityDamage
(ServerWorld world, LivingEntity entity, DamageSource source, float amount) -
Uses of DamageSource in net.minecraft.entity.mob
Modifier and TypeMethodDescriptionboolean
EndermanEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
EvokerFangsEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
GhastEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
GuardianEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
HoglinEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
PiglinBruteEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
PiglinEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ShulkerEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
SilverfishEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
TransientCreakingEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
WardenEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ZoglinEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ZombieEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.void
TransientCreakingEntity.damageFromHeart
(@Nullable DamageSource damageSource) private boolean
EndermanEntity.damageFromPotion
(ServerWorld world, 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
(ServerWorld world, DamageSource damageSource, boolean causedByPlayer) protected SoundEvent
BlazeEntity.getHurtSound
(DamageSource source) protected SoundEvent
BoggedEntity.getHurtSound
(DamageSource source) protected SoundEvent
BreezeEntity.getHurtSound
(DamageSource source) protected SoundEvent
CreakingEntity.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
(ServerWorld world, DamageSource source) boolean
GhastEntity.isInvulnerableTo
(ServerWorld world, DamageSource source) boolean
WardenEntity.isInvulnerableTo
(ServerWorld world, DamageSource source) 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
(ServerWorld world, DamageSource source, float amount) protected void
ArmadilloEntity.applyDamage
(ServerWorld world, DamageSource source, float amount) protected void
CamelEntity.applyDamage
(ServerWorld world, DamageSource source, float amount) protected void
WolfEntity.applyDamage
(ServerWorld world, DamageSource source, float amount) boolean
AbstractHorseEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
AllayEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ArmadilloEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
AxolotlEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
BatEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
BeeEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
GlowSquidEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
IronGolemEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
PandaEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ParrotEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
SquidEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
WolfEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.protected void
HorseEntity.damageArmor
(DamageSource source, float amount) 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
(ServerWorld world, DamageSource source, float amount) boolean
PlayerEntity.damage
(ServerWorld world, 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
(ServerWorld world, DamageSource source) void
PlayerEntity.onDeath
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.projectile
Modifier and TypeMethodDescriptionboolean
ShulkerBulletEntity.clientDamage
(DamageSource source) boolean
ExplosiveProjectileEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ProjectileEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
ShulkerBulletEntity.damage
(ServerWorld world, 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
(ServerWorld world, 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
VehicleEntity.clientDamage
(DamageSource source) boolean
TntMinecartEntity.damage
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.boolean
VehicleEntity.damage
(ServerWorld world, 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
AbstractChestBoatEntity.killAndDropSelf
(ServerWorld world, DamageSource damageSource) void
StorageMinecartEntity.killAndDropSelf
(ServerWorld world, DamageSource damageSource) void
TntMinecartEntity.killAndDropSelf
(ServerWorld world, DamageSource damageSource) protected void
VehicleEntity.killAndDropSelf
(ServerWorld world, DamageSource damageSource) default void
VehicleInventory.onBroken
(DamageSource source, ServerWorld 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 TypeMethodDescriptionItem.getDamageSource
(LivingEntity user) MaceItem.getDamageSource
(LivingEntity user) 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 ContextParameter
<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
(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.protected float
ServerPlayerEntity.getDamageAgainst
(Entity target, float baseDamage, DamageSource damageSource) boolean
ServerPlayerEntity.isInvulnerableTo
(ServerWorld world, DamageSource source) void
ServerPlayerEntity.onDeath
(DamageSource damageSource) void
ServerPlayerEntity.updateKilledAdvancementCriterion
(Entity entityKilled, int score, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.world
Modifier and TypeMethodDescriptionvoid
ServerWorld.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.void
ServerWorld.sendEntityDamage
(Entity entity, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.test
Modifier and TypeMethodDescriptionvoid
TestContext.damage
(Entity entity, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world
Modifier and TypeMethodDescriptionvoid
World.createExplosion
(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType) abstract void
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 smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.void
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) ModifierConstructorDescriptionExplosionImpl
(ServerWorld world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, Vec3d pos, float power, boolean createFire, Explosion.DestructionType destructionType)