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 TypeMethodDescriptionbooleanDamagePredicate.matches(ServerPlayer player, DamageSource source, float dealtDamage, float takenDamage, boolean blocked) booleanDamageSourcePredicate.matches(ServerLevel level, Vec3 position, DamageSource source) booleanDamageSourcePredicate.matches(ServerPlayer player, DamageSource source) booleanEntityHurtPlayerTrigger.TriggerInstance.matches(ServerPlayer player, DamageSource source, float dealtDamage, float takenDamage, boolean blocked) booleanKilledTrigger.TriggerInstance.matches(ServerPlayer player, LootContext context, DamageSource source) booleanPlayerHurtEntityTrigger.TriggerInstance.matches(ServerPlayer player, LootContext context, DamageSource damage, float dealt, float taken, boolean blocked) voidEntityHurtPlayerTrigger.trigger(ServerPlayer player, DamageSource source, float dealtDamage, float takenDamage, boolean blocked) voidKilledTrigger.trigger(ServerPlayer player, Entity entity, DamageSource source) voidPlayerHurtEntityTrigger.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 voidLocalPlayer.actuallyHurt(DamageSource damageSrc, float damageAmount) Deals damage to the entity.booleanLocalPlayer.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanRemotePlayer.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 intDamageCommand.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 TypeMethodDescriptionvoidServerPlayer.awardKillScore(Entity killed, int scoreValue, DamageSource damageSource) voidServerLevel.broadcastDamageEvent(Entity entity, DamageSource damageSource) voidServerPlayer.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 floatServerPlayer.getEnchantedDamage(Entity entity, float damage, DamageSource damageSource) booleanServerPlayer.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanServerPlayer.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 DamageSourceDamageSources.cactusprivate final DamageSourceDamageSources.campfireprivate final DamageSourceDamageSources.crammingprivate final DamageSourceDamageSources.dragonBreathprivate final DamageSourceDamageSources.drownprivate final DamageSourceDamageSources.dryOutprivate final DamageSourceDamageSources.fallprivate final DamageSourceDamageSources.fellOutOfWorldprivate final DamageSourceDamageSources.flyIntoWallprivate final DamageSourceDamageSources.freezeprivate final DamageSourceDamageSources.genericprivate final DamageSourceDamageSources.genericKillprivate final DamageSourceDamageSources.hotFloorprivate final DamageSourceDamageSources.inFireprivate final DamageSourceDamageSources.inWallprivate final DamageSourceDamageSources.lavaprivate final DamageSourceDamageSources.lightningBoltprivate final DamageSourceDamageSources.magicprivate final DamageSourceDamageSources.onFireprivate final DamageSourceDamageSources.outsideBorderprivate final DamageSourceCombatEntry.sourceThe field for thesourcerecord component.private final DamageSourceDamageSources.stalagmiteprivate final DamageSourceDamageSources.starveprivate final DamageSourceDamageSources.sweetBerryBushprivate final DamageSourceDamageSources.witherMethods 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 thesourcerecord 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 floatCombatRules.getDamageAfterAbsorb(LivingEntity entity, float damage, DamageSource damageSource, float armorValue, float armorToughness) voidCombatTracker.recordDamage(DamageSource source, float damage) private static booleanCombatTracker.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 aCombatEntryrecord class. -
Uses of DamageSource in net.minecraft.world.effect
Methods in net.minecraft.world.effect with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidInfestedMobEffect.onMobHurt(LivingEntity livingEntity, int amplifier, DamageSource damageSource, float amount) voidMobEffect.onMobHurt(LivingEntity livingEntity, int amplifier, DamageSource damageSource, float amount) voidMobEffectInstance.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 voidLivingEntity.actuallyHurt(DamageSource damageSource, float damageAmount) Deals damage to the entity.voidEntity.awardKillScore(Entity killed, int scoreValue, DamageSource source) booleanEntity.causeFallDamage(float fallDistance, float multiplier, DamageSource source) booleanLivingEntity.causeFallDamage(float fallDistance, float multiplier, DamageSource source) private booleanLivingEntity.checkTotemDeathProtection(DamageSource damageSource) voidLivingEntity.die(DamageSource damageSource) Called when the mob's health reaches 0.voidTamableAnimal.die(DamageSource cause) Called when the mob's health reaches 0.protected voidLivingEntity.doHurtEquipment(DamageSource damageSource, float damageAmount, EquipmentSlot... slots) protected voidLivingEntity.dropAllDeathLoot(ServerLevel p_level, DamageSource damageSource) protected voidLivingEntity.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidMob.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidLivingEntity.dropFromLootTable(DamageSource damageSource, boolean hitByPlayer) protected voidMob.dropFromLootTable(DamageSource damageSource, boolean attackedRecently) protected floatLivingEntity.getDamageAfterArmorAbsorb(DamageSource damageSource, float damageAmount) Reduces damage, depending on armorprotected floatLivingEntity.getDamageAfterMagicAbsorb(DamageSource damageSource, float damageAmount) Reduces damage, depending on potionsprotected SoundEventGlowSquid.getHurtSound(DamageSource damageSource) protected SoundEventLivingEntity.getHurtSound(DamageSource damageSource) protected floatLivingEntity.getKnockback(Entity attacker, DamageSource damageSource) voidEntity.handleDamageEvent(DamageSource damageSource) voidLivingEntity.handleDamageEvent(DamageSource damageSource) booleanEntity.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanExperienceOrb.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanGlowSquid.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanLivingEntity.hurt(DamageSource source, float amount) Called when the entity is attacked.protected voidLivingEntity.hurtArmor(DamageSource damageSource, float damageAmount) protected voidLivingEntity.hurtHelmet(DamageSource damageSource, float damageAmount) booleanLivingEntity.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.booleanEntity.isInvulnerableTo(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource.booleanLivingEntity.isInvulnerableTo(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource.protected voidLivingEntity.playHurtSound(DamageSource source) protected voidMob.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 SoundEventBat.getHurtSound(DamageSource damageSource) booleanBat.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 voidAnimal.actuallyHurt(DamageSource damageSource, float damageAmount) Deals damage to the entity.protected voidWolf.actuallyHurt(DamageSource damageSource, float damageAmount) Deals damage to the entity.private booleanWolf.canArmorAbsorb(DamageSource damageSource) voidIronGolem.die(DamageSource cause) Called when the mob's health reaches 0.voidWolf.die(DamageSource cause) Called when the mob's health reaches 0.protected voidFox.dropAllDeathLoot(ServerLevel level, DamageSource damageSource) protected SoundEventAbstractGolem.getHurtSound(DamageSource damageSource) protected SoundEventBee.getHurtSound(DamageSource damageSource) protected SoundEventCat.getHurtSound(DamageSource damageSource) protected SoundEventChicken.getHurtSound(DamageSource damageSource) protected SoundEventCod.getHurtSound(DamageSource damageSource) protected SoundEventCow.getHurtSound(DamageSource damageSource) protected SoundEventDolphin.getHurtSound(DamageSource damageSource) protected SoundEventFox.getHurtSound(DamageSource damageSource) protected SoundEventIronGolem.getHurtSound(DamageSource damageSource) protected SoundEventOcelot.getHurtSound(DamageSource damageSource) protected SoundEventPanda.getHurtSound(DamageSource damageSource) protected SoundEventParrot.getHurtSound(DamageSource damageSource) protected SoundEventPig.getHurtSound(DamageSource damageSource) protected SoundEventPolarBear.getHurtSound(DamageSource damageSource) protected SoundEventPufferfish.getHurtSound(DamageSource damageSource) protected SoundEventRabbit.getHurtSound(DamageSource damageSource) protected SoundEventSalmon.getHurtSound(DamageSource damageSource) protected SoundEventSheep.getHurtSound(DamageSource damageSource) protected SoundEventSnowGolem.getHurtSound(DamageSource damageSource) protected SoundEventSquid.getHurtSound(DamageSource damageSource) protected SoundEventTropicalFish.getHurtSound(DamageSource damageSource) protected SoundEventTurtle.getHurtSound(DamageSource damageSource) protected SoundEventWolf.getHurtSound(DamageSource damageSource) booleanBee.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanIronGolem.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanPanda.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanParrot.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanSquid.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanWolf.hurt(DamageSource source, float amount) Called when the entity is attacked.protected voidWolf.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 SoundEventAllay.getHurtSound(DamageSource damageSource) booleanAllay.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 voidArmadillo.actuallyHurt(DamageSource damageSource, float damageAmount) Deals damage to the entity.protected SoundEventArmadillo.getHurtSound(DamageSource damageSource) booleanArmadillo.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 SoundEventAxolotl.getHurtSound(DamageSource damageSource) booleanAxolotl.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 voidCamel.actuallyHurt(DamageSource damageSource, float damageAmount) Deals damage to the entity.protected SoundEventCamel.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 SoundEventFrog.getHurtSound(DamageSource damageSource) protected SoundEventTadpole.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 SoundEventGoat.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 TypeMethodDescriptionbooleanAbstractHorse.causeFallDamage(float fallDistance, float multiplier, DamageSource source) booleanLlama.causeFallDamage(float fallDistance, float multiplier, DamageSource source) protected SoundEventDonkey.getHurtSound(DamageSource damageSource) protected SoundEventHorse.getHurtSound(DamageSource damageSource) protected SoundEventLlama.getHurtSound(DamageSource damageSource) protected SoundEventMule.getHurtSound(DamageSource damageSource) protected SoundEventSkeletonHorse.getHurtSound(DamageSource damageSource) protected SoundEventZombieHorse.getHurtSound(DamageSource damageSource) booleanAbstractHorse.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 TypeMethodDescriptionvoidSniffer.die(DamageSource damageSource) Called when the mob's health reaches 0.protected SoundEventSniffer.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 TypeMethodDescriptionbooleanEnderDragonPart.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 SoundEventEnderDragon.getHurtSound(DamageSource damageSource) booleanEndCrystal.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanEnderDragon.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanEnderDragon.hurt(EnderDragonPart part, DamageSource source, float damage) voidEnderDragon.onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource damageSource) private voidEndCrystal.onDestroyedBy(DamageSource source) protected booleanEnderDragon.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 TypeMethodDescriptionvoidAbstractDragonPhaseInstance.onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource dmgSrc, Player plyr) voidDragonHoldingPatternPhase.onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource dmgSrc, Player plyr) voidDragonPhaseInstance.onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource damageSource, Player player) floatAbstractDragonPhaseInstance.onHurt(DamageSource damageSource, float amount) floatAbstractDragonSittingPhase.onHurt(DamageSource p_31199_, float p_31200_) floatDragonPhaseInstance.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 voidWitherBoss.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected SoundEventWitherBoss.getHurtSound(DamageSource damageSource) booleanWitherBoss.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 voidArmorStand.brokenByAnything(ServerLevel level, DamageSource damageSource) private voidArmorStand.brokenByPlayer(ServerLevel level, DamageSource damageSource) private voidArmorStand.causeDamage(ServerLevel level, DamageSource damageSource, float damageAmount) protected SoundEventArmorStand.getHurtSound(DamageSource damageSource) booleanArmorStand.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanBlockAttachedEntity.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanItemFrame.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 TypeMethodDescriptionbooleanFallingBlockEntity.causeFallDamage(float fallDistance, float multiplier, DamageSource source) booleanItemEntity.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 TypeMethodDescriptionbooleanCreeper.causeFallDamage(float fallDistance, float multiplier, DamageSource source) protected voidCreeper.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidEnderMan.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidSkeleton.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidWitherSkeleton.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidZombie.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected floatWitch.getDamageAfterMagicAbsorb(DamageSource source, float damage) Reduces damage, depending on potionsprotected SoundEventBlaze.getHurtSound(DamageSource damageSource) protected SoundEventBogged.getHurtSound(DamageSource damageSource) protected SoundEventCreeper.getHurtSound(DamageSource damageSource) protected SoundEventDrowned.getHurtSound(DamageSource damageSource) protected SoundEventElderGuardian.getHurtSound(DamageSource damageSource) protected SoundEventEnderMan.getHurtSound(DamageSource damageSource) protected SoundEventEndermite.getHurtSound(DamageSource damageSource) protected SoundEventEvoker.getHurtSound(DamageSource damageSource) protected SoundEventGhast.getHurtSound(DamageSource damageSource) protected SoundEventGuardian.getHurtSound(DamageSource damageSource) protected SoundEventHusk.getHurtSound(DamageSource damageSource) protected SoundEventIllusioner.getHurtSound(DamageSource damageSource) protected SoundEventMagmaCube.getHurtSound(DamageSource damageSource) protected SoundEventMonster.getHurtSound(DamageSource damageSource) protected SoundEventPhantom.getHurtSound(DamageSource damageSource) protected SoundEventPillager.getHurtSound(DamageSource damageSource) protected SoundEventRavager.getHurtSound(DamageSource damageSource) protected SoundEventShulker.getHurtSound(DamageSource damageSource) protected SoundEventSilverfish.getHurtSound(DamageSource damageSource) protected SoundEventSkeleton.getHurtSound(DamageSource damageSource) protected SoundEventSlime.getHurtSound(DamageSource damageSource) protected SoundEventSpider.getHurtSound(DamageSource damageSource) protected SoundEventStray.getHurtSound(DamageSource damageSource) protected SoundEventStrider.getHurtSound(DamageSource damageSource) protected SoundEventVex.getHurtSound(DamageSource damageSource) protected SoundEventVindicator.getHurtSound(DamageSource damageSource) protected SoundEventWitch.getHurtSound(DamageSource damageSource) protected SoundEventWitherSkeleton.getHurtSound(DamageSource damageSource) protected SoundEventZoglin.getHurtSound(DamageSource damageSource) protected SoundEventZombie.getHurtSound(DamageSource damageSource) ZombieVillager.getHurtSound(DamageSource damageSource) protected SoundEventZombifiedPiglin.getHurtSound(DamageSource damageSource) booleanEnderMan.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanGhast.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanGuardian.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanShulker.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanSilverfish.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanZoglin.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanZombie.hurt(DamageSource source, float amount) Called when the entity is attacked.private booleanEnderMan.hurtWithCleanWater(DamageSource source, ThrownPotion potion, float amount) booleanGhast.isInvulnerableTo(DamageSource source) Returns whether this Entity is invulnerable to the given DamageSource.private static booleanGhast.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 TypeMethodDescriptionbooleanBreeze.causeFallDamage(float fallDistance, float multiplier, DamageSource source) protected SoundEventBreeze.getHurtSound(DamageSource damageSource) booleanBreeze.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 SoundEventHoglin.getHurtSound(DamageSource damageSource) booleanHoglin.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 voidPiglin.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected SoundEventPiglin.getHurtSound(DamageSource damageSource) protected SoundEventPiglinBrute.getHurtSound(DamageSource damageSource) booleanPiglin.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanPiglinBrute.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 SoundEventWarden.getHurtSound(DamageSource damageSource) booleanWarden.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanWarden.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 TypeMethodDescriptionvoidAbstractVillager.die(DamageSource cause) Called when the mob's health reaches 0.voidVillager.die(DamageSource cause) Called when the mob's health reaches 0.protected SoundEventVillager.getHurtSound(DamageSource damageSource) protected SoundEventWanderingTrader.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 voidPlayer.actuallyHurt(DamageSource damageSrc, float damageAmount) Deals damage to the entity.booleanPlayer.causeFallDamage(float fallDistance, float multiplier, DamageSource source) voidPlayer.die(DamageSource cause) Called when the mob's health reaches 0.protected floatPlayer.getEnchantedDamage(Entity entity, float damage, DamageSource damageSource) protected SoundEventPlayer.getHurtSound(DamageSource damageSource) booleanPlayer.hurt(DamageSource source, float amount) Called when the entity is attacked.protected voidPlayer.hurtArmor(DamageSource damageSource, float damage) protected voidPlayer.hurtHelmet(DamageSource damageSource, float damageAmount) booleanPlayer.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.DoubleDoubleImmutablePairFireworkRocketEntity.calculateHorizontalHurtKnockbackDirection(LivingEntity entity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePairProjectile.calculateHorizontalHurtKnockbackDirection(LivingEntity entity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePairThrownPotion.calculateHorizontalHurtKnockbackDirection(LivingEntity entity, DamageSource damageSource) protected voidAbstractArrow.doKnockback(LivingEntity entity, DamageSource damageSource) booleanAbstractHurtingProjectile.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanDragonFireball.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanFireball.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanShulkerBullet.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanSmallFireball.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanWitherSkull.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 TypeMethodDescriptionbooleanAbstractWindCharge.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 TypeMethodDescriptionvoidRaider.die(DamageSource cause) Called when the mob's health reaches 0.booleanRaider.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 TypeMethodDescriptionbooleanMinecartTNT.causeFallDamage(float fallDistance, float multiplier, DamageSource source) default voidContainerEntity.chestVehicleDestroyed(DamageSource damageSource, Level level, Entity p_entity) private static booleanMinecartTNT.damageSourceIgnitesTnt(DamageSource source) voidAbstractMinecartContainer.destroy(DamageSource source) voidChestBoat.destroy(DamageSource source) voidMinecartTNT.destroy(DamageSource source) protected voidVehicleEntity.destroy(DamageSource source) protected voidMinecartTNT.explode(DamageSource damageSource, double radiusModifier) booleanMinecartTNT.hurt(DamageSource source, float amount) Called when the entity is attacked.booleanVehicleEntity.hurt(DamageSource source, float amount) Called when the entity is attacked.(package private) booleanMinecartTNT.shouldSourceDestroy(DamageSource source) (package private) booleanVehicleEntity.shouldSourceDestroy(DamageSource source) -
Uses of DamageSource in net.minecraft.world.item
Methods in net.minecraft.world.item with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanItemStack.canBeHurtBy(DamageSource damageSource) floatItem.getAttackDamageBonus(Entity target, float damage, DamageSource damageSource) floatMaceItem.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 LootContextEnchantment.damageContext(ServerLevel level, int enchantmentLevel, Entity entity, DamageSource damageSource) voidEnchantment.doPostAttack(ServerLevel level, int enchantmentLevel, EnchantedItemInUse item, EnchantmentTarget target, Entity entity, DamageSource damageSource) static voidEnchantment.doPostAttack(TargetedConditionalEffect<EnchantmentEntityEffect> effect, ServerLevel level, int enchantmentLevel, EnchantedItemInUse item, Entity p_entity, DamageSource damageSource) static voidEnchantmentHelper.doPostAttackEffects(ServerLevel level, Entity entity, DamageSource damageSource) static voidEnchantmentHelper.doPostAttackEffectsWithItemSource(ServerLevel level, Entity entity, DamageSource damageSource, ItemStack itemSource) static floatEnchantmentHelper.getDamageProtection(ServerLevel level, LivingEntity entity, DamageSource damageSource) booleanEnchantment.isImmuneToDamage(ServerLevel level, int enchantmentLevel, Entity entity, DamageSource damageSource) static booleanEnchantmentHelper.isImmuneToDamage(ServerLevel level, LivingEntity entity, DamageSource damageSource) static floatEnchantmentHelper.modifyArmorEffectiveness(ServerLevel level, ItemStack tool, Entity entity, DamageSource damageSource, float armorEffectiveness) voidEnchantment.modifyArmorEffectivness(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat armorEffectiveness) voidEnchantment.modifyDamage(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat damage) static floatEnchantmentHelper.modifyDamage(ServerLevel level, ItemStack tool, Entity entity, DamageSource damageSource, float damage) voidEnchantment.modifyDamageFilteredValue(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> componentType, ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat value) voidEnchantment.modifyDamageProtection(ServerLevel level, int enchantmentLevel, ItemStack stack, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat damageProtection) voidEnchantment.modifyFallBasedDamage(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat fallBasedDamage) static floatEnchantmentHelper.modifyFallBasedDamage(ServerLevel level, ItemStack tool, Entity enity, DamageSource damageSource, float fallBasedDamage) voidEnchantment.modifyKnockback(ServerLevel level, int enchantmentLevel, ItemStack tool, Entity entity, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat knockback) static floatEnchantmentHelper.modifyKnockback(ServerLevel level, ItemStack tool, Entity entity, DamageSource damageSource, float knockback) static floatEnchantmentHelper.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 DamageSourceExplodeEffect.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 DamageSourceExplosion.getDefaultDamageSource(Level level, Entity source) Methods in net.minecraft.world.level with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidLevel.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 DamageSourceFallable.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 TypeMethodDescriptionvoidEndDragonFight.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 booleanCommonHooks.isEntityInvulnerableTo(Entity entity, DamageSource source, boolean isInvul) Creates and posts anEntityInvulnerabilityCheckEvent.static voidCommonHooks.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 booleanCommonHooks.onLivingDeath(LivingEntity entity, DamageSource src) static booleanCommonHooks.onLivingDrops(LivingEntity entity, DamageSource source, Collection<ItemEntity> drops, boolean recentlyHit) static booleanCommonHooks.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 TypeMethodDescriptionfloatIScalingFunction.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 booleanIItemExtension.canBeHurtBy(ItemStack stack, DamageSource source) Returns false to make item entity immune to the damage..default voidIItemExtension.onDestroyed(ItemEntity itemEntity, DamageSource damageSource) Called when an item entity for this stack is destroyed.default voidIItemStackExtension.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 TypeMethodDescriptionvoidFakePlayer.die(DamageSource source) booleanFakePlayer.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 DamageSourceEntityInvulnerabilityCheckEvent.sourceMethods 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 DamageSourceLivingDamageEvent.Post.sourceprivate final DamageSourceLivingDeathEvent.sourceprivate final DamageSourceLivingDropsEvent.sourceprivate final DamageSourceLivingUseTotemEvent.sourceMethods in net.neoforged.neoforge.event.entity.living that return DamageSourceModifier and TypeMethodDescriptionLivingShieldBlockEvent.getDamageSource()LivingDamageEvent.Post.getSource()Returns theDamageSourcefor this damage sequence.LivingDamageEvent.Pre.getSource()Returns the damage source for this damage sequence.LivingDeathEvent.getSource()LivingDropsEvent.getSource()LivingIncomingDamageEvent.getSource()Returns theDamageSourcefor 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)