Uses of Class
net.minecraft.entity.damage.DamageSource
Packages that use DamageSource
Package
Description
This and its subpackages make up the brain system used by some modern Minecraft entities,
such as villagers, piglins, and axolotls.
-
Uses of DamageSource in net.minecraft.advancement.criterion
Methods in net.minecraft.advancement.criterion with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanEntityHurtPlayerCriterion.Conditions.matches(ServerPlayerEntity player, DamageSource damageSource, float dealt, float taken, boolean blocked) booleanPlayerHurtEntityCriterion.Conditions.matches(ServerPlayerEntity player, LootContext entity, DamageSource damageSource, float dealt, float taken, boolean blocked) booleanOnKilledCriterion.Conditions.test(ServerPlayerEntity player, LootContext entity, DamageSource killingBlow) voidEntityHurtPlayerCriterion.trigger(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) voidOnKilledCriterion.trigger(ServerPlayerEntity player, Entity entity, DamageSource killingDamage) voidPlayerHurtEntityCriterion.trigger(ServerPlayerEntity player, Entity entity, DamageSource damage, float dealt, float taken, boolean blocked) -
Uses of DamageSource in net.minecraft.block
Methods in net.minecraft.block that return DamageSourceModifier and TypeMethodDescriptionAnvilBlock.getDamageSource(Entity attacker) default DamageSourceLandingBlock.getDamageSource(Entity attacker) PointedDripstoneBlock.getDamageSource(Entity attacker) -
Uses of DamageSource in net.minecraft.client.network
Methods in net.minecraft.client.network with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidClientPlayerEntity.applyDamage(DamageSource source, float amount) booleanClientPlayerEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanOtherClientPlayerEntity.damage(DamageSource source, float amount) Applies a damage to this entity. -
Uses of DamageSource in net.minecraft.enchantment
Methods in net.minecraft.enchantment with parameters of type DamageSourceModifier and TypeMethodDescriptionstatic voidEnchantment.applyTargetedEffect(TargetedEnchantmentEffect<EnchantmentEntityEffect> effect, ServerWorld world, int level, EnchantmentEffectContext context, Entity user, DamageSource damageSource) static LootContextEnchantment.createEnchantedDamageLootContext(ServerWorld world, int level, Entity entity, DamageSource damageSource) static floatEnchantmentHelper.getArmorEffectiveness(ServerWorld world, ItemStack stack, Entity user, DamageSource damageSource, float baseArmorEffectiveness) static floatEnchantmentHelper.getDamage(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseDamage) static floatEnchantmentHelper.getEquipmentDropChance(ServerWorld world, LivingEntity attacker, DamageSource damageSource, float baseEquipmentDropChance) static floatEnchantmentHelper.getProtectionAmount(ServerWorld world, LivingEntity user, DamageSource damageSource) static floatEnchantmentHelper.getSmashDamagePerFallenBlock(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseSmashDamagePerFallenBlock) booleanEnchantment.hasDamageImmunityTo(ServerWorld world, int level, Entity user, DamageSource damageSource) static booleanEnchantmentHelper.isInvulnerableTo(ServerWorld world, LivingEntity user, DamageSource damageSource) voidEnchantment.modifyArmorEffectiveness(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat armorEffectiveness) voidEnchantment.modifyDamage(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damage) voidEnchantment.modifyDamageProtection(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat damageProtection) voidEnchantment.modifyKnockback(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat knockback) static floatEnchantmentHelper.modifyKnockback(ServerWorld world, ItemStack stack, Entity target, DamageSource damageSource, float baseKnockback) voidEnchantment.modifySmashDamagePerFallenBlock(ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat smashDamagePerFallenBlock) private voidEnchantment.modifyValue(ComponentType<List<EnchantmentEffectEntry<EnchantmentValueEffect>>> type, ServerWorld world, int level, ItemStack stack, Entity user, DamageSource damageSource, MutableFloat value) voidEnchantment.onTargetDamaged(ServerWorld world, int level, EnchantmentEffectContext context, EnchantmentEffectTarget target, Entity user, DamageSource damageSource) static voidEnchantmentHelper.onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource) static voidEnchantmentHelper.onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource, @Nullable ItemStack weapon) -
Uses of DamageSource in net.minecraft.enchantment.effect.entity
Methods in net.minecraft.enchantment.effect.entity that return DamageSourceModifier and TypeMethodDescriptionprivate @Nullable DamageSourceExplodeEnchantmentEffect.getDamageSource(Entity user, Vec3d pos) -
Uses of DamageSource in net.minecraft.entity
Fields in net.minecraft.entity declared as DamageSourceMethods in net.minecraft.entity that return DamageSourceMethods in net.minecraft.entity with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected floatLivingEntity.applyArmorToDamage(DamageSource source, float amount) protected voidLivingEntity.applyDamage(DamageSource source, float amount) booleanLivingEntity.blockedByShield(DamageSource source) booleanEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanExperienceOrbEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanItemEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanLivingEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected voidLivingEntity.damageArmor(DamageSource source, float amount) protected voidLivingEntity.damageEquipment(DamageSource source, float amount, EquipmentSlot[] slots) protected voidLivingEntity.damageHelmet(DamageSource source, float amount) protected voidLivingEntity.drop(ServerWorld world, DamageSource damageSource) protected voidLivingEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidLivingEntity.dropLoot(DamageSource damageSource, boolean causedByPlayer) static floatDamageUtil.getDamageLeft(LivingEntity armorWearer, float damageAmount, DamageSource damageSource, float armor, float armorToughness) protected @Nullable SoundEventLivingEntity.getHurtSound(DamageSource source) protected floatLivingEntity.getKnockbackAgainst(Entity target, DamageSource damageSource) booleanEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.booleanFallingBlockEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.booleanLivingEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.booleanEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.booleanLivingEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.protected floatLivingEntity.modifyAppliedDamage(DamageSource source, float amount) Returns the modified damage value for the applieddamage.voidEntity.onDamaged(DamageSource damageSource) voidLivingEntity.onDamaged(DamageSource damageSource) voidLivingEntity.onDeath(DamageSource damageSource) protected voidLivingEntity.playHurtSound(DamageSource damageSource) private booleanLivingEntity.tryUseTotem(DamageSource source) voidEntity.updateKilledAdvancementCriterion(Entity entityKilled, int score, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.ai.brain
Fields in net.minecraft.entity.ai.brain with type parameters of type DamageSourceModifier and TypeFieldDescriptionstatic final MemoryModuleType<DamageSource> MemoryModuleType.HURT_BY -
Uses of DamageSource in net.minecraft.entity.boss
Methods in net.minecraft.entity.boss with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanWitherEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected voidWitherEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected SoundEventWitherEntity.getHurtSound(DamageSource source) -
Uses of DamageSource in net.minecraft.entity.boss.dragon
Methods in net.minecraft.entity.boss.dragon with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidEnderDragonEntity.crystalDestroyed(EndCrystalEntity endCrystal, BlockPos pos, DamageSource source) voidEnderDragonFight.crystalDestroyed(EndCrystalEntity enderCrystal, DamageSource source) booleanEnderDragonEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanEnderDragonPart.damage(DamageSource source, float amount) Applies a damage to this entity.booleanEnderDragonEntity.damagePart(EnderDragonPart part, DamageSource source, float amount) protected SoundEventEnderDragonEntity.getHurtSound(DamageSource source) protected booleanEnderDragonEntity.parentDamage(DamageSource source, float amount) -
Uses of DamageSource in net.minecraft.entity.boss.dragon.phase
Methods in net.minecraft.entity.boss.dragon.phase with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidAbstractPhase.crystalDestroyed(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) voidHoldingPatternPhase.crystalDestroyed(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) voidPhase.crystalDestroyed(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) floatAbstractPhase.modifyDamageTaken(DamageSource damageSource, float damage) floatAbstractSittingPhase.modifyDamageTaken(DamageSource damageSource, float damage) floatPhase.modifyDamageTaken(DamageSource damageSource, float damage) -
Uses of DamageSource in net.minecraft.entity.damage
Fields in net.minecraft.entity.damage declared as DamageSourceModifier and TypeFieldDescriptionprivate final DamageSourceDamageSources.cactusprivate final DamageSourceDamageSources.campfireprivate final DamageSourceDamageSources.crammingprivate final DamageSourceDamageRecord.damageSourceThe field for thedamageSourcerecord component.private final DamageSourceDamageSources.dragonBreathprivate final DamageSourceDamageSources.drownprivate final DamageSourceDamageSources.dryOutprivate final DamageSourceDamageSources.fallprivate 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.outOfWorldprivate final DamageSourceDamageSources.outsideBorderprivate final DamageSourceDamageSources.stalagmiteprivate final DamageSourceDamageSources.starveprivate final DamageSourceDamageSources.sweetBerryBushprivate final DamageSourceDamageSources.witherMethods in net.minecraft.entity.damage that return DamageSourceModifier and TypeMethodDescriptionDamageSources.arrow(PersistentProjectileEntity source, @Nullable Entity attacker) DamageSources.badRespawnPoint(Vec3d position) DamageSources.cactus()DamageSources.campfire()DamageSources.cramming()private DamageSourceDamageSources.create(RegistryKey<DamageType> key) private DamageSourceDamageSources.create(RegistryKey<DamageType> key, @Nullable Entity attacker) private DamageSourceDamageSources.create(RegistryKey<DamageType> key, @Nullable Entity source, @Nullable Entity attacker) DamageRecord.damageSource()Returns the value of thedamageSourcerecord component.DamageSources.dragonBreath()DamageSources.drown()DamageSources.dryOut()DamageSources.fall()DamageSources.fallingAnvil(Entity attacker) DamageSources.fallingBlock(Entity attacker) DamageSources.fallingStalactite(Entity attacker) DamageSources.fireball(AbstractFireballEntity source, @Nullable Entity attacker) DamageSources.fireworks(FireworkRocketEntity source, @Nullable Entity attacker) DamageSources.flyIntoWall()DamageSources.freeze()DamageSources.generic()DamageSources.genericKill()DamageSources.hotFloor()DamageSources.indirectMagic(Entity source, @Nullable Entity attacker) DamageSources.inFire()DamageSources.inWall()DamageSources.lava()DamageSources.lightningBolt()DamageSources.magic()DamageSources.mobAttack(LivingEntity attacker) DamageSources.mobAttackNoAggro(LivingEntity attacker) DamageSources.mobProjectile(Entity source, @Nullable LivingEntity attacker) DamageSources.onFire()DamageSources.outOfWorld()DamageSources.outsideBorder()DamageSources.playerAttack(PlayerEntity attacker) DamageSources.spit(Entity source, @Nullable LivingEntity attacker) DamageSources.stalagmite()DamageSources.starve()DamageSources.sting(LivingEntity attacker) DamageSources.sweetBerryBush()DamageSources.windCharge(Entity source, @Nullable LivingEntity attacker) DamageSources.wither()DamageSources.witherSkull(WitherSkullEntity source, Entity attacker) Methods in net.minecraft.entity.damage with parameters of type DamageSourceModifier and TypeMethodDescriptionprivate static booleanDamageTracker.isAttackerLiving(DamageSource damageSource) voidDamageTracker.onDamage(DamageSource damageSource, float damage) Constructors in net.minecraft.entity.damage with parameters of type DamageSourceModifierConstructorDescriptionDamageRecord(DamageSource damageSource, float float2, @Nullable FallLocation fallLocation, float float3) -
Uses of DamageSource in net.minecraft.entity.decoration
Methods in net.minecraft.entity.decoration with parameters of type DamageSourceModifier and TypeMethodDescriptionprivate voidArmorStandEntity.breakAndDropItem(ServerWorld world, DamageSource damageSource) private voidEndCrystalEntity.crystalDestroyed(DamageSource source) booleanArmorStandEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanBlockAttachedEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanEndCrystalEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanItemFrameEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected @Nullable SoundEventArmorStandEntity.getHurtSound(DamageSource source) private voidArmorStandEntity.onBreak(ServerWorld world, DamageSource damageSource) private voidArmorStandEntity.updateHealth(ServerWorld world, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.entity.effect
Methods in net.minecraft.entity.effect with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidInfestedStatusEffect.onEntityDamage(LivingEntity entity, int amplifier, DamageSource source, float amount) voidStatusEffect.onEntityDamage(LivingEntity entity, int amplifier, DamageSource source, float amount) voidStatusEffectInstance.onEntityDamage(LivingEntity entity, DamageSource source, float amount) -
Uses of DamageSource in net.minecraft.entity.mob
Methods in net.minecraft.entity.mob with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanEndermanEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanGhastEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanGuardianEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanHoglinEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanPiglinBruteEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanPiglinEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanShulkerEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanSilverfishEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanWardenEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanZoglinEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanZombieEntity.damage(DamageSource source, float amount) Applies a damage to this entity.private booleanEndermanEntity.damageFromPotion(DamageSource source, PotionEntity potion, float amount) protected voidCreeperEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidEndermanEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidMobEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidPiglinEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidSkeletonEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidWitherSkeletonEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidZombieEntity.dropEquipment(ServerWorld world, DamageSource source, boolean causedByPlayer) protected voidMobEntity.dropLoot(DamageSource damageSource, boolean causedByPlayer) protected SoundEventBlazeEntity.getHurtSound(DamageSource source) protected SoundEventBoggedEntity.getHurtSound(DamageSource source) protected SoundEventBreezeEntity.getHurtSound(DamageSource source) protected SoundEventCreeperEntity.getHurtSound(DamageSource source) protected SoundEventDrownedEntity.getHurtSound(DamageSource source) protected SoundEventElderGuardianEntity.getHurtSound(DamageSource source) protected SoundEventEndermanEntity.getHurtSound(DamageSource source) protected SoundEventEndermiteEntity.getHurtSound(DamageSource source) protected SoundEventEvokerEntity.getHurtSound(DamageSource source) protected SoundEventGhastEntity.getHurtSound(DamageSource source) protected SoundEventGuardianEntity.getHurtSound(DamageSource source) protected SoundEventHoglinEntity.getHurtSound(DamageSource source) protected SoundEventHostileEntity.getHurtSound(DamageSource source) protected SoundEventHuskEntity.getHurtSound(DamageSource source) protected SoundEventIllusionerEntity.getHurtSound(DamageSource source) protected SoundEventMagmaCubeEntity.getHurtSound(DamageSource source) protected SoundEventPhantomEntity.getHurtSound(DamageSource source) protected SoundEventPiglinBruteEntity.getHurtSound(DamageSource source) protected SoundEventPiglinEntity.getHurtSound(DamageSource source) protected SoundEventPillagerEntity.getHurtSound(DamageSource source) protected SoundEventRavagerEntity.getHurtSound(DamageSource source) protected SoundEventShulkerEntity.getHurtSound(DamageSource source) protected SoundEventSilverfishEntity.getHurtSound(DamageSource source) protected SoundEventSkeletonEntity.getHurtSound(DamageSource source) protected SoundEventSkeletonHorseEntity.getHurtSound(DamageSource source) protected SoundEventSlimeEntity.getHurtSound(DamageSource source) protected SoundEventSpiderEntity.getHurtSound(DamageSource source) protected SoundEventStrayEntity.getHurtSound(DamageSource source) protected SoundEventVexEntity.getHurtSound(DamageSource source) protected SoundEventVindicatorEntity.getHurtSound(DamageSource source) protected SoundEventWardenEntity.getHurtSound(DamageSource source) protected SoundEventWitchEntity.getHurtSound(DamageSource source) protected SoundEventWitherSkeletonEntity.getHurtSound(DamageSource source) protected SoundEventZoglinEntity.getHurtSound(DamageSource source) protected SoundEventZombieEntity.getHurtSound(DamageSource source) protected SoundEventZombieHorseEntity.getHurtSound(DamageSource source) ZombieVillagerEntity.getHurtSound(DamageSource source) protected SoundEventZombifiedPiglinEntity.getHurtSound(DamageSource source) booleanBreezeEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.booleanCreeperEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.private static booleanGhastEntity.isFireballFromPlayer(DamageSource damageSource) Returns whetherdamageSourceis caused by a player's fireball.booleanBreezeEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.booleanGhastEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.booleanWardenEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.protected floatWitchEntity.modifyAppliedDamage(DamageSource source, float amount) Returns the modified damage value for the applieddamage.protected voidMobEntity.playHurtSound(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.passive
Methods in net.minecraft.entity.passive with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidAnimalEntity.applyDamage(DamageSource source, float amount) protected voidArmadilloEntity.applyDamage(DamageSource source, float amount) protected voidCamelEntity.applyDamage(DamageSource source, float amount) protected voidWolfEntity.applyDamage(DamageSource source, float amount) booleanAbstractHorseEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanAllayEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanArmadilloEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanAxolotlEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanBatEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanBeeEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanGlowSquidEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanIronGolemEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanPandaEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanParrotEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanSquidEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanWolfEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected voidWolfEntity.damageArmor(DamageSource source, float amount) protected voidFoxEntity.drop(ServerWorld world, DamageSource damageSource) protected SoundEventAllayEntity.getHurtSound(DamageSource source) protected SoundEventArmadilloEntity.getHurtSound(DamageSource source) protected SoundEventAxolotlEntity.getHurtSound(DamageSource source) protected SoundEventBatEntity.getHurtSound(DamageSource source) protected SoundEventBeeEntity.getHurtSound(DamageSource source) protected SoundEventCamelEntity.getHurtSound(DamageSource source) protected SoundEventCatEntity.getHurtSound(DamageSource source) protected SoundEventChickenEntity.getHurtSound(DamageSource source) protected SoundEventCodEntity.getHurtSound(DamageSource source) protected SoundEventCowEntity.getHurtSound(DamageSource source) protected SoundEventDolphinEntity.getHurtSound(DamageSource source) protected SoundEventDonkeyEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventFoxEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventFrogEntity.getHurtSound(DamageSource source) protected SoundEventGlowSquidEntity.getHurtSound(DamageSource source) protected SoundEventGoatEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventGolemEntity.getHurtSound(DamageSource source) protected SoundEventHorseEntity.getHurtSound(DamageSource source) protected SoundEventIronGolemEntity.getHurtSound(DamageSource source) protected SoundEventLlamaEntity.getHurtSound(DamageSource source) protected SoundEventMuleEntity.getHurtSound(DamageSource source) protected SoundEventOcelotEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventPandaEntity.getHurtSound(DamageSource source) protected SoundEventParrotEntity.getHurtSound(DamageSource source) protected SoundEventPigEntity.getHurtSound(DamageSource source) protected SoundEventPolarBearEntity.getHurtSound(DamageSource source) protected SoundEventPufferfishEntity.getHurtSound(DamageSource source) protected SoundEventRabbitEntity.getHurtSound(DamageSource source) protected SoundEventSalmonEntity.getHurtSound(DamageSource source) protected SoundEventSheepEntity.getHurtSound(DamageSource source) protected SoundEventSnifferEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventSnowGolemEntity.getHurtSound(DamageSource source) protected SoundEventSquidEntity.getHurtSound(DamageSource source) protected SoundEventStriderEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventTadpoleEntity.getHurtSound(DamageSource source) protected SoundEventTropicalFishEntity.getHurtSound(DamageSource source) protected @Nullable SoundEventTurtleEntity.getHurtSound(DamageSource source) protected SoundEventVillagerEntity.getHurtSound(DamageSource source) protected SoundEventWanderingTraderEntity.getHurtSound(DamageSource source) protected SoundEventWolfEntity.getHurtSound(DamageSource source) booleanAbstractHorseEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.booleanLlamaEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.voidIronGolemEntity.onDeath(DamageSource damageSource) voidMerchantEntity.onDeath(DamageSource damageSource) voidSnifferEntity.onDeath(DamageSource damageSource) voidTameableEntity.onDeath(DamageSource damageSource) voidVillagerEntity.onDeath(DamageSource damageSource) voidWolfEntity.onDeath(DamageSource damageSource) private booleanWolfEntity.shouldArmorAbsorbDamage(DamageSource source) -
Uses of DamageSource in net.minecraft.entity.player
Methods in net.minecraft.entity.player with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected voidPlayerEntity.applyDamage(DamageSource source, float amount) booleanPlayerEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected voidPlayerEntity.damageArmor(DamageSource source, float amount) protected voidPlayerEntity.damageHelmet(DamageSource source, float amount) protected floatPlayerEntity.getDamageAgainst(Entity target, float baseDamage, DamageSource damageSource) protected SoundEventPlayerEntity.getHurtSound(DamageSource source) booleanPlayerEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.booleanPlayerEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.voidPlayerEntity.onDeath(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.projectile
Methods in net.minecraft.entity.projectile with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanAbstractFireballEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanAbstractWindChargeEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanDragonFireballEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanExplosiveProjectileEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanShulkerBulletEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanSmallFireballEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanWitherSkullEntity.damage(DamageSource source, float amount) Applies a damage to this entity.FireworkRocketEntity.getKnockback(LivingEntity target, DamageSource source) ProjectileEntity.getKnockback(LivingEntity target, DamageSource source) protected voidPersistentProjectileEntity.knockback(LivingEntity target, DamageSource source) -
Uses of DamageSource in net.minecraft.entity.projectile.thrown
Methods in net.minecraft.entity.projectile.thrown with parameters of type DamageSourceModifier and TypeMethodDescriptionPotionEntity.getKnockback(LivingEntity target, DamageSource source) -
Uses of DamageSource in net.minecraft.entity.raid
Methods in net.minecraft.entity.raid with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanRaiderEntity.damage(DamageSource source, float amount) Applies a damage to this entity.voidRaiderEntity.onDeath(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.vehicle
Methods in net.minecraft.entity.vehicle with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanTntMinecartEntity.damage(DamageSource source, float amount) Applies a damage to this entity.booleanVehicleEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected voidTntMinecartEntity.explode(@Nullable DamageSource damageSource, double power) booleanTntMinecartEntity.handleFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.voidChestBoatEntity.killAndDropSelf(DamageSource source) voidStorageMinecartEntity.killAndDropSelf(DamageSource source) voidTntMinecartEntity.killAndDropSelf(DamageSource source) protected voidVehicleEntity.killAndDropSelf(DamageSource source) default voidVehicleInventory.onBroken(DamageSource source, World world, Entity vehicle) (package private) booleanTntMinecartEntity.shouldAlwaysKill(DamageSource source) (package private) booleanVehicleEntity.shouldAlwaysKill(DamageSource source) private static booleanTntMinecartEntity.shouldDetonate(DamageSource source) -
Uses of DamageSource in net.minecraft.item
Methods in net.minecraft.item with parameters of type DamageSourceModifier and TypeMethodDescriptionfloatItem.getBonusAttackDamage(Entity target, float baseAttackDamage, DamageSource damageSource) floatMaceItem.getBonusAttackDamage(Entity target, float baseAttackDamage, DamageSource damageSource) booleanItemStack.takesDamageFrom(DamageSource source) -
Uses of DamageSource in net.minecraft.loot.context
Fields in net.minecraft.loot.context with type parameters of type DamageSourceModifier and TypeFieldDescriptionstatic final LootContextParameter<DamageSource> LootContextParameters.DAMAGE_SOURCE -
Uses of DamageSource in net.minecraft.network.packet.s2c.play
Methods in net.minecraft.network.packet.s2c.play that return DamageSourceConstructors in net.minecraft.network.packet.s2c.play with parameters of type DamageSource -
Uses of DamageSource in net.minecraft.predicate
Methods in net.minecraft.predicate with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanDamagePredicate.test(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) -
Uses of DamageSource in net.minecraft.predicate.entity
Methods in net.minecraft.predicate.entity with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanDamageSourcePredicate.test(ServerPlayerEntity player, DamageSource damageSource) booleanDamageSourcePredicate.test(ServerWorld world, Vec3d pos, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.command
Methods in net.minecraft.server.command with parameters of type DamageSourceModifier and TypeMethodDescriptionprivate static intDamageCommand.execute(ServerCommandSource source, Entity target, float amount, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.network
Methods in net.minecraft.server.network with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanServerPlayerEntity.damage(DamageSource source, float amount) Applies a damage to this entity.protected floatServerPlayerEntity.getDamageAgainst(Entity target, float baseDamage, DamageSource damageSource) booleanServerPlayerEntity.isInvulnerableTo(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource.voidServerPlayerEntity.onDeath(DamageSource damageSource) voidServerPlayerEntity.updateKilledAdvancementCriterion(Entity entityKilled, int score, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.world
Methods in net.minecraft.server.world with parameters of type DamageSourceModifier and TypeMethodDescriptionServerWorld.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.voidServerWorld.sendEntityDamage(Entity entity, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world
Methods in net.minecraft.world with parameters of type DamageSourceModifier and TypeMethodDescriptionWorld.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType) World.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, boolean particles, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent) World.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.World.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, Vec3d pos, float power, boolean createFire, World.ExplosionSourceType explosionSourceType) Creates an explosion.voidWorld.sendEntityDamage(Entity entity, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.world.explosion
Fields in net.minecraft.world.explosion declared as DamageSourceMethods in net.minecraft.world.explosion that return DamageSourceModifier and TypeMethodDescriptionstatic DamageSourceExplosion.createDamageSource(World world, @Nullable Entity source) Constructors in net.minecraft.world.explosion with parameters of type DamageSourceModifierConstructorDescriptionExplosion(World world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, Explosion.DestructionType destructionType, ParticleEffect particle, ParticleEffect emitterParticle, RegistryEntry<SoundEvent> soundEvent)