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 DamageSourceFalling.getDamageSource(Entity attacker) PointedDripstoneBlock.getDamageSource(Entity attacker) -
Uses of DamageSource in net.minecraft.block.entity
Methods in net.minecraft.block.entity with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidCreakingHeartBlockEntity.killPuppet(@Nullable DamageSource damageSource) -
Uses of DamageSource in net.minecraft.client.network
Methods in net.minecraft.client.network with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanOtherClientPlayerEntity.clientDamage(DamageSource source) -
Uses of DamageSource in net.minecraft.client.world
Methods in net.minecraft.client.world with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidClientWorld.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion. -
Uses of DamageSource in net.minecraft.component.type
Methods in net.minecraft.component.type with parameters of type DamageSourceModifier and TypeMethodDescriptionfloatBlocksAttacksComponent.getDamageReductionAmount(DamageSource source, float damage, double angle) floatBlocksAttacksComponent.DamageReduction.getReductionAmount(DamageSource source, float damage, double angle) booleanDamageResistantComponent.resists(DamageSource damageSource) -
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) static voidEnchantmentHelper.onTargetDamaged(ServerWorld world, Entity target, DamageSource damageSource, @Nullable ItemStack weapon, Consumer<Item> breakCallback) -
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(ServerWorld world, DamageSource source, float amount) protected voidLivingEntity.becomeAngry(DamageSource damageSource) booleanEntity.clientDamage(DamageSource source) final booleanExperienceOrbEntity.clientDamage(DamageSource source) final booleanItemEntity.clientDamage(DamageSource source) final booleanAreaEffectCloudEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.abstract booleanEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanExperienceOrbEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanEyeOfEnderEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanFallingBlockEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanItemEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanLightningEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanLivingEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanMarkerEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanOminousItemSpawnerEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanTntEntity.damage(ServerWorld world, 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(ServerWorld world, DamageSource damageSource, boolean causedByPlayer) protected floatLivingEntity.getAttackKnockbackAgainst(Entity target, DamageSource damageSource) floatLivingEntity.getDamageBlockedAmount(ServerWorld world, DamageSource source, float amount) static floatDamageUtil.getDamageLeft(LivingEntity armorWearer, float damageAmount, DamageSource damageSource, float armor, float armorToughness) protected @Nullable SoundEventLivingEntity.getHurtSound(DamageSource source) booleanEntity.handleFallDamage(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.booleanFallingBlockEntity.handleFallDamage(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.booleanLivingEntity.handleFallDamage(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.protected voidEntity.handleFallDamageForPassengers(double fallDistance, float damagePerDistance, DamageSource damageSource) protected final booleanEntity.isAlwaysInvulnerableTo(DamageSource damageSource) booleanLivingEntity.isInvulnerableTo(ServerWorld world, DamageSource source) 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 voidLivingEntity.playThornsSound(DamageSource damageSource) final voidEntity.serverDamage(DamageSource source, float amount) Deprecated.protected @Nullable PlayerEntityLivingEntity.setAttackingPlayer(DamageSource damageSource) final booleanEntity.sidedDamage(DamageSource source, float amount) Deprecated.private booleanLivingEntity.tryUseDeathProtector(DamageSource source) voidEntity.updateKilledAdvancementCriterion(Entity entityKilled, 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(ServerWorld world, 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(ServerWorld world, EndCrystalEntity crystal, BlockPos pos, DamageSource source) voidEnderDragonFight.crystalDestroyed(EndCrystalEntity enderCrystal, DamageSource source) booleanEnderDragonEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanEnderDragonPart.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanEnderDragonEntity.damagePart(ServerWorld world, EnderDragonPart part, DamageSource source, float amount) protected SoundEventEnderDragonEntity.getHurtSound(DamageSource source) protected voidEnderDragonEntity.parentDamage(ServerWorld world, 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.enderPearlprivate 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.enderPearl()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 static booleanItemFrameEntity.canDamageWhenFixed(DamageSource damageSource) booleanBlockAttachedEntity.clientDamage(DamageSource source) final booleanEndCrystalEntity.clientDamage(DamageSource source) booleanItemFrameEntity.clientDamage(DamageSource source) private voidEndCrystalEntity.crystalDestroyed(ServerWorld world, DamageSource source) booleanArmorStandEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanBlockAttachedEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanDisplayEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanEndCrystalEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.final booleanInteractionEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanItemFrameEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.protected @Nullable SoundEventArmorStandEntity.getHurtSound(DamageSource source) private voidArmorStandEntity.onBreak(ServerWorld world, DamageSource damageSource) private booleanItemFrameEntity.shouldDropHeldStackWhenDamaged(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(ServerWorld world, LivingEntity entity, int amplifier, DamageSource source, float amount) voidStatusEffect.onEntityDamage(ServerWorld world, LivingEntity entity, int amplifier, DamageSource source, float amount) voidStatusEffectInstance.onEntityDamage(ServerWorld world, 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 TypeMethodDescriptionCreakingEntity.becomeAngryAndGetPlayer(DamageSource damageSource) booleanCreakingEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanEndermanEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanEvokerFangsEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanGhastEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanGuardianEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanHoglinEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanPiglinBruteEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanPiglinEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanShulkerEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanSilverfishEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanWardenEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanZoglinEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanZombieEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.private booleanEndermanEntity.damageFromPotion(ServerWorld world, 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(ServerWorld world, DamageSource damageSource, boolean causedByPlayer) protected SoundEventBlazeEntity.getHurtSound(DamageSource source) protected SoundEventBoggedEntity.getHurtSound(DamageSource source) protected SoundEventBreezeEntity.getHurtSound(DamageSource source) protected SoundEventCreakingEntity.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(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.booleanCreeperEntity.handleFallDamage(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.private static booleanGhastEntity.isFireballFromPlayer(DamageSource damageSource) Returns whetherdamageSourceis caused by a player's fireball.booleanBreezeEntity.isInvulnerableTo(ServerWorld world, DamageSource source) booleanGhastEntity.isInvulnerableTo(ServerWorld world, DamageSource source) booleanWardenEntity.isInvulnerableTo(ServerWorld world, DamageSource source) voidCreakingEntity.killFromHeart(DamageSource damageSource) 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(ServerWorld world, DamageSource source, float amount) protected voidArmadilloEntity.applyDamage(ServerWorld world, DamageSource source, float amount) protected voidCamelEntity.applyDamage(ServerWorld world, DamageSource source, float amount) protected voidWolfEntity.applyDamage(ServerWorld world, DamageSource source, float amount) booleanAbstractHorseEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanAllayEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanArmadilloEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanAxolotlEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanBatEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanBeeEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanGlowSquidEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanIronGolemEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanPandaEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanParrotEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanSquidEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanWolfEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.protected voidHorseEntity.damageArmor(DamageSource source, float amount) protected voidWolfEntity.damageArmor(DamageSource source, float amount) protected voidFoxEntity.drop(ServerWorld world, DamageSource damageSource) protected SoundEventAbstractCowEntity.getHurtSound(DamageSource source) 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 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(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.booleanLlamaEntity.handleFallDamage(double fallDistance, float damagePerDistance, 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(ServerWorld world, DamageSource source, float amount) booleanPlayerEntity.damage(ServerWorld world, 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(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.booleanPlayerEntity.isInvulnerableTo(ServerWorld world, DamageSource source) voidPlayerEntity.onDeath(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.projectile
Methods in net.minecraft.entity.projectile with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanShulkerBulletEntity.clientDamage(DamageSource source) booleanExplosiveProjectileEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanProjectileEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanShulkerBulletEntity.damage(ServerWorld world, 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(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.voidRaiderEntity.onDeath(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.vehicle
Fields in net.minecraft.entity.vehicle declared as DamageSourceMethods in net.minecraft.entity.vehicle with parameters of type DamageSourceModifier and TypeMethodDescriptionbooleanVehicleEntity.clientDamage(DamageSource source) booleanTntMinecartEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.booleanVehicleEntity.damage(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.protected voidTntMinecartEntity.explode(@Nullable DamageSource damageSource, double power) booleanTntMinecartEntity.handleFallDamage(double fallDistance, float damagePerDistance, DamageSource damageSource) Called when an entity falls.voidAbstractChestBoatEntity.killAndDropSelf(ServerWorld world, DamageSource damageSource) voidStorageMinecartEntity.killAndDropSelf(ServerWorld world, DamageSource damageSource) voidTntMinecartEntity.killAndDropSelf(ServerWorld world, DamageSource damageSource) protected voidVehicleEntity.killAndDropSelf(ServerWorld world, DamageSource damageSource) default voidVehicleInventory.onBroken(DamageSource source, ServerWorld world, Entity vehicle) voidTntMinecartEntity.prime(@Nullable DamageSource source) (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 that return DamageSourceModifier and TypeMethodDescriptionItem.getDamageSource(LivingEntity user) MaceItem.getDamageSource(LivingEntity user) 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 ContextParameter<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(ServerWorld world, DamageSource source, float amount) Applies a damage to this entity.protected floatServerPlayerEntity.getDamageAgainst(Entity target, float baseDamage, DamageSource damageSource) booleanServerPlayerEntity.isInvulnerableTo(ServerWorld world, DamageSource source) voidServerPlayerEntity.onDeath(DamageSource damageSource) voidServerPlayerEntity.updateKilledAdvancementCriterion(Entity entityKilled, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.world
Methods in net.minecraft.server.world with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidServerWorld.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.voidServerWorld.sendEntityDamage(Entity entity, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.test
Methods in net.minecraft.test with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidTestContext.damage(Entity entity, DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.world
Methods in net.minecraft.world with parameters of type DamageSourceModifier and TypeMethodDescriptionvoidWorld.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType) abstract voidWorld.createExplosion(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, double x, double y, double z, float power, boolean createFire, World.ExplosionSourceType explosionSourceType, ParticleEffect smallParticle, ParticleEffect largeParticle, RegistryEntry<SoundEvent> soundEvent) Creates an explosion.voidWorld.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) ExplosionImpl.getDamageSource()Constructors in net.minecraft.world.explosion with parameters of type DamageSourceModifierConstructorDescriptionExplosionImpl(ServerWorld world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionBehavior behavior, Vec3d pos, float power, boolean createFire, Explosion.DestructionType destructionType)