Uses of Class
net.minecraft.world.damagesource.DamageSource
Package
Description
-
Uses of DamageSource in net.minecraft.advancements.critereon
Modifier and TypeMethodDescriptionboolean
DamagePredicate.matches
(ServerPlayer p_24918_, DamageSource p_24919_, float p_24920_, float p_24921_, boolean p_24922_) boolean
DamageSourcePredicate.matches
(ServerLevel p_25445_, Vec3 p_25446_, DamageSource p_25447_) boolean
DamageSourcePredicate.matches
(ServerPlayer p_25449_, DamageSource p_25450_) boolean
EntityHurtPlayerTrigger.TriggerInstance.matches
(ServerPlayer p_35201_, DamageSource p_35202_, float p_35203_, float p_35204_, boolean p_35205_) boolean
KilledTrigger.TriggerInstance.matches
(ServerPlayer p_48131_, LootContext p_48132_, DamageSource p_48133_) boolean
PlayerHurtEntityTrigger.TriggerInstance.matches
(ServerPlayer p_60143_, LootContext p_60144_, DamageSource p_60145_, float p_60146_, float p_60147_, boolean p_60148_) void
EntityHurtPlayerTrigger.trigger
(ServerPlayer p_35175_, DamageSource p_35176_, float p_35177_, float p_35178_, boolean p_35179_) void
KilledTrigger.trigger
(ServerPlayer p_48105_, Entity p_48106_, DamageSource p_48107_) void
PlayerHurtEntityTrigger.trigger
(ServerPlayer p_60113_, Entity p_60114_, DamageSource p_60115_, float p_60116_, float p_60117_, boolean p_60118_) -
Uses of DamageSource in net.minecraft.client.player
Modifier and TypeMethodDescriptionprotected void
LocalPlayer.actuallyHurt
(DamageSource p_108729_, float p_108730_) boolean
LocalPlayer.hurt
(DamageSource p_108662_, float p_108663_) boolean
RemotePlayer.hurt
(DamageSource p_108772_, float p_108773_) -
Uses of DamageSource in net.minecraft.network.protocol.game
Modifier and TypeMethodDescriptionModifierConstructorDescriptionClientboundDamageEventPacket
(Entity p_270474_, DamageSource p_270781_) -
Uses of DamageSource in net.minecraft.server.commands
Modifier and TypeMethodDescriptionprivate static int
DamageCommand.damage
(CommandSourceStack p_270409_, Entity p_270496_, float p_270836_, DamageSource p_270727_) -
Uses of DamageSource in net.minecraft.server.level
Modifier and TypeMethodDescriptionvoid
ServerPlayer.awardKillScore
(Entity p_9050_, int p_9051_, DamageSource p_9052_) void
ServerLevel.broadcastDamageEvent
(Entity p_270420_, DamageSource p_270311_) void
ServerPlayer.die
(DamageSource p_9035_) ServerLevel.explode
(Entity p_256039_, DamageSource p_255778_, ExplosionDamageCalculator p_256002_, double p_256067_, double p_256370_, double p_256153_, float p_256045_, boolean p_255686_, Level.ExplosionInteraction p_255827_, ParticleOptions p_312436_, ParticleOptions p_312391_, Holder<SoundEvent> p_320497_) boolean
ServerPlayer.hurt
(DamageSource p_9037_, float p_9038_) boolean
ServerPlayer.isInvulnerableTo
(DamageSource p_9182_) -
Uses of DamageSource in net.minecraft.world.damagesource
Modifier and TypeFieldDescriptionprivate final DamageSource
DamageSources.cactus
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
Modifier and TypeMethodDescriptionDamageSources.arrow
(AbstractArrow p_270570_, Entity p_270857_) DamageSources.badRespawnPointExplosion
(Vec3 p_270175_) DamageSources.cactus()
DamageSources.cramming()
DamageSources.dragonBreath()
DamageSources.drown()
DamageSources.dryOut()
DamageSources.fall()
DamageSources.fallingBlock
(Entity p_270643_) DamageSources.fallingStalactite
(Entity p_270720_) DamageSources.fellOutOfWorld()
DamageSources.fireworks
(FireworkRocketEntity p_270571_, Entity p_270768_) DamageSources.flyIntoWall()
DamageSources.freeze()
DamageSources.generic()
DamageSources.genericKill()
DamageSources.hotFloor()
DamageSources.indirectMagic
(Entity p_270560_, Entity p_270646_) DamageSources.inFire()
DamageSources.inWall()
DamageSources.lava()
DamageSources.lightningBolt()
DamageSources.magic()
DamageSources.mobAttack
(LivingEntity p_270357_) DamageSources.mobProjectile
(Entity p_270210_, LivingEntity p_270757_) DamageSources.noAggroMobAttack
(LivingEntity p_270502_) DamageSources.onFire()
DamageSources.outOfBorder()
DamageSources.playerAttack
(Player p_270723_) CombatEntry.source()
Returns the value of thesource
record component.DamageSources.source
(ResourceKey<DamageType> p_270957_) DamageSources.source
(ResourceKey<DamageType> p_270142_, Entity p_270696_) DamageSources.source
(ResourceKey<DamageType> p_270076_, Entity p_270656_, Entity p_270242_) DamageSources.spit
(Entity p_316508_, LivingEntity p_316581_) DamageSources.stalagmite()
DamageSources.starve()
DamageSources.sting
(LivingEntity p_270689_) DamageSources.sweetBerryBush()
DamageSources.windCharge
(Entity p_316454_, LivingEntity p_316891_) DamageSources.wither()
DamageSources.witherSkull
(WitherSkull p_270367_, Entity p_270887_) Modifier and TypeMethodDescriptionstatic float
CombatRules.getDamageAfterAbsorb
(float p_19273_, DamageSource p_338892_, float p_19274_, float p_19275_) void
CombatTracker.recordDamage
(DamageSource p_289533_, float p_289559_) private static boolean
CombatTracker.shouldEnterCombat
(DamageSource p_289554_) ModifierConstructorDescriptionCombatEntry
(DamageSource source, float damage, FallLocation fallLocation, float fallDistance) Creates an instance of aCombatEntry
record class. -
Uses of DamageSource in net.minecraft.world.effect
Modifier and TypeMethodDescriptionvoid
InfestedMobEffect.onMobHurt
(LivingEntity p_338481_, int p_338438_, DamageSource p_338894_, float p_338367_) void
MobEffect.onMobHurt
(LivingEntity p_338186_, int p_338204_, DamageSource p_338393_, float p_338618_) void
MobEffectInstance.onMobHurt
(LivingEntity p_338201_, DamageSource p_338572_, float p_338779_) -
Uses of DamageSource in net.minecraft.world.entity
Modifier and TypeMethodDescriptionprotected void
LivingEntity.actuallyHurt
(DamageSource p_21240_, float p_21241_) void
Entity.awardKillScore
(Entity p_19953_, int p_19954_, DamageSource p_19955_) boolean
Entity.causeFallDamage
(float p_146828_, float p_146829_, DamageSource p_146830_) boolean
LivingEntity.causeFallDamage
(float p_147187_, float p_147188_, DamageSource p_147189_) private boolean
LivingEntity.checkTotemDeathProtection
(DamageSource p_21263_) void
LivingEntity.die
(DamageSource p_21014_) void
TamableAnimal.die
(DamageSource p_21809_) protected void
LivingEntity.doHurtEquipment
(DamageSource p_330843_, float p_330394_, EquipmentSlot... p_331314_) protected void
LivingEntity.dropAllDeathLoot
(DamageSource p_21192_) protected void
LivingEntity.dropCustomDeathLoot
(DamageSource p_21018_, int p_21019_, boolean p_21020_) protected void
Mob.dropCustomDeathLoot
(DamageSource p_21385_, int p_21386_, boolean p_21387_) protected void
LivingEntity.dropFromLootTable
(DamageSource p_21021_, boolean p_21022_) protected void
Mob.dropFromLootTable
(DamageSource p_21389_, boolean p_21390_) protected float
LivingEntity.getDamageAfterArmorAbsorb
(DamageSource p_21162_, float p_21163_) protected float
LivingEntity.getDamageAfterMagicAbsorb
(DamageSource p_21193_, float p_21194_) protected SoundEvent
GlowSquid.getHurtSound
(DamageSource p_147124_) protected SoundEvent
LivingEntity.getHurtSound
(DamageSource p_21239_) void
Entity.handleDamageEvent
(DamageSource p_270704_) void
LivingEntity.handleDamageEvent
(DamageSource p_270229_) boolean
Entity.hurt
(DamageSource p_19946_, float p_19947_) boolean
ExperienceOrb.hurt
(DamageSource p_20785_, float p_20786_) boolean
GlowSquid.hurt
(DamageSource p_147114_, float p_147115_) boolean
LivingEntity.hurt
(DamageSource p_21016_, float p_21017_) protected void
LivingEntity.hurtArmor
(DamageSource p_21122_, float p_21123_) protected void
LivingEntity.hurtHelmet
(DamageSource p_147213_, float p_147214_) boolean
LivingEntity.isDamageSourceBlocked
(DamageSource p_21276_) boolean
Entity.isInvulnerableTo
(DamageSource p_20122_) protected void
LivingEntity.playHurtSound
(DamageSource p_21160_) protected void
Mob.playHurtSound
(DamageSource p_21493_) -
Uses of DamageSource in net.minecraft.world.entity.ai.memory
Modifier and TypeFieldDescriptionstatic final MemoryModuleType
<DamageSource> MemoryModuleType.HURT_BY
-
Uses of DamageSource in net.minecraft.world.entity.ambient
Modifier and TypeMethodDescriptionprotected SoundEvent
Bat.getHurtSound
(DamageSource p_27451_) boolean
Bat.hurt
(DamageSource p_27424_, float p_27425_) -
Uses of DamageSource in net.minecraft.world.entity.animal
Modifier and TypeMethodDescriptionprotected void
Animal.actuallyHurt
(DamageSource p_341676_, float p_341648_) protected void
Wolf.actuallyHurt
(DamageSource p_331935_, float p_330695_) private boolean
Wolf.canArmorAbsorb
(DamageSource p_331524_) void
IronGolem.die
(DamageSource p_28846_) void
Wolf.die
(DamageSource p_30384_) protected void
Fox.dropAllDeathLoot
(DamageSource p_28536_) protected SoundEvent
AbstractGolem.getHurtSound
(DamageSource p_27517_) protected SoundEvent
Bee.getHurtSound
(DamageSource p_27845_) protected SoundEvent
Cat.getHurtSound
(DamageSource p_28160_) protected SoundEvent
Chicken.getHurtSound
(DamageSource p_28262_) protected SoundEvent
Cod.getHurtSound
(DamageSource p_28281_) protected SoundEvent
Cow.getHurtSound
(DamageSource p_28306_) protected SoundEvent
Dolphin.getHurtSound
(DamageSource p_28374_) protected SoundEvent
Fox.getHurtSound
(DamageSource p_28548_) protected SoundEvent
IronGolem.getHurtSound
(DamageSource p_28872_) protected SoundEvent
Ocelot.getHurtSound
(DamageSource p_29035_) protected SoundEvent
Panda.getHurtSound
(DamageSource p_29142_) protected SoundEvent
Parrot.getHurtSound
(DamageSource p_29437_) protected SoundEvent
Pig.getHurtSound
(DamageSource p_29502_) protected SoundEvent
PolarBear.getHurtSound
(DamageSource p_29559_) protected SoundEvent
Pufferfish.getHurtSound
(DamageSource p_29628_) protected SoundEvent
Rabbit.getHurtSound
(DamageSource p_29715_) protected SoundEvent
Salmon.getHurtSound
(DamageSource p_29795_) protected SoundEvent
Sheep.getHurtSound
(DamageSource p_29872_) protected SoundEvent
SnowGolem.getHurtSound
(DamageSource p_29929_) protected SoundEvent
Squid.getHurtSound
(DamageSource p_29980_) protected SoundEvent
TropicalFish.getHurtSound
(DamageSource p_30039_) protected SoundEvent
Turtle.getHurtSound
(DamageSource p_30202_) protected SoundEvent
Wolf.getHurtSound
(DamageSource p_30424_) boolean
Bee.hurt
(DamageSource p_27762_, float p_27763_) boolean
IronGolem.hurt
(DamageSource p_28848_, float p_28849_) boolean
Panda.hurt
(DamageSource p_29097_, float p_29098_) boolean
Parrot.hurt
(DamageSource p_29378_, float p_29379_) boolean
Squid.hurt
(DamageSource p_29963_, float p_29964_) boolean
Wolf.hurt
(DamageSource p_30386_, float p_30387_) protected void
Wolf.hurtArmor
(DamageSource p_332118_, float p_330593_) -
Uses of DamageSource in net.minecraft.world.entity.animal.allay
Modifier and TypeMethodDescriptionprotected SoundEvent
Allay.getHurtSound
(DamageSource p_218369_) boolean
Allay.hurt
(DamageSource p_218339_, float p_218340_) -
Uses of DamageSource in net.minecraft.world.entity.animal.armadillo
Modifier and TypeMethodDescriptionprotected void
Armadillo.actuallyHurt
(DamageSource p_316204_, float p_316801_) protected SoundEvent
Armadillo.getHurtSound
(DamageSource p_316220_) boolean
Armadillo.hurt
(DamageSource p_321611_, float p_321629_) -
Uses of DamageSource in net.minecraft.world.entity.animal.axolotl
Modifier and TypeMethodDescriptionprotected SoundEvent
Axolotl.getHurtSound
(DamageSource p_149161_) boolean
Axolotl.hurt
(DamageSource p_149115_, float p_149116_) -
Uses of DamageSource in net.minecraft.world.entity.animal.camel
Modifier and TypeMethodDescriptionprotected void
Camel.actuallyHurt
(DamageSource p_250410_, float p_251451_) protected SoundEvent
Camel.getHurtSound
(DamageSource p_250052_) -
Uses of DamageSource in net.minecraft.world.entity.animal.frog
Modifier and TypeMethodDescriptionprotected SoundEvent
Frog.getHurtSound
(DamageSource p_218510_) protected SoundEvent
Tadpole.getHurtSound
(DamageSource p_218713_) -
Uses of DamageSource in net.minecraft.world.entity.animal.goat
-
Uses of DamageSource in net.minecraft.world.entity.animal.horse
Modifier and TypeMethodDescriptionboolean
AbstractHorse.causeFallDamage
(float p_149499_, float p_149500_, DamageSource p_149501_) boolean
Llama.causeFallDamage
(float p_149538_, float p_149539_, DamageSource p_149540_) protected SoundEvent
Donkey.getHurtSound
(DamageSource p_30682_) protected SoundEvent
Horse.getHurtSound
(DamageSource p_30720_) protected SoundEvent
Llama.getHurtSound
(DamageSource p_30803_) protected SoundEvent
Mule.getHurtSound
(DamageSource p_30886_) protected SoundEvent
SkeletonHorse.getHurtSound
(DamageSource p_30916_) protected SoundEvent
ZombieHorse.getHurtSound
(DamageSource p_31006_) boolean
AbstractHorse.hurt
(DamageSource p_252258_, float p_250984_) -
Uses of DamageSource in net.minecraft.world.entity.animal.sniffer
Modifier and TypeMethodDescriptionvoid
Sniffer.die
(DamageSource p_277689_) protected SoundEvent
Sniffer.getHurtSound
(DamageSource p_273718_) -
Uses of DamageSource in net.minecraft.world.entity.boss
Modifier and TypeMethodDescriptionboolean
EnderDragonPart.hurt
(DamageSource p_31020_, float p_31021_) -
Uses of DamageSource in net.minecraft.world.entity.boss.enderdragon
Modifier and TypeMethodDescriptionprotected SoundEvent
EnderDragon.getHurtSound
(DamageSource p_31154_) boolean
EndCrystal.hurt
(DamageSource p_31050_, float p_31051_) boolean
EnderDragon.hurt
(DamageSource p_31113_, float p_31114_) boolean
EnderDragon.hurt
(EnderDragonPart p_31121_, DamageSource p_31122_, float p_31123_) void
EnderDragon.onCrystalDestroyed
(EndCrystal p_31125_, BlockPos p_31126_, DamageSource p_31127_) private void
EndCrystal.onDestroyedBy
(DamageSource p_31048_) protected boolean
EnderDragon.reallyHurt
(DamageSource p_31162_, float p_31163_) -
Uses of DamageSource in net.minecraft.world.entity.boss.enderdragon.phases
Modifier and TypeMethodDescriptionvoid
AbstractDragonPhaseInstance.onCrystalDestroyed
(EndCrystal p_31184_, BlockPos p_31185_, DamageSource p_31186_, Player p_31187_) void
DragonHoldingPatternPhase.onCrystalDestroyed
(EndCrystal p_31232_, BlockPos p_31233_, DamageSource p_31234_, Player p_31235_) void
DragonPhaseInstance.onCrystalDestroyed
(EndCrystal p_31315_, BlockPos p_31316_, DamageSource p_31317_, Player p_31318_) float
AbstractDragonPhaseInstance.onHurt
(DamageSource p_31181_, float p_31182_) float
AbstractDragonSittingPhase.onHurt
(DamageSource p_31199_, float p_31200_) float
DragonPhaseInstance.onHurt
(DamageSource p_31313_, float p_31314_) -
Uses of DamageSource in net.minecraft.world.entity.boss.wither
Modifier and TypeMethodDescriptionprotected void
WitherBoss.dropCustomDeathLoot
(DamageSource p_31464_, int p_31465_, boolean p_31466_) protected SoundEvent
WitherBoss.getHurtSound
(DamageSource p_31500_) boolean
WitherBoss.hurt
(DamageSource p_31461_, float p_31462_) -
Uses of DamageSource in net.minecraft.world.entity.decoration
Modifier and TypeMethodDescriptionprivate void
ArmorStand.brokenByAnything
(DamageSource p_31654_) private void
ArmorStand.brokenByPlayer
(DamageSource p_31647_) private void
ArmorStand.causeDamage
(DamageSource p_31649_, float p_31650_) protected SoundEvent
ArmorStand.getHurtSound
(DamageSource p_31636_) boolean
ArmorStand.hurt
(DamageSource p_31579_, float p_31580_) boolean
HangingEntity.hurt
(DamageSource p_31715_, float p_31716_) boolean
ItemFrame.hurt
(DamageSource p_31776_, float p_31777_) -
Uses of DamageSource in net.minecraft.world.entity.item
Modifier and TypeMethodDescriptionboolean
FallingBlockEntity.causeFallDamage
(float p_149643_, float p_149644_, DamageSource p_149645_) boolean
ItemEntity.hurt
(DamageSource p_32013_, float p_32014_) -
Uses of DamageSource in net.minecraft.world.entity.monster
Modifier and TypeMethodDescriptionboolean
Creeper.causeFallDamage
(float p_149687_, float p_149688_, DamageSource p_149689_) protected void
Creeper.dropCustomDeathLoot
(DamageSource p_32292_, int p_32293_, boolean p_32294_) protected void
EnderMan.dropCustomDeathLoot
(DamageSource p_32497_, int p_32498_, boolean p_32499_) protected void
Skeleton.dropCustomDeathLoot
(DamageSource p_33574_, int p_33575_, boolean p_33576_) protected void
WitherSkeleton.dropCustomDeathLoot
(DamageSource p_34174_, int p_34175_, boolean p_34176_) protected void
Zombie.dropCustomDeathLoot
(DamageSource p_34291_, int p_34292_, boolean p_34293_) protected float
Witch.getDamageAfterMagicAbsorb
(DamageSource p_34149_, float p_34150_) protected SoundEvent
Blaze.getHurtSound
(DamageSource p_32235_) protected SoundEvent
Bogged.getHurtSound
(DamageSource p_326909_) protected SoundEvent
Creeper.getHurtSound
(DamageSource p_32309_) protected SoundEvent
Drowned.getHurtSound
(DamageSource p_32386_) protected SoundEvent
ElderGuardian.getHurtSound
(DamageSource p_32468_) protected SoundEvent
EnderMan.getHurtSound
(DamageSource p_32527_) protected SoundEvent
Endermite.getHurtSound
(DamageSource p_32615_) protected SoundEvent
Evoker.getHurtSound
(DamageSource p_32654_) protected SoundEvent
Ghast.getHurtSound
(DamageSource p_32750_) protected SoundEvent
Guardian.getHurtSound
(DamageSource p_32852_) protected SoundEvent
Husk.getHurtSound
(DamageSource p_32903_) protected SoundEvent
Illusioner.getHurtSound
(DamageSource p_32930_) protected SoundEvent
MagmaCube.getHurtSound
(DamageSource p_32992_) protected SoundEvent
Monster.getHurtSound
(DamageSource p_33034_) protected SoundEvent
Phantom.getHurtSound
(DamageSource p_33152_) protected SoundEvent
Pillager.getHurtSound
(DamageSource p_33306_) protected SoundEvent
Ravager.getHurtSound
(DamageSource p_33359_) protected SoundEvent
Shulker.getHurtSound
(DamageSource p_33457_) protected SoundEvent
Silverfish.getHurtSound
(DamageSource p_33549_) protected SoundEvent
Skeleton.getHurtSound
(DamageSource p_33579_) protected SoundEvent
Slime.getHurtSound
(DamageSource p_33631_) protected SoundEvent
Spider.getHurtSound
(DamageSource p_33814_) protected SoundEvent
Stray.getHurtSound
(DamageSource p_33850_) protected SoundEvent
Strider.getHurtSound
(DamageSource p_33934_) protected SoundEvent
Vex.getHurtSound
(DamageSource p_34023_) protected SoundEvent
Vindicator.getHurtSound
(DamageSource p_34103_) protected SoundEvent
Witch.getHurtSound
(DamageSource p_34154_) protected SoundEvent
WitherSkeleton.getHurtSound
(DamageSource p_34195_) protected SoundEvent
Zoglin.getHurtSound
(DamageSource p_34244_) protected SoundEvent
Zombie.getHurtSound
(DamageSource p_34327_) ZombieVillager.getHurtSound
(DamageSource p_34404_) protected SoundEvent
ZombifiedPiglin.getHurtSound
(DamageSource p_34466_) boolean
EnderMan.hurt
(DamageSource p_32494_, float p_32495_) boolean
Ghast.hurt
(DamageSource p_32730_, float p_32731_) boolean
Guardian.hurt
(DamageSource p_32820_, float p_32821_) boolean
Shulker.hurt
(DamageSource p_33421_, float p_33422_) boolean
Silverfish.hurt
(DamageSource p_33527_, float p_33528_) boolean
Zoglin.hurt
(DamageSource p_34214_, float p_34215_) boolean
Zombie.hurt
(DamageSource p_34288_, float p_34289_) private boolean
EnderMan.hurtWithCleanWater
(DamageSource p_186273_, ThrownPotion p_186274_, float p_186275_) boolean
Ghast.isInvulnerableTo
(DamageSource p_238289_) private static boolean
Ghast.isReflectedFireball
(DamageSource p_238408_) -
Uses of DamageSource in net.minecraft.world.entity.monster.breeze
Modifier and TypeMethodDescriptionboolean
Breeze.causeFallDamage
(float p_312702_, float p_312120_, DamageSource p_312076_) protected SoundEvent
Breeze.getHurtSound
(DamageSource p_312252_) boolean
Breeze.isInvulnerableTo
(DamageSource p_312691_) -
Uses of DamageSource in net.minecraft.world.entity.monster.hoglin
Modifier and TypeMethodDescriptionprotected SoundEvent
Hoglin.getHurtSound
(DamageSource p_34548_) boolean
Hoglin.hurt
(DamageSource p_34503_, float p_34504_) -
Uses of DamageSource in net.minecraft.world.entity.monster.piglin
Modifier and TypeMethodDescriptionprotected void
Piglin.dropCustomDeathLoot
(DamageSource p_34697_, int p_34698_, boolean p_34699_) protected SoundEvent
Piglin.getHurtSound
(DamageSource p_34767_) protected SoundEvent
PiglinBrute.getHurtSound
(DamageSource p_35072_) boolean
Piglin.hurt
(DamageSource p_34694_, float p_34695_) boolean
PiglinBrute.hurt
(DamageSource p_35055_, float p_35056_) -
Uses of DamageSource in net.minecraft.world.entity.monster.warden
Modifier and TypeMethodDescriptionprotected SoundEvent
Warden.getHurtSound
(DamageSource p_219440_) boolean
Warden.hurt
(DamageSource p_219381_, float p_219382_) boolean
Warden.isInvulnerableTo
(DamageSource p_219427_) -
Uses of DamageSource in net.minecraft.world.entity.npc
Modifier and TypeMethodDescriptionvoid
AbstractVillager.die
(DamageSource p_35270_) void
Villager.die
(DamageSource p_35419_) protected SoundEvent
Villager.getHurtSound
(DamageSource p_35498_) protected SoundEvent
WanderingTrader.getHurtSound
(DamageSource p_35870_) -
Uses of DamageSource in net.minecraft.world.entity.player
Modifier and TypeMethodDescriptionprotected void
Player.actuallyHurt
(DamageSource p_36312_, float p_36313_) boolean
Player.causeFallDamage
(float p_150093_, float p_150094_, DamageSource p_150095_) void
Player.die
(DamageSource p_36152_) protected SoundEvent
Player.getHurtSound
(DamageSource p_36310_) boolean
Player.hurt
(DamageSource p_36154_, float p_36155_) protected void
Player.hurtArmor
(DamageSource p_36251_, float p_36252_) protected void
Player.hurtHelmet
(DamageSource p_150103_, float p_150104_) boolean
Player.isInvulnerableTo
(DamageSource p_36249_) -
Uses of DamageSource in net.minecraft.world.entity.projectile
Modifier and TypeMethodDescriptionboolean
AbstractHurtingProjectile.hurt
(DamageSource p_341896_, float p_341906_) boolean
DragonFireball.hurt
(DamageSource p_36910_, float p_36911_) boolean
ShulkerBullet.hurt
(DamageSource p_37338_, float p_37339_) boolean
SmallFireball.hurt
(DamageSource p_37381_, float p_37382_) boolean
WitherSkull.hurt
(DamageSource p_37616_, float p_37617_) -
Uses of DamageSource in net.minecraft.world.entity.raid
Modifier and TypeMethodDescriptionvoid
Raider.die
(DamageSource p_37847_) boolean
Raider.hurt
(DamageSource p_37849_, float p_37850_) -
Uses of DamageSource in net.minecraft.world.entity.vehicle
Modifier and TypeMethodDescriptionboolean
MinecartTNT.causeFallDamage
(float p_150347_, float p_150348_, DamageSource p_150349_) default void
ContainerEntity.chestVehicleDestroyed
(DamageSource p_219928_, Level p_219929_, Entity p_219930_) private static boolean
MinecartTNT.damageSourceIgnitesTnt
(DamageSource p_312109_) void
AbstractMinecartContainer.destroy
(DamageSource p_38228_) void
ChestBoat.destroy
(DamageSource p_219892_) void
MinecartTNT.destroy
(DamageSource p_38664_) protected void
VehicleEntity.destroy
(DamageSource p_306223_) protected void
MinecartTNT.explode
(DamageSource p_259539_, double p_260287_) boolean
MinecartTNT.hurt
(DamageSource p_38666_, float p_38667_) boolean
VehicleEntity.hurt
(DamageSource p_305898_, float p_305999_) (package private) boolean
MinecartTNT.shouldSourceDestroy
(DamageSource p_312558_) (package private) boolean
VehicleEntity.shouldSourceDestroy
(DamageSource p_312875_) -
Uses of DamageSource in net.minecraft.world.item
-
Uses of DamageSource in net.minecraft.world.item.enchantment
Modifier and TypeMethodDescriptionint
Enchantment.getDamageProtection
(int p_44680_, DamageSource p_44681_) static int
EnchantmentHelper.getDamageProtection
(Iterable<ItemStack> p_44857_, DamageSource p_44858_) int
ProtectionEnchantment.getDamageProtection
(int p_45133_, DamageSource p_45134_) -
Uses of DamageSource in net.minecraft.world.level
Modifier and TypeMethodDescriptionstatic DamageSource
Explosion.getDefaultDamageSource
(Level p_312716_, Entity p_312608_) Modifier and TypeMethodDescriptionvoid
Level.broadcastDamageEvent
(Entity p_270831_, DamageSource p_270361_) Level.explode
(Entity p_256145_, DamageSource p_256004_, ExplosionDamageCalculator p_255696_, double p_256208_, double p_256036_, double p_255746_, float p_256647_, boolean p_256098_, Level.ExplosionInteraction p_256104_) Level.explode
(Entity p_311934_, DamageSource p_312790_, ExplosionDamageCalculator p_311975_, double p_312493_, double p_312456_, double p_312719_, float p_312292_, boolean p_312144_, Level.ExplosionInteraction p_312265_, boolean p_312145_, ParticleOptions p_312842_, ParticleOptions p_312060_, Holder<SoundEvent> p_320283_) Level.explode
(Entity p_256233_, DamageSource p_255861_, ExplosionDamageCalculator p_255867_, double p_256447_, double p_255732_, double p_255717_, float p_256013_, boolean p_256228_, Level.ExplosionInteraction p_255784_, ParticleOptions p_311886_, ParticleOptions p_311887_, Holder<SoundEvent> p_320084_) Level.explode
(Entity p_255653_, DamageSource p_256558_, ExplosionDamageCalculator p_255929_, Vec3 p_256001_, float p_255963_, boolean p_256099_, Level.ExplosionInteraction p_256371_) ModifierConstructorDescriptionExplosion
(Level p_46024_, Entity p_46025_, DamageSource p_312268_, ExplosionDamageCalculator p_312205_, double p_46026_, double p_46027_, double p_46028_, float p_46029_, boolean p_312333_, Explosion.BlockInteraction p_312294_, ParticleOptions p_312158_, ParticleOptions p_311904_, Holder<SoundEvent> p_320270_) -
Uses of DamageSource in net.minecraft.world.level.block
Modifier and TypeMethodDescriptionAnvilBlock.getFallDamageSource
(Entity p_254036_) default DamageSource
Fallable.getFallDamageSource
(Entity p_253907_) PointedDripstoneBlock.getFallDamageSource
(Entity p_254432_) -
Uses of DamageSource in net.minecraft.world.level.dimension.end
Modifier and TypeMethodDescriptionvoid
EndDragonFight.onCrystalDestroyed
(EndCrystal p_64083_, DamageSource p_64084_) -
Uses of DamageSource in net.minecraft.world.level.storage.loot.parameters
Modifier and TypeFieldDescriptionstatic final LootContextParam
<DamageSource> LootContextParams.DAMAGE_SOURCE
-
Uses of DamageSource in net.neoforged.neoforge.common
Modifier and TypeMethodDescriptionstatic int
CommonHooks.getLootingLevel
(Entity target, @Nullable Entity killer, @Nullable DamageSource cause) static int
CommonHooks.getLootingLevel
(LivingEntity target, @Nullable DamageSource cause, int level) static boolean
CommonHooks.onLivingAttack
(LivingEntity entity, DamageSource src, float amount) static float
CommonHooks.onLivingDamage
(LivingEntity entity, DamageSource src, float amount) static boolean
CommonHooks.onLivingDeath
(LivingEntity entity, DamageSource src) static boolean
CommonHooks.onLivingDrops
(LivingEntity entity, DamageSource source, Collection<ItemEntity> drops, int lootingLevel, boolean recentlyHit) static float
CommonHooks.onLivingHurt
(LivingEntity entity, DamageSource src, float amount) static boolean
CommonHooks.onLivingUseTotem
(LivingEntity entity, DamageSource damageSource, ItemStack totem, InteractionHand hand) static boolean
CommonHooks.onPlayerAttack
(LivingEntity entity, DamageSource src, float amount) static ShieldBlockEvent
CommonHooks.onShieldBlock
(LivingEntity blocker, DamageSource source, float blocked) -
Uses of DamageSource in net.neoforged.neoforge.common.damagesource
Modifier 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. -
Uses of DamageSource in net.neoforged.neoforge.common.extensions
Modifier and TypeMethodDescriptiondefault 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
Modifier and TypeMethodDescriptionvoid
FakePlayer.die
(DamageSource source) boolean
FakePlayer.isInvulnerableTo
(DamageSource source) -
Uses of DamageSource in net.neoforged.neoforge.event.entity.living
Modifier and TypeFieldDescriptionprivate final @Nullable DamageSource
LootingLevelEvent.damageSource
private final DamageSource
LivingAttackEvent.source
private final DamageSource
LivingDamageEvent.source
private final DamageSource
LivingDeathEvent.source
private final DamageSource
LivingDropsEvent.source
private final DamageSource
LivingHurtEvent.source
private final DamageSource
LivingUseTotemEvent.source
private final DamageSource
ShieldBlockEvent.source
Modifier and TypeMethodDescription@Nullable DamageSource
LootingLevelEvent.getDamageSource()
ShieldBlockEvent.getDamageSource()
LivingAttackEvent.getSource()
LivingDamageEvent.getSource()
LivingDeathEvent.getSource()
LivingDropsEvent.getSource()
LivingHurtEvent.getSource()
LivingUseTotemEvent.getSource()
Returns the damage source that caused the entity to die.ModifierConstructorDescriptionLivingAttackEvent
(LivingEntity entity, DamageSource source, float amount) LivingDamageEvent
(LivingEntity entity, DamageSource source, float amount) LivingDeathEvent
(LivingEntity entity, DamageSource source) LivingDropsEvent
(LivingEntity entity, DamageSource source, Collection<ItemEntity> drops, int lootingLevel, boolean recentlyHit) LivingHurtEvent
(LivingEntity entity, DamageSource source, float amount) LivingUseTotemEvent
(LivingEntity entity, DamageSource source, ItemStack totem, InteractionHand hand) LootingLevelEvent
(LivingEntity entity, @Nullable DamageSource damageSource, int lootingLevel) ShieldBlockEvent
(LivingEntity blocker, DamageSource source, float blocked) -
Uses of DamageSource in net.neoforged.neoforge.oldtest.entity
Modifier and TypeMethodDescriptionboolean
PartEntityTest.TestEntityPart.hurt
(DamageSource source, float amount)