Uses of Class
net.minecraft.world.damagesource.DamageSource
Packages that use DamageSource
Package
Description
-
Uses of DamageSource in net.minecraft.advancements.criterion
Methods in net.minecraft.advancements.criterion with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanDamagePredicate.matches(ServerPlayer player, DamageSource source, float originalDamage, float actualDamage, boolean blocked) booleanDamageSourcePredicate.matches(ServerLevel level, Vec3 position, DamageSource source) booleanDamageSourcePredicate.matches(ServerPlayer player, DamageSource source) booleanEntityHurtPlayerTrigger.TriggerInstance.matches(ServerPlayer player, DamageSource source, float originalDamage, float actualDamage, boolean blocked) booleanKilledTrigger.TriggerInstance.matches(ServerPlayer player, LootContext entity, DamageSource killingBlow) booleanPlayerHurtEntityTrigger.TriggerInstance.matches(ServerPlayer player, LootContext victim, DamageSource source, float originalDamage, float actualDamage, boolean blocked) voidEntityHurtPlayerTrigger.trigger(ServerPlayer player, DamageSource source, float originalDamage, float actualDamage, boolean blocked) voidKilledTrigger.trigger(ServerPlayer player, Entity entity, DamageSource killingBlow) voidPlayerHurtEntityTrigger.trigger(ServerPlayer player, Entity victim, DamageSource source, float originalDamage, float actualDamage, boolean blocked) -
Uses of DamageSource in net.minecraft.client.multiplayer
Methods in net.minecraft.client.multiplayer with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidClientLevel.explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float r, boolean fire, Level.ExplosionInteraction interactionType, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, WeightedList<ExplosionParticleInfo> secondaryParticles, 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 source, float damage) -
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 DamageSource -
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 stack, Entity target, float amount, DamageSource source) -
Uses of DamageSource in net.minecraft.server.level
Methods in net.minecraft.server.level with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidServerPlayer.awardKillScore(Entity victim, DamageSource killingBlow) voidServerLevel.broadcastDamageEvent(Entity entity, DamageSource source) voidServerPlayer.die(DamageSource source) Called when the mob's health reaches 0.voidServerLevel.explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float r, boolean fire, Level.ExplosionInteraction interactionType, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, WeightedList<ExplosionParticleInfo> blockParticles, Holder<SoundEvent> explosionSound) protected floatServerPlayer.getEnchantedDamage(Entity entity, float dmg, DamageSource damageSource) booleanServerPlayer.hurtServer(ServerLevel level, DamageSource source, float damage) booleanServerPlayer.isInvulnerableTo(ServerLevel level, DamageSource source) -
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, @Nullable Entity owner) DamageSources.badRespawnPointExplosion(Vec3 boomPos) 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 rocket, @Nullable Entity owner) DamageSources.flyIntoWall()DamageSources.freeze()DamageSources.generic()DamageSources.genericKill()DamageSources.hotFloor()DamageSources.indirectMagic(Entity entity, @Nullable Entity owner) DamageSources.inFire()DamageSources.inWall()DamageSources.lava()DamageSources.lightningBolt()DamageSources.magic()DamageSources.mobAttack(LivingEntity mob) DamageSources.mobProjectile(Entity entity, @Nullable LivingEntity mob) DamageSources.noAggroMobAttack(LivingEntity mob) DamageSources.onFire()DamageSources.outOfBorder()DamageSources.playerAttack(Player player) CombatEntry.source()Returns the value of thesourcerecord component.DamageSources.source(ResourceKey<DamageType> key) DamageSources.source(ResourceKey<DamageType> key, @Nullable Entity cause) DamageSources.source(ResourceKey<DamageType> key, @Nullable Entity directEntity, @Nullable Entity causingEntity) DamageSources.spit(Entity entity, @Nullable LivingEntity mob) DamageSources.stalagmite()DamageSources.starve()DamageSources.sting(LivingEntity mob) DamageSources.sweetBerryBush()DamageSources.windCharge(Entity entity, @Nullable LivingEntity mob) DamageSources.wither()DamageSources.witherSkull(WitherSkull witherSkull, Entity owner) Methods in net.minecraft.world.damagesource with parameters of type DamageSourceModifier and TypeMethodDescriptionstatic floatCombatRules.getDamageAfterAbsorb(LivingEntity victim, float damage, DamageSource source, float totalArmor, 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, @Nullable 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 mob, int amplifier, DamageSource source, float damage) voidMobEffect.onMobHurt(ServerLevel level, LivingEntity mob, int amplifier, DamageSource source, float damage) voidMobEffectInstance.onMobHurt(ServerLevel level, LivingEntity mob, DamageSource source, float damage) -
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 source, float dmg) floatLivingEntity.applyItemBlocking(ServerLevel level, DamageSource source, float damage) voidEntity.awardKillScore(Entity victim, DamageSource killingBlow) booleanEntity.causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource) booleanLivingEntity.causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource) private booleanLivingEntity.checkTotemDeathProtection(DamageSource killingDamage) voidLivingEntity.die(DamageSource source) Called when the mob's health reaches 0.voidTamableAnimal.die(DamageSource source) Called when the mob's health reaches 0.protected voidLivingEntity.doHurtEquipment(DamageSource damageSource, float damage, EquipmentSlot... slots) protected voidLivingEntity.dropAllDeathLoot(ServerLevel level, DamageSource source) protected voidLivingEntity.dropCustomDeathLoot(ServerLevel level, DamageSource source, boolean killedByPlayer) protected voidMob.dropCustomDeathLoot(ServerLevel level, DamageSource source, boolean killedByPlayer) protected voidLivingEntity.dropFromLootTable(ServerLevel level, DamageSource source, boolean playerKilled) voidLivingEntity.dropFromLootTable(ServerLevel level, DamageSource source, boolean playerKilled, ResourceKey<LootTable> lootTable) voidLivingEntity.dropFromLootTable(ServerLevel level, DamageSource source, boolean playerKilled, ResourceKey<LootTable> lootTable, Consumer<ItemStack> itemStackConsumer) protected voidMob.dropFromLootTable(ServerLevel level, DamageSource source, boolean playerKilled) protected floatLivingEntity.getDamageAfterArmorAbsorb(DamageSource damageSource, float damage) Reduces damage, depending on armorprotected floatLivingEntity.getDamageAfterMagicAbsorb(DamageSource damageSource, float damage) Reduces damage, depending on potionsprotected @Nullable SoundEventLivingEntity.getHurtSound(DamageSource source) protected floatLivingEntity.getKnockback(Entity target, DamageSource damageSource) voidEntity.handleDamageEvent(DamageSource source) voidLivingEntity.handleDamageEvent(DamageSource source) final voidEntity.hurt(DamageSource source, float damage) Deprecated.protected voidLivingEntity.hurtArmor(DamageSource damageSource, float damage) booleanEntity.hurtClient(DamageSource source) final booleanExperienceOrb.hurtClient(DamageSource source) protected voidLivingEntity.hurtHelmet(DamageSource damageSource, float damage) final booleanEntity.hurtOrSimulate(DamageSource source, float damage) Deprecated.final booleanAreaEffectCloud.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanDisplay.hurtServer(ServerLevel level, DamageSource source, float damage) abstract booleanEntity.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanExperienceOrb.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanInteraction.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanLightningBolt.hurtServer(ServerLevel level, DamageSource source, float damage) booleanLivingEntity.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanMarker.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanOminousItemSpawner.hurtServer(ServerLevel level, DamageSource source, float damage) booleanLivingEntity.isInvulnerableTo(ServerLevel level, DamageSource source) protected final booleanEntity.isInvulnerableToBase(DamageSource source) booleanEntity.killedEntity(ServerLevel level, LivingEntity entity, DamageSource source) protected voidLivingEntity.playHurtSound(DamageSource source) protected voidMob.playHurtSound(DamageSource source) private voidLivingEntity.playSecondaryHurtSound(DamageSource source) protected voidEntity.propagateFallToPassengers(double fallDistance, float damageModifier, DamageSource damageSource) protected voidLivingEntity.resolveMobResponsibleForDamage(DamageSource source) protected @Nullable PlayerLivingEntity.resolvePlayerResponsibleForDamage(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 source) booleanBat.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source, float dmg) -
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 source) booleanAllay.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source, float dmg) protected SoundEventArmadillo.getHurtSound(DamageSource source) booleanArmadillo.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source) booleanAxolotl.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.bee
Methods in net.minecraft.world.entity.animal.bee with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventBee.getHurtSound(DamageSource source) booleanBee.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source, float dmg) protected SoundEventCamel.getHurtSound(DamageSource source) protected SoundEventCamelHusk.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.chicken
Methods in net.minecraft.world.entity.animal.chicken with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.world.entity.animal.cow
Methods in net.minecraft.world.entity.animal.cow with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventAbstractCow.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.dolphin
Methods in net.minecraft.world.entity.animal.dolphin with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.world.entity.animal.equine
Methods in net.minecraft.world.entity.animal.equine with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanAbstractHorse.causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource) booleanLlama.causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource) protected SoundEventDonkey.getHurtSound(DamageSource source) protected SoundEventHorse.getHurtSound(DamageSource source) protected SoundEventLlama.getHurtSound(DamageSource source) protected SoundEventMule.getHurtSound(DamageSource source) protected SoundEventSkeletonHorse.getHurtSound(DamageSource source) protected SoundEventZombieHorse.getHurtSound(DamageSource source) protected voidHorse.hurtArmor(DamageSource damageSource, float damage) booleanAbstractHorse.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.feline
Methods in net.minecraft.world.entity.animal.feline with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventCat.getHurtSound(DamageSource source) protected SoundEventOcelot.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.fish
Methods in net.minecraft.world.entity.animal.fish with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventCod.getHurtSound(DamageSource source) protected SoundEventPufferfish.getHurtSound(DamageSource source) protected SoundEventSalmon.getHurtSound(DamageSource source) protected SoundEventTropicalFish.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.fox
Methods in net.minecraft.world.entity.animal.fox with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidFox.dropAllDeathLoot(ServerLevel level, DamageSource source) protected @Nullable SoundEventFox.getHurtSound(DamageSource source) -
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 @Nullable SoundEventFrog.getHurtSound(DamageSource source) protected @Nullable SoundEventTadpole.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.goat
Methods in net.minecraft.world.entity.animal.goat with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.world.entity.animal.golem
Methods in net.minecraft.world.entity.animal.golem with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidCopperGolem.actuallyHurt(ServerLevel level, DamageSource source, float dmg) voidIronGolem.die(DamageSource source) Called when the mob's health reaches 0.protected @Nullable SoundEventAbstractGolem.getHurtSound(DamageSource source) protected SoundEventCopperGolem.getHurtSound(DamageSource source) protected SoundEventIronGolem.getHurtSound(DamageSource source) protected @Nullable SoundEventSnowGolem.getHurtSound(DamageSource source) booleanIronGolem.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.happyghast
Methods in net.minecraft.world.entity.animal.happyghast with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventHappyGhast.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.nautilus
Methods in net.minecraft.world.entity.animal.nautilus with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventNautilus.getHurtSound(DamageSource source) protected SoundEventZombieNautilus.getHurtSound(DamageSource source) booleanAbstractNautilus.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.panda
Methods in net.minecraft.world.entity.animal.panda with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected @Nullable SoundEventPanda.getHurtSound(DamageSource source) booleanPanda.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.parrot
Methods in net.minecraft.world.entity.animal.parrot with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventParrot.getHurtSound(DamageSource source) booleanParrot.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.pig
Methods in net.minecraft.world.entity.animal.pig with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.world.entity.animal.polarbear
Methods in net.minecraft.world.entity.animal.polarbear with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventPolarBear.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.rabbit
Methods in net.minecraft.world.entity.animal.rabbit with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.world.entity.animal.sheep
Methods in net.minecraft.world.entity.animal.sheep with parameters of type 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 source) protected SoundEventSniffer.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.animal.squid
Methods in net.minecraft.world.entity.animal.squid with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventGlowSquid.getHurtSound(DamageSource source) protected SoundEventSquid.getHurtSound(DamageSource source) booleanGlowSquid.hurtServer(ServerLevel level, DamageSource source, float damage) booleanSquid.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.animal.turtle
Methods in net.minecraft.world.entity.animal.turtle with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected @Nullable SoundEventTurtle.getHurtSound(DamageSource source) -
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 source, float damage) private booleanWolf.canArmorAbsorb(DamageSource source) voidWolf.die(DamageSource source) protected SoundEventWolf.getHurtSound(DamageSource source) protected voidWolf.hurtArmor(DamageSource damageSource, float damage) booleanWolf.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source) booleanEnderDragon.hurt(ServerLevel level, EnderDragonPart part, DamageSource source, float damage) final booleanEndCrystal.hurtClient(DamageSource source) final booleanEndCrystal.hurtServer(ServerLevel level, DamageSource source, float damage) booleanEnderDragon.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanEnderDragonPart.hurtServer(ServerLevel level, DamageSource source, float damage) voidEnderDragon.onCrystalDestroyed(ServerLevel level, EndCrystal crystal, BlockPos pos, DamageSource source) private voidEndCrystal.onDestroyedBy(ServerLevel level, DamageSource source) protected voidEnderDragon.reallyHurt(ServerLevel level, DamageSource source, float damage) -
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 source, @Nullable Player player) voidDragonHoldingPatternPhase.onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource source, @Nullable Player player) voidDragonPhaseInstance.onCrystalDestroyed(EndCrystal crystal, BlockPos pos, DamageSource source, @Nullable Player player) floatAbstractDragonPhaseInstance.onHurt(DamageSource source, float damage) floatAbstractDragonSittingPhase.onHurt(DamageSource source, float damage) floatDragonPhaseInstance.onHurt(DamageSource source, float damage) -
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 source, boolean killedByPlayer) protected SoundEventWitherBoss.getHurtSound(DamageSource source) booleanWitherBoss.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source) private voidArmorStand.brokenByPlayer(ServerLevel level, DamageSource source) private static booleanItemFrame.canHurtWhenFixed(DamageSource source) private voidArmorStand.causeDamage(ServerLevel level, DamageSource source, float dmg) protected @Nullable SoundEventArmorStand.getHurtSound(DamageSource source) booleanBlockAttachedEntity.hurtClient(DamageSource source) booleanItemFrame.hurtClient(DamageSource source) booleanArmorStand.hurtServer(ServerLevel level, DamageSource source, float damage) booleanBlockAttachedEntity.hurtServer(ServerLevel level, DamageSource source, float damage) booleanItemFrame.hurtServer(ServerLevel level, DamageSource source, float damage) private booleanItemFrame.shouldDamageDropItem(DamageSource source) -
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 damageModifier, DamageSource damageSource) final booleanItemEntity.hurtClient(DamageSource source) final booleanFallingBlockEntity.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanItemEntity.hurtServer(ServerLevel level, DamageSource source, float damage) final booleanPrimedTnt.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 damageModifier, DamageSource damageSource) protected voidEnderMan.dropCustomDeathLoot(ServerLevel level, DamageSource source, boolean killedByPlayer) protected floatWitch.getDamageAfterMagicAbsorb(DamageSource damageSource, float damage) Reduces damage, depending on potionsprotected SoundEventBlaze.getHurtSound(DamageSource source) protected SoundEventCreeper.getHurtSound(DamageSource source) protected SoundEventElderGuardian.getHurtSound(DamageSource source) protected SoundEventEnderMan.getHurtSound(DamageSource source) protected SoundEventEndermite.getHurtSound(DamageSource source) protected SoundEventGhast.getHurtSound(DamageSource source) protected SoundEventGuardian.getHurtSound(DamageSource source) protected SoundEventMagmaCube.getHurtSound(DamageSource source) protected SoundEventMonster.getHurtSound(DamageSource source) protected SoundEventPhantom.getHurtSound(DamageSource source) protected SoundEventRavager.getHurtSound(DamageSource source) protected SoundEventShulker.getHurtSound(DamageSource source) protected SoundEventSilverfish.getHurtSound(DamageSource source) protected SoundEventSlime.getHurtSound(DamageSource source) protected SoundEventStrider.getHurtSound(DamageSource source) protected SoundEventVex.getHurtSound(DamageSource source) protected SoundEventWitch.getHurtSound(DamageSource source) protected SoundEventZoglin.getHurtSound(DamageSource source) booleanEnderMan.hurtServer(ServerLevel level, DamageSource source, float damage) booleanGhast.hurtServer(ServerLevel level, DamageSource source, float damage) booleanGuardian.hurtServer(ServerLevel level, DamageSource source, float damage) booleanShulker.hurtServer(ServerLevel level, DamageSource source, float damage) booleanSilverfish.hurtServer(ServerLevel level, DamageSource source, float damage) booleanZoglin.hurtServer(ServerLevel level, DamageSource source, float damage) private booleanEnderMan.hurtWithCleanWater(ServerLevel level, DamageSource source, AbstractThrownPotion thrownPotion, float damage) booleanGhast.isInvulnerableTo(ServerLevel level, DamageSource source) private static booleanGhast.isReflectedFireball(DamageSource source) booleanCreeper.killedEntity(ServerLevel level, LivingEntity entity, DamageSource source) -
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 damageModifier, DamageSource damageSource) protected SoundEventBreeze.getHurtSound(DamageSource source) booleanBreeze.isInvulnerableTo(ServerLevel level, DamageSource source) -
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 source) voidCreaking.creakingDeathEffects(DamageSource source) protected SoundEventCreaking.getHurtSound(DamageSource source) booleanCreaking.hurtServer(ServerLevel level, DamageSource source, float damage) -
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 source) booleanHoglin.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.monster.illager
Methods in net.minecraft.world.entity.monster.illager with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventEvoker.getHurtSound(DamageSource source) protected SoundEventIllusioner.getHurtSound(DamageSource source) protected SoundEventPillager.getHurtSound(DamageSource source) protected SoundEventVindicator.getHurtSound(DamageSource source) -
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 source, boolean killedByPlayer) protected SoundEventPiglin.getHurtSound(DamageSource source) protected SoundEventPiglinBrute.getHurtSound(DamageSource source) booleanPiglin.hurtServer(ServerLevel level, DamageSource source, float damage) booleanPiglinBrute.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.monster.skeleton
Methods in net.minecraft.world.entity.monster.skeleton with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventBogged.getHurtSound(DamageSource source) protected SoundEventParched.getHurtSound(DamageSource source) protected SoundEventSkeleton.getHurtSound(DamageSource source) protected SoundEventStray.getHurtSound(DamageSource source) protected SoundEventWitherSkeleton.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.monster.spider
Methods in net.minecraft.world.entity.monster.spider with parameters of type DamageSource -
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 source) booleanWarden.hurtServer(ServerLevel level, DamageSource source, float damage) booleanWarden.isInvulnerableTo(ServerLevel level, DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.monster.zombie
Methods in net.minecraft.world.entity.monster.zombie with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventDrowned.getHurtSound(DamageSource source) protected SoundEventHusk.getHurtSound(DamageSource source) protected SoundEventZombie.getHurtSound(DamageSource source) ZombieVillager.getHurtSound(DamageSource source) protected SoundEventZombifiedPiglin.getHurtSound(DamageSource source) booleanZombie.hurtServer(ServerLevel level, DamageSource source, float damage) booleanZombie.killedEntity(ServerLevel level, LivingEntity entity, DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.npc.villager
Methods in net.minecraft.world.entity.npc.villager with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidAbstractVillager.die(DamageSource source) Called when the mob's health reaches 0.voidVillager.die(DamageSource source) Called when the mob's health reaches 0.protected SoundEventVillager.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.npc.wanderingtrader
Methods in net.minecraft.world.entity.npc.wanderingtrader with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected SoundEventWanderingTrader.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.player
Methods in net.minecraft.world.entity.player that return DamageSourceModifier and TypeMethodDescriptionprivate DamageSourcePlayer.createAttackSource(ItemStack attackingItemStack) Methods in net.minecraft.world.entity.player with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidPlayer.actuallyHurt(ServerLevel level, DamageSource source, float dmg) booleanPlayer.causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource) voidPlayer.die(DamageSource source) Called when the mob's health reaches 0.private voidPlayer.doSweepAttack(Entity entity, float baseDamage, DamageSource damageSource, float attackStrengthScale) Deprecated.private voidPlayer.doSweepAttack(Entity entity, float baseDamage, DamageSource damageSource, float attackStrengthScale, AABB sweepHitBox) protected floatPlayer.getEnchantedDamage(Entity entity, float dmg, DamageSource damageSource) protected SoundEventPlayer.getHurtSound(DamageSource source) protected voidPlayer.hurtArmor(DamageSource damageSource, float damage) protected voidPlayer.hurtHelmet(DamageSource damageSource, float damage) booleanPlayer.hurtServer(ServerLevel level, DamageSource source, float damage) booleanPlayer.isInvulnerableTo(ServerLevel level, DamageSource source) private voidPlayer.itemAttackInteraction(Entity entity, ItemStack attackingItemStack, DamageSource damageSource, boolean applyToTarget) booleanPlayer.killedEntity(ServerLevel level, LivingEntity entity, DamageSource source) -
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 hurtEntity, DamageSource damageSource) it.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePairProjectile.calculateHorizontalHurtKnockbackDirection(LivingEntity hurtEntity, DamageSource damageSource) booleanShulkerBullet.hurtClient(DamageSource source) booleanEvokerFangs.hurtServer(ServerLevel level, DamageSource source, float damage) booleanEyeOfEnder.hurtServer(ServerLevel level, DamageSource source, float damage) booleanProjectile.hurtServer(ServerLevel level, DamageSource source, float damage) booleanShulkerBullet.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.projectile.arrow
Methods in net.minecraft.world.entity.projectile.arrow with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidAbstractArrow.doKnockback(LivingEntity mob, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.entity.projectile.hurtingprojectile
Methods in net.minecraft.world.entity.projectile.hurtingprojectile with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanAbstractHurtingProjectile.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.projectile.throwableitemprojectile
Methods in net.minecraft.world.entity.projectile.throwableitemprojectile with parameters of type DamageSourceModifier and TypeMethodDescriptionit.unimi.dsi.fastutil.doubles.DoubleDoubleImmutablePairAbstractThrownPotion.calculateHorizontalHurtKnockbackDirection(LivingEntity hurtEntity, DamageSource damageSource) -
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 source) Called when the mob's health reaches 0.booleanRaider.hurtServer(ServerLevel level, DamageSource source, float damage) -
Uses of DamageSource in net.minecraft.world.entity.vehicle
Methods in net.minecraft.world.entity.vehicle with parameters of type DamageSourceModifier and TypeMethodDescriptiondefault voidContainerEntity.chestVehicleDestroyed(DamageSource source, ServerLevel level, Entity entity) protected voidVehicleEntity.destroy(ServerLevel level, DamageSource source) booleanVehicleEntity.hurtClient(DamageSource source) booleanVehicleEntity.hurtServer(ServerLevel level, DamageSource source, float damage) protected booleanVehicleEntity.shouldSourceDestroy(DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.vehicle.boat
Methods in net.minecraft.world.entity.vehicle.boat with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidAbstractChestBoat.destroy(ServerLevel level, DamageSource source) -
Uses of DamageSource in net.minecraft.world.entity.vehicle.minecart
Fields in net.minecraft.world.entity.vehicle.minecart declared as DamageSourceMethods in net.minecraft.world.entity.vehicle.minecart with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanMinecartTNT.causeFallDamage(double fallDistance, float damageModifier, DamageSource damageSource) private static booleanMinecartTNT.damageSourceIgnitesTnt(DamageSource source) voidAbstractMinecartContainer.destroy(ServerLevel level, DamageSource source) voidMinecartTNT.destroy(ServerLevel level, DamageSource source) protected voidMinecartTNT.explode(@Nullable DamageSource damageSource, double speedSqr) booleanMinecartTNT.hurtServer(ServerLevel level, DamageSource source, float damage) voidMinecartTNT.primeFuse(@Nullable DamageSource source) protected booleanMinecartTNT.shouldSourceDestroy(DamageSource source) -
Uses of DamageSource in net.minecraft.world.item
Methods in net.minecraft.world.item that return DamageSourceModifier and TypeMethodDescriptionItemStack.getDamageSource(LivingEntity attacker, Supplier<DamageSource> defaultSource) @Nullable DamageSourceItem.getItemDamageSource(LivingEntity attacker) Deprecated.@Nullable DamageSourceMaceItem.getItemDamageSource(LivingEntity attacker) Methods in net.minecraft.world.item with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanItemStack.canBeHurtBy(DamageSource source) floatItem.getAttackDamageBonus(Entity victim, float damage, DamageSource damageSource) floatMaceItem.getAttackDamageBonus(Entity victim, float ignoredDamage, DamageSource damageSource) Method parameters in net.minecraft.world.item with type arguments of type DamageSourceModifier and TypeMethodDescriptionItemStack.getDamageSource(LivingEntity attacker, Supplier<DamageSource> defaultSource) -
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 source) floatBlocksAttacks.DamageReduction.resolve(DamageSource source, float dealtDamage, double angle) floatBlocksAttacks.resolveBlockedDamage(DamageSource source, float dealtDamage, double angle) -
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 serverLevel, int enchantmentLevel, Entity victim, DamageSource source) voidEnchantment.doPostAttack(ServerLevel serverLevel, int enchantmentLevel, EnchantedItemInUse item, EnchantmentTarget forTarget, Entity victim, DamageSource damageSource) static voidEnchantment.doPostAttack(TargetedConditionalEffect<EnchantmentEntityEffect> effect, ServerLevel serverLevel, int enchantmentLevel, EnchantedItemInUse item, Entity victim, DamageSource damageSource) static voidEnchantmentHelper.doPostAttackEffects(ServerLevel serverLevel, Entity victim, DamageSource damageSource) static voidEnchantmentHelper.doPostAttackEffectsWithItemSource(ServerLevel serverLevel, Entity victim, DamageSource damageSource, @Nullable ItemStack source) static voidEnchantmentHelper.doPostAttackEffectsWithItemSourceOnBreak(ServerLevel serverLevel, Entity victim, DamageSource damageSource, @Nullable ItemStack source, @Nullable Consumer<Item> attackerlessOnBreak) static floatEnchantmentHelper.getDamageProtection(ServerLevel serverLevel, LivingEntity victim, DamageSource source) booleanEnchantment.isImmuneToDamage(ServerLevel serverLevel, int enchantmentLevel, Entity victim, DamageSource source) static booleanEnchantmentHelper.isImmuneToDamage(ServerLevel serverLevel, LivingEntity victim, DamageSource source) static floatEnchantmentHelper.modifyArmorEffectiveness(ServerLevel serverLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, float armorFraction) voidEnchantment.modifyArmorEffectivness(ServerLevel serverLevel, int enchantmentLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat amount) voidEnchantment.modifyDamage(ServerLevel serverLevel, int enchantmentLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat amount) static floatEnchantmentHelper.modifyDamage(ServerLevel serverLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, float damage) voidEnchantment.modifyDamageFilteredValue(DataComponentType<List<ConditionalEffect<EnchantmentValueEffect>>> effectType, ServerLevel serverLevel, int enchantmentLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat value) voidEnchantment.modifyDamageProtection(ServerLevel serverLevel, int enchantmentLevel, ItemStack item, Entity victim, DamageSource source, org.apache.commons.lang3.mutable.MutableFloat protection) voidEnchantment.modifyFallBasedDamage(ServerLevel serverLevel, int enchantmentLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat amount) static floatEnchantmentHelper.modifyFallBasedDamage(ServerLevel serverLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, float damage) voidEnchantment.modifyKnockback(ServerLevel serverLevel, int enchantmentLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, org.apache.commons.lang3.mutable.MutableFloat amount) static floatEnchantmentHelper.modifyKnockback(ServerLevel serverLevel, ItemStack itemStack, Entity victim, DamageSource damageSource, float knockback) static floatEnchantmentHelper.processEquipmentDropChance(ServerLevel serverLevel, LivingEntity entity, DamageSource killingBlow, float chance) -
Uses of DamageSource in net.minecraft.world.item.enchantment.effects
Methods in net.minecraft.world.item.enchantment.effects that return DamageSourceModifier and TypeMethodDescriptionprivate @Nullable DamageSourceExplodeEffect.getDamageSource(Entity entity, Vec3 position) -
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, @Nullable Entity source) Methods in net.minecraft.world.level with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidLevel.broadcastDamageEvent(Entity entity, DamageSource source) voidLevel.explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float r, boolean fire, Level.ExplosionInteraction interactionType) abstract voidLevel.explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, double x, double y, double z, float r, boolean fire, Level.ExplosionInteraction interactionType, ParticleOptions smallExplosionParticles, ParticleOptions largeExplosionParticles, WeightedList<ExplosionParticleInfo> blockParticles, Holder<SoundEvent> explosionSound) voidLevel.explode(@Nullable Entity source, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator damageCalculator, Vec3 boomPos, float r, boolean fire, Level.ExplosionInteraction blockInteraction) Constructors in net.minecraft.world.level with parameters of type DamageSourceModifierConstructorDescriptionServerExplosion(ServerLevel level, @Nullable Entity source, @Nullable DamageSource damageSource, @Nullable 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(@Nullable 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 TypeMethodDescriptionvoidEnderDragonFight.onCrystalDestroyed(EndCrystal crystal, DamageSource source) -
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 DamageSourceArmorHurtEvent.sourceprivate final DamageSourceLivingDamageEvent.Post.sourceprivate final DamageSourceLivingDeathEvent.sourceprivate final DamageSourceLivingDropsEvent.sourceprivate final DamageSourceLivingUseTotemEvent.sourceMethods in net.neoforged.neoforge.event.entity.living that return DamageSourceModifier and TypeMethodDescriptionArmorHurtEvent.getDamageSource()Returns theDamageSourcecausing the damage.LivingShieldBlockEvent.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 DamageSourceModifierConstructorDescriptionArmorHurtEvent(EnumMap<EquipmentSlot, ArmorHurtEvent.ArmorEntry> armorMap, LivingEntity player, DamageSource source) LivingDeathEvent(LivingEntity entity, DamageSource source) LivingDropsEvent(LivingEntity entity, DamageSource source, Collection<ItemEntity> drops, boolean recentlyHit) LivingUseTotemEvent(LivingEntity entity, DamageSource source, ItemStack totem, InteractionHand hand)