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.multiplayer
Methods in net.minecraft.client.multiplayer with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidClientLevel.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) -
Uses of DamageSource in net.minecraft.client.player
Methods in net.minecraft.client.player with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.gametest.framework
Methods in net.minecraft.gametest.framework with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidGameTestHelper.hurt(Entity entity, DamageSource damageSource, float amount) -
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 entity, DamageSource damageSource) voidServerLevel.broadcastDamageEvent(Entity entity, DamageSource damageSource) voidServerPlayer.die(DamageSource cause) Called when the mob's health reaches 0.voidServerLevel.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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanServerPlayer.isInvulnerableTo(ServerLevel level, DamageSource 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.enderPearlprivate 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.enderPearl()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(ServerLevel level, LivingEntity entity, int amplifier, DamageSource damageSource, float amount) voidMobEffect.onMobHurt(ServerLevel level, LivingEntity entity, int amplifier, DamageSource damageSource, float amount) voidMobEffectInstance.onMobHurt(ServerLevel level, LivingEntity entity, 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(ServerLevel level, DamageSource damageSource, float amount) floatLivingEntity.applyItemBlocking(ServerLevel level, DamageSource damageSource, float damageAmount) voidEntity.awardKillScore(Entity entity, DamageSource damageSource) booleanEntity.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) booleanLivingEntity.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) 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 level, DamageSource damageSource) protected voidLivingEntity.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidMob.dropCustomDeathLoot(ServerLevel level, DamageSource damageSource, boolean recentlyHit) protected voidLivingEntity.dropFromLootTable(ServerLevel level, DamageSource damageSource, boolean playerKill) protected voidMob.dropFromLootTable(ServerLevel level, DamageSource damageSource, boolean playerKill) 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) final voidEntity.hurt(DamageSource damageSource, float amount) Deprecated.protected voidLivingEntity.hurtArmor(DamageSource damageSource, float damageAmount) booleanEntity.hurtClient(DamageSource damageSource) final booleanExperienceOrb.hurtClient(DamageSource damageSource) protected voidLivingEntity.hurtHelmet(DamageSource damageSource, float damageAmount) final booleanEntity.hurtOrSimulate(DamageSource damageSource, float amount) Deprecated.final booleanAreaEffectCloud.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanDisplay.hurtServer(ServerLevel level, DamageSource damageSource, float amount) abstract booleanEntity.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanExperienceOrb.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanGlowSquid.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanInteraction.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanLightningBolt.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanLivingEntity.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanMarker.hurtServer(ServerLevel p_376861_, DamageSource p_376481_, float p_376416_) final booleanOminousItemSpawner.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanLivingEntity.isInvulnerableTo(ServerLevel level, DamageSource damageSource) protected final booleanEntity.isInvulnerableToBase(DamageSource damageSource) protected voidLivingEntity.playHurtSound(DamageSource source) protected voidMob.playHurtSound(DamageSource source) private voidLivingEntity.playSecondaryHurtSound(DamageSource damageSource) protected voidEntity.propagateFallToPassengers(double fallDistance, float damageMultiplier, DamageSource damageSource) protected voidLivingEntity.resolveMobResponsibleForDamage(DamageSource damageSource) protected PlayerLivingEntity.resolvePlayerResponsibleForDamage(DamageSource damageSource) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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(ServerLevel level, DamageSource damageSource, float amount) voidIronGolem.die(DamageSource cause) Called when the mob's health reaches 0.protected voidFox.dropAllDeathLoot(ServerLevel level, DamageSource damageSource) protected SoundEventAbstractCow.getHurtSound(DamageSource p_401014_) 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 SoundEventDolphin.getHurtSound(DamageSource damageSource) protected SoundEventFox.getHurtSound(DamageSource damageSource) protected SoundEventHappyGhast.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 SoundEventSnowGolem.getHurtSound(DamageSource damageSource) protected SoundEventSquid.getHurtSound(DamageSource damageSource) protected SoundEventTropicalFish.getHurtSound(DamageSource damageSource) protected SoundEventTurtle.getHurtSound(DamageSource damageSource) booleanBee.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanIronGolem.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanPanda.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanParrot.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanSquid.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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(ServerLevel level, DamageSource damageSource, float amount) protected SoundEventArmadillo.getHurtSound(DamageSource damageSource) booleanArmadillo.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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(ServerLevel level, DamageSource damageSource, float amount) 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(double fallDistance, float damageMultiplier, DamageSource damageSource) booleanLlama.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) 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) protected voidHorse.hurtArmor(DamageSource damageSource, float damageAmount) booleanAbstractHorse.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world.entity.animal.sheep
Methods in net.minecraft.world.entity.animal.sheep with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventSheep.getHurtSound(DamageSource damageSource) -
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.animal.wolf
Methods in net.minecraft.world.entity.animal.wolf with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidWolf.actuallyHurt(ServerLevel level, DamageSource damageSource, float amount) private booleanWolf.canArmorAbsorb(DamageSource damageSource) voidWolf.die(DamageSource cause) Called when the mob's health reaches 0.protected SoundEventWolf.getHurtSound(DamageSource damageSource) protected voidWolf.hurtArmor(DamageSource damageSource, float damageAmount) booleanWolf.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world.entity.boss
Methods in net.minecraft.world.entity.boss with parameters of type DamageSourceModifier and TypeMethodDescriptionfinal booleanEnderDragonPart.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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) booleanEnderDragon.hurt(ServerLevel level, EnderDragonPart part, DamageSource damageSource, float amount) final booleanEndCrystal.hurtClient(DamageSource damageSource) final booleanEndCrystal.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanEnderDragon.hurtServer(ServerLevel level, DamageSource damageSource, float amount) voidEnderDragon.onCrystalDestroyed(ServerLevel level, EndCrystal crystal, BlockPos pos, DamageSource damageSource) private voidEndCrystal.onDestroyedBy(ServerLevel level, DamageSource damageSource) protected voidEnderDragon.reallyHurt(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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 static booleanItemFrame.canHurtWhenFixed(DamageSource damageSource) private voidArmorStand.causeDamage(ServerLevel level, DamageSource damageSource, float damageAmount) protected SoundEventArmorStand.getHurtSound(DamageSource damageSource) booleanBlockAttachedEntity.hurtClient(DamageSource damageSource) booleanItemFrame.hurtClient(DamageSource damageSource) booleanArmorStand.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanBlockAttachedEntity.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanItemFrame.hurtServer(ServerLevel level, DamageSource damageSource, float amount) private booleanItemFrame.shouldDamageDropItem(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.item
Methods in net.minecraft.world.entity.item with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanFallingBlockEntity.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) final booleanItemEntity.hurtClient(DamageSource damageSource) final booleanFallingBlockEntity.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanItemEntity.hurtServer(ServerLevel level, DamageSource damageSource, float amount) final booleanPrimedTnt.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world.entity.monster
Methods in net.minecraft.world.entity.monster with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanCreeper.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) 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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanGhast.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanGuardian.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanShulker.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanSilverfish.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanZoglin.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanZombie.hurtServer(ServerLevel level, DamageSource damageSource, float amount) private booleanEnderMan.hurtWithCleanWater(ServerLevel level, DamageSource damageSource, AbstractThrownPotion potion, float damageAmount) booleanGhast.isInvulnerableTo(ServerLevel level, DamageSource 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(double fallDistance, float damageMultiplier, DamageSource damageSource) protected SoundEventBreeze.getHurtSound(DamageSource damageSource) booleanBreeze.isInvulnerableTo(ServerLevel level, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.monster.creaking
Methods in net.minecraft.world.entity.monster.creaking with parameters of type DamageSourceModifier and TypeMethodDescriptionCreaking.blameSourceForDamage(DamageSource damageSource) voidCreaking.creakingDeathEffects(DamageSource damageSource) protected SoundEventCreaking.getHurtSound(DamageSource damageSource) booleanCreaking.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanPiglinBrute.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanWarden.isInvulnerableTo(ServerLevel level, DamageSource 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(ServerLevel level, DamageSource damageSource, float amount) booleanPlayer.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) 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) protected voidPlayer.hurtArmor(DamageSource damageSource, float damage) protected voidPlayer.hurtHelmet(DamageSource damageSource, float damageAmount) booleanPlayer.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanPlayer.isInvulnerableTo(ServerLevel level, DamageSource 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.DoubleDoubleImmutablePairAbstractThrownPotion.calculateHorizontalHurtKnockbackDirection(LivingEntity entity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePairFireworkRocketEntity.calculateHorizontalHurtKnockbackDirection(LivingEntity entity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePairProjectile.calculateHorizontalHurtKnockbackDirection(LivingEntity entity, DamageSource damageSource) protected voidAbstractArrow.doKnockback(LivingEntity entity, DamageSource damageSource) booleanShulkerBullet.hurtClient(DamageSource damageSource) booleanAbstractHurtingProjectile.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanEvokerFangs.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanEyeOfEnder.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanProjectile.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanShulkerBullet.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
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.hurtServer(ServerLevel level, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world.entity.vehicle
Fields in net.minecraft.world.entity.vehicle declared as DamageSourceMethods in net.minecraft.world.entity.vehicle with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanMinecartTNT.causeFallDamage(double fallDistance, float damageMultiplier, DamageSource damageSource) default voidContainerEntity.chestVehicleDestroyed(DamageSource damageSource, ServerLevel level, Entity entity) private static booleanMinecartTNT.damageSourceIgnitesTnt(DamageSource source) voidAbstractChestBoat.destroy(ServerLevel level, DamageSource damageSource) voidAbstractMinecartContainer.destroy(ServerLevel level, DamageSource damageSource) voidMinecartTNT.destroy(ServerLevel level, DamageSource damageSource) protected voidVehicleEntity.destroy(ServerLevel level, DamageSource damageSource) protected voidMinecartTNT.explode(DamageSource damageSource, double radiusModifier) booleanVehicleEntity.hurtClient(DamageSource damageSource) booleanMinecartTNT.hurtServer(ServerLevel level, DamageSource damageSource, float amount) booleanVehicleEntity.hurtServer(ServerLevel level, DamageSource damageSource, float amount) voidMinecartTNT.primeFuse(DamageSource damageSource) (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 that return DamageSourceModifier and TypeMethodDescriptionItem.getDamageSource(LivingEntity entity) MaceItem.getDamageSource(LivingEntity entity) 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.component
Methods in net.minecraft.world.item.component with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanDamageResistant.isResistantTo(DamageSource damageSource) floatBlocksAttacks.DamageReduction.resolve(DamageSource damageSource, float damageAmount, double horizontalAngle) floatBlocksAttacks.resolveBlockedDamage(DamageSource damageSource, float damageAmount, double horizontalAngle) -
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 entity, DamageSource damageSource) static voidEnchantmentHelper.doPostAttackEffects(ServerLevel level, Entity entity, DamageSource damageSource) static voidEnchantmentHelper.doPostAttackEffectsWithItemSource(ServerLevel level, Entity entity, DamageSource damageSource, ItemStack itemSource) static voidEnchantmentHelper.doPostAttackEffectsWithItemSourceOnBreak(ServerLevel level, Entity entity, DamageSource damageSource, ItemStack itemSource, Consumer<Item> onBreak) 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 entity, 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 TypeMethodDescriptionServerExplosion.getDamageSource()static DamageSourceExplosion.getDefaultDamageSource(Level level, Entity source) Methods in net.minecraft.world.level with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidLevel.broadcastDamageEvent(Entity entity, DamageSource damageSource) voidLevel.explode(Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, double x, double y, double z, float radius, boolean fire, Level.ExplosionInteraction explosionInteraction) abstract voidLevel.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) voidLevel.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 DamageSourceModifierConstructorDescriptionServerExplosion(ServerLevel level, Entity source, DamageSource damageSource, ExplosionDamageCalculator damageCalculator, Vec3 center, float radius, boolean fire, Explosion.BlockInteraction blockInteraction) -
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.block.entity
Methods in net.minecraft.world.level.block.entity with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidCreakingHeartBlockEntity.removeProtector(DamageSource damageSource) -
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 ContextKey<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 DamageSource -
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)