Uses of Class
net.minecraft.world.damagesource.DamageSource
Packages that use DamageSource
Package
Description
-
Uses of DamageSource in net.minecraft.advancements.critereon
Methods in net.minecraft.advancements.critereon with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
DamagePredicate.matches
(ServerPlayer player, DamageSource source, float dealtDamage, float takenDamage, boolean blocked) boolean
DamageSourcePredicate.matches
(ServerLevel level, Vec3 position, DamageSource source) boolean
DamageSourcePredicate.matches
(ServerPlayer player, DamageSource source) boolean
EntityHurtPlayerTrigger.TriggerInstance.matches
(ServerPlayer player, DamageSource source, float dealtDamage, float takenDamage, boolean blocked) boolean
KilledTrigger.TriggerInstance.matches
(ServerPlayer player, LootContext context, DamageSource source) boolean
PlayerHurtEntityTrigger.TriggerInstance.matches
(ServerPlayer player, LootContext context, DamageSource damage, float dealt, float taken, boolean blocked) void
EntityHurtPlayerTrigger.trigger
(ServerPlayer player, DamageSource source, float dealtDamage, float takenDamage, boolean blocked) void
KilledTrigger.trigger
(ServerPlayer player, Entity entity, DamageSource source) void
PlayerHurtEntityTrigger.trigger
(ServerPlayer player, Entity entity, DamageSource source, float amountDealt, float amountTaken, boolean blocked) -
Uses of DamageSource in net.minecraft.client.player
Methods in net.minecraft.client.player with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
LocalPlayer.actuallyHurt
(DamageSource damageSrc, float damageAmount) Deals damage to the entity.boolean
LocalPlayer.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
RemotePlayer.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.network.protocol.game
Methods in net.minecraft.network.protocol.game that return DamageSourceModifier and TypeMethodDescriptionConstructors in net.minecraft.network.protocol.game with parameters of type DamageSourceModifierConstructorDescriptionClientboundDamageEventPacket
(Entity p_270474_, DamageSource p_270781_) -
Uses of DamageSource in net.minecraft.server.commands
Methods in net.minecraft.server.commands with parameters of type DamageSourceModifier and TypeMethodDescriptionprivate static int
DamageCommand.damage
(CommandSourceStack source, Entity target, float amount, DamageSource damageType) -
Uses of DamageSource in net.minecraft.server.level
Methods in net.minecraft.server.level with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
ServerPlayer.awardKillScore
(Entity killed, int scoreValue, DamageSource damageSource) void
ServerLevel.broadcastDamageEvent
(Entity entity, DamageSource damageSource) void
ServerPlayer.die
(DamageSource cause) Called when the mob's health reaches 0.ServerLevel.explode
(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) protected float
ServerPlayer.getEnchantedDamage
(Entity entity, float damage, DamageSource damageSource) boolean
ServerPlayer.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
ServerPlayer.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource. -
Uses of DamageSource in net.minecraft.world.damagesource
Fields in net.minecraft.world.damagesource declared as DamageSourceModifier and TypeFieldDescriptionprivate final DamageSource
DamageSources.cactus
private final DamageSource
DamageSources.campfire
private final DamageSource
DamageSources.cramming
private final DamageSource
DamageSources.dragonBreath
private final DamageSource
DamageSources.drown
private final DamageSource
DamageSources.dryOut
private final DamageSource
DamageSources.fall
private final DamageSource
DamageSources.fellOutOfWorld
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.outsideBorder
private final DamageSource
CombatEntry.source
The field for thesource
record component.private final DamageSource
DamageSources.stalagmite
private final DamageSource
DamageSources.starve
private final DamageSource
DamageSources.sweetBerryBush
private final DamageSource
DamageSources.wither
Methods in net.minecraft.world.damagesource that return DamageSourceModifier and TypeMethodDescriptionDamageSources.arrow
(AbstractArrow arrow, Entity shooter) DamageSources.badRespawnPointExplosion
(Vec3 position) DamageSources.cactus()
DamageSources.campfire()
DamageSources.cramming()
DamageSources.dragonBreath()
DamageSources.drown()
DamageSources.dryOut()
DamageSources.fall()
DamageSources.fallingBlock
(Entity entity) DamageSources.fallingStalactite
(Entity entity) DamageSources.fellOutOfWorld()
DamageSources.fireworks
(FireworkRocketEntity firework, Entity shooter) DamageSources.flyIntoWall()
DamageSources.freeze()
DamageSources.generic()
DamageSources.genericKill()
DamageSources.hotFloor()
DamageSources.indirectMagic
(Entity causingEntity, Entity directEntity) DamageSources.inFire()
DamageSources.inWall()
DamageSources.lava()
DamageSources.lightningBolt()
DamageSources.magic()
DamageSources.mobAttack
(LivingEntity mob) DamageSources.mobProjectile
(Entity projectile, LivingEntity thrower) DamageSources.noAggroMobAttack
(LivingEntity mob) DamageSources.onFire()
DamageSources.outOfBorder()
DamageSources.playerAttack
(Player player) CombatEntry.source()
Returns the value of thesource
record component.DamageSources.source
(ResourceKey<DamageType> damageTypeKey) DamageSources.source
(ResourceKey<DamageType> damageTypeKey, Entity entity) DamageSources.source
(ResourceKey<DamageType> damageTypeKey, Entity causingEntity, Entity directEntity) DamageSources.spit
(Entity spit, LivingEntity thrower) DamageSources.stalagmite()
DamageSources.starve()
DamageSources.sting
(LivingEntity entity) DamageSources.sweetBerryBush()
DamageSources.windCharge
(Entity windCharge, LivingEntity thrower) DamageSources.wither()
DamageSources.witherSkull
(WitherSkull witherSkull, Entity shooter) Methods in net.minecraft.world.damagesource with parameters of type DamageSourceModifier and TypeMethodDescriptionstatic float
CombatRules.getDamageAfterAbsorb
(LivingEntity entity, float damage, DamageSource damageSource, float armorValue, float armorToughness) void
CombatTracker.recordDamage
(DamageSource source, float damage) private static boolean
CombatTracker.shouldEnterCombat
(DamageSource source) Constructors in net.minecraft.world.damagesource with parameters of type DamageSourceModifierConstructorDescriptionCombatEntry
(DamageSource source, float damage, FallLocation fallLocation, float fallDistance) Creates an instance of aCombatEntry
record class. -
Uses of DamageSource in net.minecraft.world.effect
Methods in net.minecraft.world.effect with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
InfestedMobEffect.onMobHurt
(LivingEntity livingEntity, int amplifier, DamageSource damageSource, float amount) void
MobEffect.onMobHurt
(LivingEntity livingEntity, int amplifier, DamageSource damageSource, float amount) void
MobEffectInstance.onMobHurt
(LivingEntity livingEntity, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world.entity
Fields in net.minecraft.world.entity declared as DamageSourceMethods in net.minecraft.world.entity that return DamageSourceMethods in net.minecraft.world.entity with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
LivingEntity.actuallyHurt
(DamageSource damageSource, float damageAmount) Deals damage to the entity.void
Entity.awardKillScore
(Entity killed, int scoreValue, DamageSource source) boolean
Entity.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) boolean
LivingEntity.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) private boolean
LivingEntity.checkTotemDeathProtection
(DamageSource damageSource) void
LivingEntity.die
(DamageSource damageSource) Called when the mob's health reaches 0.void
TamableAnimal.die
(DamageSource cause) Called when the mob's health reaches 0.protected void
LivingEntity.doHurtEquipment
(DamageSource damageSource, float damageAmount, EquipmentSlot... slots) protected void
LivingEntity.dropAllDeathLoot
(ServerLevel p_level, DamageSource damageSource) protected void
LivingEntity.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected void
Mob.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected void
LivingEntity.dropFromLootTable
(DamageSource damageSource, boolean hitByPlayer) protected void
Mob.dropFromLootTable
(DamageSource damageSource, boolean attackedRecently) protected float
LivingEntity.getDamageAfterArmorAbsorb
(DamageSource damageSource, float damageAmount) Reduces damage, depending on armorprotected float
LivingEntity.getDamageAfterMagicAbsorb
(DamageSource damageSource, float damageAmount) Reduces damage, depending on potionsprotected SoundEvent
GlowSquid.getHurtSound
(DamageSource damageSource) protected SoundEvent
LivingEntity.getHurtSound
(DamageSource damageSource) protected float
LivingEntity.getKnockback
(Entity attacker, DamageSource damageSource) void
Entity.handleDamageEvent
(DamageSource damageSource) void
LivingEntity.handleDamageEvent
(DamageSource damageSource) boolean
Entity.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
ExperienceOrb.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
GlowSquid.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
LivingEntity.hurt
(DamageSource source, float amount) Called when the entity is attacked.protected void
LivingEntity.hurtArmor
(DamageSource damageSource, float damageAmount) protected void
LivingEntity.hurtHelmet
(DamageSource damageSource, float damageAmount) boolean
LivingEntity.isDamageSourceBlocked
(DamageSource damageSource) Determines whether the entity can block the damage source based on the damage source's location, whether the damage source is blockable, and whether the entity is blocking.boolean
Entity.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource.boolean
LivingEntity.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource.protected void
LivingEntity.playHurtSound
(DamageSource source) protected void
Mob.playHurtSound
(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.ai.memory
Fields in net.minecraft.world.entity.ai.memory with type parameters of type DamageSourceModifier and TypeFieldDescriptionstatic final MemoryModuleType
<DamageSource> MemoryModuleType.HURT_BY
-
Uses of DamageSource in net.minecraft.world.entity.ambient
Methods in net.minecraft.world.entity.ambient with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Bat.getHurtSound
(DamageSource damageSource) boolean
Bat.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.animal
Methods in net.minecraft.world.entity.animal with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
Animal.actuallyHurt
(DamageSource damageSource, float damageAmount) Deals damage to the entity.protected void
Wolf.actuallyHurt
(DamageSource damageSource, float damageAmount) Deals damage to the entity.private boolean
Wolf.canArmorAbsorb
(DamageSource damageSource) void
IronGolem.die
(DamageSource cause) Called when the mob's health reaches 0.void
Wolf.die
(DamageSource cause) Called when the mob's health reaches 0.protected void
Fox.dropAllDeathLoot
(ServerLevel level, DamageSource damageSource) protected SoundEvent
AbstractGolem.getHurtSound
(DamageSource damageSource) protected SoundEvent
Bee.getHurtSound
(DamageSource damageSource) protected SoundEvent
Cat.getHurtSound
(DamageSource damageSource) protected SoundEvent
Chicken.getHurtSound
(DamageSource damageSource) protected SoundEvent
Cod.getHurtSound
(DamageSource damageSource) protected SoundEvent
Cow.getHurtSound
(DamageSource damageSource) protected SoundEvent
Dolphin.getHurtSound
(DamageSource damageSource) protected SoundEvent
Fox.getHurtSound
(DamageSource damageSource) protected SoundEvent
IronGolem.getHurtSound
(DamageSource damageSource) protected SoundEvent
Ocelot.getHurtSound
(DamageSource damageSource) protected SoundEvent
Panda.getHurtSound
(DamageSource damageSource) protected SoundEvent
Parrot.getHurtSound
(DamageSource damageSource) protected SoundEvent
Pig.getHurtSound
(DamageSource damageSource) protected SoundEvent
PolarBear.getHurtSound
(DamageSource damageSource) protected SoundEvent
Pufferfish.getHurtSound
(DamageSource damageSource) protected SoundEvent
Rabbit.getHurtSound
(DamageSource damageSource) protected SoundEvent
Salmon.getHurtSound
(DamageSource damageSource) protected SoundEvent
Sheep.getHurtSound
(DamageSource damageSource) protected SoundEvent
SnowGolem.getHurtSound
(DamageSource damageSource) protected SoundEvent
Squid.getHurtSound
(DamageSource damageSource) protected SoundEvent
TropicalFish.getHurtSound
(DamageSource damageSource) protected SoundEvent
Turtle.getHurtSound
(DamageSource damageSource) protected SoundEvent
Wolf.getHurtSound
(DamageSource damageSource) boolean
Bee.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
IronGolem.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Panda.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Parrot.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Squid.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Wolf.hurt
(DamageSource source, float amount) Called when the entity is attacked.protected void
Wolf.hurtArmor
(DamageSource damageSource, float damageAmount) -
Uses of DamageSource in net.minecraft.world.entity.animal.allay
Methods in net.minecraft.world.entity.animal.allay with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Allay.getHurtSound
(DamageSource damageSource) boolean
Allay.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.animal.armadillo
Methods in net.minecraft.world.entity.animal.armadillo with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
Armadillo.actuallyHurt
(DamageSource damageSource, float damageAmount) Deals damage to the entity.protected SoundEvent
Armadillo.getHurtSound
(DamageSource damageSource) boolean
Armadillo.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.animal.axolotl
Methods in net.minecraft.world.entity.animal.axolotl with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Axolotl.getHurtSound
(DamageSource damageSource) boolean
Axolotl.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.animal.camel
Methods in net.minecraft.world.entity.animal.camel with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
Camel.actuallyHurt
(DamageSource damageSource, float damageAmount) Deals damage to the entity.protected SoundEvent
Camel.getHurtSound
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.animal.frog
Methods in net.minecraft.world.entity.animal.frog with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Frog.getHurtSound
(DamageSource damageSource) protected SoundEvent
Tadpole.getHurtSound
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.animal.goat
Methods in net.minecraft.world.entity.animal.goat with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Goat.getHurtSound
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.animal.horse
Methods in net.minecraft.world.entity.animal.horse with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
AbstractHorse.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) boolean
Llama.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) protected SoundEvent
Donkey.getHurtSound
(DamageSource damageSource) protected SoundEvent
Horse.getHurtSound
(DamageSource damageSource) protected SoundEvent
Llama.getHurtSound
(DamageSource damageSource) protected SoundEvent
Mule.getHurtSound
(DamageSource damageSource) protected SoundEvent
SkeletonHorse.getHurtSound
(DamageSource damageSource) protected SoundEvent
ZombieHorse.getHurtSound
(DamageSource damageSource) boolean
AbstractHorse.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.animal.sniffer
Methods in net.minecraft.world.entity.animal.sniffer with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
Sniffer.die
(DamageSource damageSource) Called when the mob's health reaches 0.protected SoundEvent
Sniffer.getHurtSound
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.boss
Methods in net.minecraft.world.entity.boss with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
EnderDragonPart.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.boss.enderdragon
Methods in net.minecraft.world.entity.boss.enderdragon with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
EnderDragon.getHurtSound
(DamageSource damageSource) boolean
EndCrystal.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
EnderDragon.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
EnderDragon.hurt
(EnderDragonPart part, DamageSource source, float damage) void
EnderDragon.onCrystalDestroyed
(EndCrystal crystal, BlockPos pos, DamageSource damageSource) private void
EndCrystal.onDestroyedBy
(DamageSource source) protected boolean
EnderDragon.reallyHurt
(DamageSource damageSource, float amount) Provides a way to cause damage to an ender dragon. -
Uses of DamageSource in net.minecraft.world.entity.boss.enderdragon.phases
Methods in net.minecraft.world.entity.boss.enderdragon.phases with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
AbstractDragonPhaseInstance.onCrystalDestroyed
(EndCrystal crystal, BlockPos pos, DamageSource dmgSrc, Player plyr) void
DragonHoldingPatternPhase.onCrystalDestroyed
(EndCrystal crystal, BlockPos pos, DamageSource dmgSrc, Player plyr) void
DragonPhaseInstance.onCrystalDestroyed
(EndCrystal crystal, BlockPos pos, DamageSource damageSource, Player player) float
AbstractDragonPhaseInstance.onHurt
(DamageSource damageSource, float amount) float
AbstractDragonSittingPhase.onHurt
(DamageSource p_31199_, float p_31200_) float
DragonPhaseInstance.onHurt
(DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world.entity.boss.wither
Methods in net.minecraft.world.entity.boss.wither with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
WitherBoss.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected SoundEvent
WitherBoss.getHurtSound
(DamageSource damageSource) boolean
WitherBoss.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.decoration
Methods in net.minecraft.world.entity.decoration with parameters of type DamageSourceModifier and TypeMethodDescriptionprivate void
ArmorStand.brokenByAnything
(ServerLevel level, DamageSource damageSource) private void
ArmorStand.brokenByPlayer
(ServerLevel level, DamageSource damageSource) private void
ArmorStand.causeDamage
(ServerLevel level, DamageSource damageSource, float damageAmount) protected SoundEvent
ArmorStand.getHurtSound
(DamageSource damageSource) boolean
ArmorStand.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
BlockAttachedEntity.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
ItemFrame.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.item
Methods in net.minecraft.world.entity.item with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
FallingBlockEntity.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) boolean
ItemEntity.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.monster
Methods in net.minecraft.world.entity.monster with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
Creeper.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) protected void
Creeper.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected void
EnderMan.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected void
Skeleton.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected void
WitherSkeleton.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected void
Zombie.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected float
Witch.getDamageAfterMagicAbsorb
(DamageSource source, float damage) Reduces damage, depending on potionsprotected SoundEvent
Blaze.getHurtSound
(DamageSource damageSource) protected SoundEvent
Bogged.getHurtSound
(DamageSource damageSource) protected SoundEvent
Creeper.getHurtSound
(DamageSource damageSource) protected SoundEvent
Drowned.getHurtSound
(DamageSource damageSource) protected SoundEvent
ElderGuardian.getHurtSound
(DamageSource damageSource) protected SoundEvent
EnderMan.getHurtSound
(DamageSource damageSource) protected SoundEvent
Endermite.getHurtSound
(DamageSource damageSource) protected SoundEvent
Evoker.getHurtSound
(DamageSource damageSource) protected SoundEvent
Ghast.getHurtSound
(DamageSource damageSource) protected SoundEvent
Guardian.getHurtSound
(DamageSource damageSource) protected SoundEvent
Husk.getHurtSound
(DamageSource damageSource) protected SoundEvent
Illusioner.getHurtSound
(DamageSource damageSource) protected SoundEvent
MagmaCube.getHurtSound
(DamageSource damageSource) protected SoundEvent
Monster.getHurtSound
(DamageSource damageSource) protected SoundEvent
Phantom.getHurtSound
(DamageSource damageSource) protected SoundEvent
Pillager.getHurtSound
(DamageSource damageSource) protected SoundEvent
Ravager.getHurtSound
(DamageSource damageSource) protected SoundEvent
Shulker.getHurtSound
(DamageSource damageSource) protected SoundEvent
Silverfish.getHurtSound
(DamageSource damageSource) protected SoundEvent
Skeleton.getHurtSound
(DamageSource damageSource) protected SoundEvent
Slime.getHurtSound
(DamageSource damageSource) protected SoundEvent
Spider.getHurtSound
(DamageSource damageSource) protected SoundEvent
Stray.getHurtSound
(DamageSource damageSource) protected SoundEvent
Strider.getHurtSound
(DamageSource damageSource) protected SoundEvent
Vex.getHurtSound
(DamageSource damageSource) protected SoundEvent
Vindicator.getHurtSound
(DamageSource damageSource) protected SoundEvent
Witch.getHurtSound
(DamageSource damageSource) protected SoundEvent
WitherSkeleton.getHurtSound
(DamageSource damageSource) protected SoundEvent
Zoglin.getHurtSound
(DamageSource damageSource) protected SoundEvent
Zombie.getHurtSound
(DamageSource damageSource) ZombieVillager.getHurtSound
(DamageSource damageSource) protected SoundEvent
ZombifiedPiglin.getHurtSound
(DamageSource damageSource) boolean
EnderMan.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Ghast.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Guardian.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Shulker.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Silverfish.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Zoglin.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Zombie.hurt
(DamageSource source, float amount) Called when the entity is attacked.private boolean
EnderMan.hurtWithCleanWater
(DamageSource source, ThrownPotion potion, float amount) boolean
Ghast.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource.private static boolean
Ghast.isReflectedFireball
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.monster.breeze
Methods in net.minecraft.world.entity.monster.breeze with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
Breeze.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) protected SoundEvent
Breeze.getHurtSound
(DamageSource damageSource) boolean
Breeze.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource. -
Uses of DamageSource in net.minecraft.world.entity.monster.hoglin
Methods in net.minecraft.world.entity.monster.hoglin with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Hoglin.getHurtSound
(DamageSource damageSource) boolean
Hoglin.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.monster.piglin
Methods in net.minecraft.world.entity.monster.piglin with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
Piglin.dropCustomDeathLoot
(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected SoundEvent
Piglin.getHurtSound
(DamageSource damageSource) protected SoundEvent
PiglinBrute.getHurtSound
(DamageSource damageSource) boolean
Piglin.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
PiglinBrute.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.monster.warden
Methods in net.minecraft.world.entity.monster.warden with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEvent
Warden.getHurtSound
(DamageSource damageSource) boolean
Warden.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Warden.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource. -
Uses of DamageSource in net.minecraft.world.entity.npc
Methods in net.minecraft.world.entity.npc with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
AbstractVillager.die
(DamageSource cause) Called when the mob's health reaches 0.void
Villager.die
(DamageSource cause) Called when the mob's health reaches 0.protected SoundEvent
Villager.getHurtSound
(DamageSource damageSource) protected SoundEvent
WanderingTrader.getHurtSound
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.player
Methods in net.minecraft.world.entity.player with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
Player.actuallyHurt
(DamageSource damageSrc, float damageAmount) Deals damage to the entity.boolean
Player.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) void
Player.die
(DamageSource cause) Called when the mob's health reaches 0.protected float
Player.getEnchantedDamage
(Entity entity, float damage, DamageSource damageSource) protected SoundEvent
Player.getHurtSound
(DamageSource damageSource) boolean
Player.hurt
(DamageSource source, float amount) Called when the entity is attacked.protected void
Player.hurtArmor
(DamageSource damageSource, float damage) protected void
Player.hurtHelmet
(DamageSource damageSource, float damageAmount) boolean
Player.isInvulnerableTo
(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource. -
Uses of DamageSource in net.minecraft.world.entity.projectile
Methods in net.minecraft.world.entity.projectile with parameters of type DamageSourceModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePair
FireworkRocketEntity.calculateHorizontalHurtKnockbackDirection
(LivingEntity entity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePair
Projectile.calculateHorizontalHurtKnockbackDirection
(LivingEntity entity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePair
ThrownPotion.calculateHorizontalHurtKnockbackDirection
(LivingEntity entity, DamageSource damageSource) protected void
AbstractArrow.doKnockback
(LivingEntity entity, DamageSource damageSource) boolean
AbstractHurtingProjectile.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
DragonFireball.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
Fireball.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
ShulkerBullet.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
SmallFireball.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
WitherSkull.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.projectile.windcharge
Methods in net.minecraft.world.entity.projectile.windcharge with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
AbstractWindCharge.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.raid
Methods in net.minecraft.world.entity.raid with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
Raider.die
(DamageSource cause) Called when the mob's health reaches 0.boolean
Raider.hurt
(DamageSource source, float amount) Called when the entity is attacked. -
Uses of DamageSource in net.minecraft.world.entity.vehicle
Methods in net.minecraft.world.entity.vehicle with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
MinecartTNT.causeFallDamage
(float fallDistance, float multiplier, DamageSource source) default void
ContainerEntity.chestVehicleDestroyed
(DamageSource damageSource, Level level, Entity p_entity) private static boolean
MinecartTNT.damageSourceIgnitesTnt
(DamageSource source) void
AbstractMinecartContainer.destroy
(DamageSource source) void
ChestBoat.destroy
(DamageSource source) void
MinecartTNT.destroy
(DamageSource source) protected void
VehicleEntity.destroy
(DamageSource source) protected void
MinecartTNT.explode
(DamageSource damageSource, double radiusModifier) boolean
MinecartTNT.hurt
(DamageSource source, float amount) Called when the entity is attacked.boolean
VehicleEntity.hurt
(DamageSource source, float amount) Called when the entity is attacked.(package private) boolean
MinecartTNT.shouldSourceDestroy
(DamageSource source) (package private) boolean
VehicleEntity.shouldSourceDestroy
(DamageSource source) -
Uses of DamageSource in net.minecraft.world.item
Methods in net.minecraft.world.item with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
ItemStack.canBeHurtBy
(DamageSource damageSource) float
Item.getAttackDamageBonus
(Entity target, float damage, DamageSource damageSource) float
MaceItem.getAttackDamageBonus
(Entity target, float damage, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.item.enchantment
Methods in net.minecraft.world.item.enchantment with parameters of type DamageSourceModifier and TypeMethodDescriptionstatic LootContext
Enchantment.damageContext
(ServerLevel level, int enchantmentLevel, Entity entity, DamageSource damageSource) void
Enchantment.doPostAttack
(ServerLevel level, int enchantmentLevel, EnchantedItemInUse item, EnchantmentTarget target, Entity entity, DamageSource damageSource) static void
Enchantment.doPostAttack
(TargetedConditionalEffect<EnchantmentEntityEffect> effect, ServerLevel level, int enchantmentLevel, EnchantedItemInUse item, Entity p_entity, DamageSource damageSource) static void
EnchantmentHelper.doPostAttackEffects
(ServerLevel level, Entity entity, DamageSource damageSource) static void
EnchantmentHelper.doPostAttackEffectsWithItemSource
(ServerLevel level, Entity entity, DamageSource damageSource, ItemStack itemSource) static float
EnchantmentHelper.getDamageProtection
(ServerLevel level, LivingEntity entity, DamageSource damageSource) boolean
Enchantment.isImmuneToDamage
(ServerLevel level, int enchantmentLevel, Entity entity, DamageSource damageSource) static boolean
EnchantmentHelper.isImmuneToDamage
(ServerLevel level, LivingEntity entity, DamageSource damageSource) static float
EnchantmentHelper.modifyArmorEffectiveness
(ServerLevel level, ItemStack tool, Entity entity, DamageSource damageSource, float armorEffectiveness) void
Enchantment.modifyArmorEffectivness
(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat armorEffectiveness) void
Enchantment.modifyDamage
(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat damage) static float
EnchantmentHelper.modifyDamage
(ServerLevel level, ItemStack tool, Entity entity, DamageSource damageSource, float damage) void
Enchantment.modifyDamageFilteredValue
(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> componentType, ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat value) void
Enchantment.modifyDamageProtection
(ServerLevel level, int enchantmentLevel, ItemStack stack, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat damageProtection) void
Enchantment.modifyFallBasedDamage
(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat fallBasedDamage) static float
EnchantmentHelper.modifyFallBasedDamage
(ServerLevel level, ItemStack tool, Entity enity, DamageSource damageSource, float fallBasedDamage) void
Enchantment.modifyKnockback
(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat knockback) static float
EnchantmentHelper.modifyKnockback
(ServerLevel level, ItemStack tool, Entity entity, DamageSource damageSource, float knockback) static float
EnchantmentHelper.processEquipmentDropChance
(ServerLevel level, LivingEntity entity, DamageSource damageSource, float equipmentDropChance) -
Uses of DamageSource in net.minecraft.world.item.enchantment.effects
Methods in net.minecraft.world.item.enchantment.effects that return DamageSourceModifier and TypeMethodDescriptionprivate DamageSource
ExplodeEffect.getDamageSource
(Entity entity, Vec3 pos) -
Uses of DamageSource in net.minecraft.world.level
Fields in net.minecraft.world.level declared as DamageSourceMethods in net.minecraft.world.level that return DamageSourceModifier and TypeMethodDescriptionstatic DamageSource
Explosion.getDefaultDamageSource
(Level level, Entity source) Methods in net.minecraft.world.level with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
Level.broadcastDamageEvent
(Entity entity, DamageSource damageSource) Level.explode
(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) Level.explode
(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction, boolean spawnParticles, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) Level.explode
(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) Level.explode
(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, Vec3 pos, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) Constructors in net.minecraft.world.level with parameters of type DamageSourceModifierConstructorDescriptionExplosion
(Level level, Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Explosion.BlockInteraction blockInteraction, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, Holder<SoundEvent> explosionSound) -
Uses of DamageSource in net.minecraft.world.level.block
Methods in net.minecraft.world.level.block that return DamageSourceModifier and TypeMethodDescriptionAnvilBlock.getFallDamageSource
(Entity entity) default DamageSource
Fallable.getFallDamageSource
(Entity entity) PointedDripstoneBlock.getFallDamageSource
(Entity entity) -
Uses of DamageSource in net.minecraft.world.level.dimension.end
Methods in net.minecraft.world.level.dimension.end with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
EndDragonFight.onCrystalDestroyed
(EndCrystal crystal, DamageSource dmgSrc) -
Uses of DamageSource in net.minecraft.world.level.storage.loot.parameters
Fields in net.minecraft.world.level.storage.loot.parameters with type parameters of type DamageSourceModifier and TypeFieldDescriptionstatic final LootContextParam
<DamageSource> LootContextParams.DAMAGE_SOURCE
-
Uses of DamageSource in net.neoforged.neoforge.common
Methods in net.neoforged.neoforge.common with parameters of type DamageSourceModifier and TypeMethodDescriptionstatic boolean
CommonHooks.isEntityInvulnerableTo
(Entity entity, DamageSource source, boolean isInvul) Creates and posts anEntityInvulnerabilityCheckEvent
.static void
CommonHooks.onArmorHurt
(DamageSource source, EquipmentSlot[] slots, float damage, LivingEntity armoredEntity) This is invoked inLivingEntity.doHurtEquipment(DamageSource, float, EquipmentSlot...)
and replaces the existing item hurt and break logic with an event-sensitive version.static boolean
CommonHooks.onLivingDeath
(LivingEntity entity, DamageSource src) static boolean
CommonHooks.onLivingDrops
(LivingEntity entity, DamageSource source, Collection<ItemEntity> drops, boolean recentlyHit) static boolean
CommonHooks.onLivingUseTotem
(LivingEntity entity, DamageSource damageSource, ItemStack totem, InteractionHand hand) -
Uses of DamageSource in net.neoforged.neoforge.common.damagesource
Fields in net.neoforged.neoforge.common.damagesource declared as DamageSourceMethods in net.neoforged.neoforge.common.damagesource that return DamageSourceModifier and TypeMethodDescriptionDamageContainer.getSource()
Returns the damage source for this damage sequence.Methods in net.neoforged.neoforge.common.damagesource with parameters of type DamageSourceModifier and TypeMethodDescriptionfloat
IScalingFunction.scaleDamage
(DamageSource source, Player target, float amount, Difficulty difficulty) Scales the incoming damage amount based on the current difficulty.
Only damage dealt to players is scaled, other damage is not impacted.Constructors in net.neoforged.neoforge.common.damagesource with parameters of type DamageSource -
Uses of DamageSource in net.neoforged.neoforge.common.extensions
Methods in net.neoforged.neoforge.common.extensions with parameters of type DamageSourceModifier and TypeMethodDescriptiondefault boolean
IItemExtension.canBeHurtBy
(ItemStack stack, DamageSource source) Returns false to make item entity immune to the damage..default void
IItemExtension.onDestroyed
(ItemEntity itemEntity, DamageSource damageSource) Called when an item entity for this stack is destroyed.default void
IItemStackExtension.onDestroyed
(ItemEntity itemEntity, DamageSource damageSource) Called when an item entity for this stack is destroyed. -
Uses of DamageSource in net.neoforged.neoforge.common.util
Methods in net.neoforged.neoforge.common.util with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
FakePlayer.die
(DamageSource source) boolean
FakePlayer.isInvulnerableTo
(DamageSource source) -
Uses of DamageSource in net.neoforged.neoforge.event.entity
Fields in net.neoforged.neoforge.event.entity declared as DamageSourceModifier and TypeFieldDescriptionprivate final DamageSource
EntityInvulnerabilityCheckEvent.source
Methods in net.neoforged.neoforge.event.entity that return DamageSourceConstructors in net.neoforged.neoforge.event.entity with parameters of type DamageSourceModifierConstructorDescriptionEntityInvulnerabilityCheckEvent
(Entity entity, DamageSource source, boolean isVanillaInvulnerable) -
Uses of DamageSource in net.neoforged.neoforge.event.entity.living
Fields in net.neoforged.neoforge.event.entity.living declared as DamageSourceModifier and TypeFieldDescriptionprivate final DamageSource
LivingDamageEvent.Post.source
private final DamageSource
LivingDeathEvent.source
private final DamageSource
LivingDropsEvent.source
private final DamageSource
LivingUseTotemEvent.source
Methods in net.neoforged.neoforge.event.entity.living that return DamageSourceModifier and TypeMethodDescriptionLivingShieldBlockEvent.getDamageSource()
LivingDamageEvent.Post.getSource()
Returns theDamageSource
for this damage sequence.LivingDamageEvent.Pre.getSource()
Returns the damage source for this damage sequence.LivingDeathEvent.getSource()
LivingDropsEvent.getSource()
LivingIncomingDamageEvent.getSource()
Returns theDamageSource
for this damage sequence.LivingUseTotemEvent.getSource()
Returns the damage source that caused the entity to die.Constructors in net.neoforged.neoforge.event.entity.living with parameters of type DamageSourceModifierConstructorDescriptionLivingDeathEvent
(LivingEntity entity, DamageSource source) LivingDropsEvent
(LivingEntity entity, DamageSource source, Collection<ItemEntity> drops, boolean recentlyHit) LivingUseTotemEvent
(LivingEntity entity, DamageSource source, ItemStack totem, InteractionHand hand)