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 TypeMethodDescriptionboolean
EntityHurtPlayerCriterion.Conditions.matches
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) boolean
PlayerHurtEntityCriterion.Conditions.matches
(ServerPlayerEntity player, LootContext entityContext, DamageSource source, float dealt, float taken, boolean blocked) boolean
OnKilledCriterion.Conditions.test
(ServerPlayerEntity player, LootContext killedEntityContext, DamageSource killingBlow) void
EntityHurtPlayerCriterion.trigger
(ServerPlayerEntity player, DamageSource source, float dealt, float taken, boolean blocked) void
OnKilledCriterion.trigger
(ServerPlayerEntity player, Entity entity, DamageSource killingDamage) void
PlayerHurtEntityCriterion.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()
default DamageSource
LandingBlock.getDamageSource()
PointedDripstoneBlock.getDamageSource()
-
Uses of DamageSource in net.minecraft.client.network
Methods in net.minecraft.client.network with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
ClientPlayerEntity.applyDamage
(DamageSource source, float amount) boolean
ClientPlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
OtherClientPlayerEntity.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 TypeMethodDescriptionint
Enchantment.getProtectionAmount
(int level, DamageSource source) static int
EnchantmentHelper.getProtectionAmount
(Iterable<ItemStack> equipment, DamageSource source) int
ProtectionEnchantment.getProtectionAmount
(int level, DamageSource source) -
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 float
LivingEntity.applyArmorToDamage
(DamageSource source, float amount) protected void
LivingEntity.applyDamage
(DamageSource source, float amount) boolean
LivingEntity.blockedByShield
(DamageSource source) boolean
Entity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ExperienceOrbEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ItemEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
LivingEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
LivingEntity.damageArmor
(DamageSource source, float amount) protected void
LivingEntity.damageHelmet
(DamageSource source, float amount) protected void
LivingEntity.drop
(DamageSource source) protected void
LivingEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
LivingEntity.dropLoot
(DamageSource source, boolean causedByPlayer) protected @Nullable SoundEvent
LivingEntity.getHurtSound
(DamageSource source) protected LootContext.Builder
LivingEntity.getLootContextBuilder
(boolean causedByPlayer, DamageSource source) boolean
Entity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
FallingBlockEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
LivingEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
Entity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.protected float
LivingEntity.modifyAppliedDamage
(DamageSource source, float amount) Returns the modified damage value for the applieddamage
.void
LivingEntity.onDeath
(DamageSource damageSource) protected void
LivingEntity.playHurtSound
(DamageSource source) private boolean
LivingEntity.tryUseTotem
(DamageSource source) void
Entity.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 TypeMethodDescriptionboolean
WitherEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
WitherEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected SoundEvent
WitherEntity.getHurtSound
(DamageSource source) boolean
WitherEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls. -
Uses of DamageSource in net.minecraft.entity.boss.dragon
Methods in net.minecraft.entity.boss.dragon with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
EnderDragonEntity.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source) void
EnderDragonFight.crystalDestroyed
(EndCrystalEntity enderCrystal, DamageSource source) boolean
EnderDragonEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
EnderDragonPart.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
EnderDragonEntity.damagePart
(EnderDragonPart part, DamageSource source, float amount) protected SoundEvent
EnderDragonEntity.getHurtSound
(DamageSource source) protected boolean
EnderDragonEntity.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 TypeMethodDescriptionvoid
AbstractPhase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) void
HoldingPatternPhase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) void
Phase.crystalDestroyed
(EndCrystalEntity crystal, BlockPos pos, DamageSource source, @Nullable PlayerEntity player) float
AbstractPhase.modifyDamageTaken
(DamageSource damageSource, float damage) float
AbstractSittingPhase.modifyDamageTaken
(DamageSource damageSource, float damage) float
Phase.modifyDamageTaken
(DamageSource damageSource, float damage) -
Uses of DamageSource in net.minecraft.entity.damage
Subclasses of DamageSource in net.minecraft.entity.damageModifier and TypeClassDescriptionclass
class
class
Fields in net.minecraft.entity.damage declared as DamageSourceModifier and TypeFieldDescriptionstatic final DamageSource
DamageSource.ANVIL
static final DamageSource
DamageSource.CACTUS
static final DamageSource
DamageSource.CRAMMING
private final DamageSource
DamageRecord.damageSource
static final DamageSource
DamageSource.DRAGON_BREATH
static final DamageSource
DamageSource.DROWN
static final DamageSource
DamageSource.DRYOUT
static final DamageSource
DamageSource.FALL
static final DamageSource
DamageSource.FALLING_BLOCK
static final DamageSource
DamageSource.FALLING_STALACTITE
static final DamageSource
DamageSource.FLY_INTO_WALL
static final DamageSource
DamageSource.FREEZE
static final DamageSource
DamageSource.GENERIC
static final DamageSource
DamageSource.HOT_FLOOR
static final DamageSource
DamageSource.IN_FIRE
static final DamageSource
DamageSource.IN_WALL
static final DamageSource
DamageSource.LAVA
static final DamageSource
DamageSource.LIGHTNING_BOLT
static final DamageSource
DamageSource.MAGIC
static final DamageSource
DamageSource.ON_FIRE
static final DamageSource
DamageSource.OUT_OF_WORLD
static final DamageSource
DamageSource.STALAGMITE
static final DamageSource
DamageSource.STARVE
static final DamageSource
DamageSource.SWEET_BERRY_BUSH
static final DamageSource
DamageSource.WITHER
Methods in net.minecraft.entity.damage that return DamageSourceModifier and TypeMethodDescriptionstatic DamageSource
DamageSource.arrow
(PersistentProjectileEntity projectile, @Nullable Entity attacker) static DamageSource
DamageSource.badRespawnPoint()
static DamageSource
DamageSource.explosion
(@Nullable LivingEntity attacker) static DamageSource
static DamageSource
DamageSource.fireball
(AbstractFireballEntity fireball, @Nullable Entity attacker) static DamageSource
DamageSource.firework
(FireworkRocketEntity firework, @Nullable Entity attacker) DamageRecord.getDamageSource()
static DamageSource
static DamageSource
DamageSource.mob
(LivingEntity attacker) static DamageSource
DamageSource.mobProjectile
(Entity projectile, @Nullable LivingEntity attacker) static DamageSource
DamageSource.player
(PlayerEntity attacker) protected DamageSource
DamageSource.setBypassesArmor()
protected DamageSource
DamageSource.setBypassesProtection()
DamageSource.setExplosive()
protected DamageSource
DamageSource.setFallingBlock()
protected DamageSource
DamageSource.setFire()
DamageSource.setFromFalling()
DamageSource.setNeutral()
protected DamageSource
DamageSource.setOutOfWorld()
DamageSource.setProjectile()
DamageSource.setScaledWithDifficulty()
protected DamageSource
DamageSource.setUnblockable()
DamageSource.setUsesMagic()
static DamageSource
static DamageSource
DamageSource.sting
(LivingEntity attacker) static DamageSource
static DamageSource
DamageSource.thrownProjectile
(Entity projectile, @Nullable Entity attacker) static DamageSource
static DamageSource
DamageSource.witherSkull
(WitherSkullEntity witherSkull, Entity attacker) Methods in net.minecraft.entity.damage with parameters of type DamageSourceModifier and TypeMethodDescriptionvoid
DamageTracker.onDamage
(DamageSource damageSource, float originalHealth, float damage) Constructors in net.minecraft.entity.damage with parameters of type DamageSourceModifierConstructorDescriptionDamageRecord
(DamageSource damageSource, int entityAge, float entityOriginalHealth, float damage, @Nullable String fallDeathSuffix, float fallDistance) -
Uses of DamageSource in net.minecraft.entity.decoration
Methods in net.minecraft.entity.decoration with parameters of type DamageSourceModifier and TypeMethodDescriptionprivate void
ArmorStandEntity.breakAndDropItem
(DamageSource damageSource) private void
EndCrystalEntity.crystalDestroyed
(DamageSource source) boolean
AbstractDecorationEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ArmorStandEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
EndCrystalEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ItemFrameEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected @Nullable SoundEvent
ArmorStandEntity.getHurtSound
(DamageSource source) private void
ArmorStandEntity.onBreak
(DamageSource damageSource) private void
ArmorStandEntity.updateHealth
(DamageSource damageSource, float amount) -
Uses of DamageSource in net.minecraft.entity.mob
Methods in net.minecraft.entity.mob with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
EndermanEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
GhastEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
GuardianEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
HoglinEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
PiglinBruteEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
PiglinEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ShulkerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
SilverfishEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
WardenEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ZoglinEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ZombieEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.private boolean
EndermanEntity.damageFromPotion
(DamageSource source, PotionEntity potion, float amount) protected void
CreeperEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
EndermanEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
MobEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
PiglinEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
SkeletonEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
WitherSkeletonEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
ZombieEntity.dropEquipment
(DamageSource source, int lootingMultiplier, boolean allowDrops) protected void
MobEntity.dropLoot
(DamageSource source, boolean causedByPlayer) protected SoundEvent
BlazeEntity.getHurtSound
(DamageSource source) protected SoundEvent
CreeperEntity.getHurtSound
(DamageSource source) protected SoundEvent
DrownedEntity.getHurtSound
(DamageSource source) protected SoundEvent
ElderGuardianEntity.getHurtSound
(DamageSource source) protected SoundEvent
EndermanEntity.getHurtSound
(DamageSource source) protected SoundEvent
EndermiteEntity.getHurtSound
(DamageSource source) protected SoundEvent
EvokerEntity.getHurtSound
(DamageSource source) protected SoundEvent
GhastEntity.getHurtSound
(DamageSource source) protected SoundEvent
GuardianEntity.getHurtSound
(DamageSource source) protected SoundEvent
HoglinEntity.getHurtSound
(DamageSource source) protected SoundEvent
HostileEntity.getHurtSound
(DamageSource source) protected SoundEvent
HuskEntity.getHurtSound
(DamageSource source) protected SoundEvent
IllusionerEntity.getHurtSound
(DamageSource source) protected SoundEvent
MagmaCubeEntity.getHurtSound
(DamageSource source) protected SoundEvent
PhantomEntity.getHurtSound
(DamageSource source) protected SoundEvent
PiglinBruteEntity.getHurtSound
(DamageSource source) protected SoundEvent
PiglinEntity.getHurtSound
(DamageSource source) protected SoundEvent
PillagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
RavagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
ShulkerEntity.getHurtSound
(DamageSource source) protected SoundEvent
SilverfishEntity.getHurtSound
(DamageSource source) protected SoundEvent
SkeletonEntity.getHurtSound
(DamageSource source) protected SoundEvent
SkeletonHorseEntity.getHurtSound
(DamageSource source) protected SoundEvent
SlimeEntity.getHurtSound
(DamageSource source) protected SoundEvent
SpiderEntity.getHurtSound
(DamageSource source) protected SoundEvent
StrayEntity.getHurtSound
(DamageSource source) protected SoundEvent
VexEntity.getHurtSound
(DamageSource source) protected SoundEvent
VindicatorEntity.getHurtSound
(DamageSource source) protected SoundEvent
WardenEntity.getHurtSound
(DamageSource source) protected SoundEvent
WitchEntity.getHurtSound
(DamageSource source) protected SoundEvent
WitherSkeletonEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZoglinEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZombieEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZombieHorseEntity.getHurtSound
(DamageSource source) ZombieVillagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
ZombifiedPiglinEntity.getHurtSound
(DamageSource source) protected LootContext.Builder
MobEntity.getLootContextBuilder
(boolean causedByPlayer, DamageSource source) boolean
BlazeEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
CreeperEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
FlyingEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
MagmaCubeEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.private static boolean
GhastEntity.isFireballFromPlayer
(DamageSource damageSource) Returns whetherdamageSource
is caused by a player's fireball.boolean
GhastEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.boolean
WardenEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.protected float
WitchEntity.modifyAppliedDamage
(DamageSource source, float amount) Returns the modified damage value for the applieddamage
.protected void
MobEntity.playHurtSound
(DamageSource source) -
Uses of DamageSource in net.minecraft.entity.passive
Methods in net.minecraft.entity.passive with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
AllayEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
AnimalEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
AxolotlEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
BatEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
BeeEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
GlowSquidEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
IronGolemEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
PandaEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ParrotEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
SquidEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
WolfEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
FoxEntity.drop
(DamageSource source) protected @Nullable SoundEvent
AbstractHorseEntity.getHurtSound
(DamageSource source) protected SoundEvent
AllayEntity.getHurtSound
(DamageSource source) protected SoundEvent
AxolotlEntity.getHurtSound
(DamageSource source) protected SoundEvent
BatEntity.getHurtSound
(DamageSource source) protected SoundEvent
BeeEntity.getHurtSound
(DamageSource source) protected SoundEvent
CatEntity.getHurtSound
(DamageSource source) protected SoundEvent
ChickenEntity.getHurtSound
(DamageSource source) protected SoundEvent
CodEntity.getHurtSound
(DamageSource source) protected SoundEvent
CowEntity.getHurtSound
(DamageSource source) protected SoundEvent
DolphinEntity.getHurtSound
(DamageSource source) protected SoundEvent
DonkeyEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
FoxEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
FrogEntity.getHurtSound
(DamageSource source) protected SoundEvent
GlowSquidEntity.getHurtSound
(DamageSource source) protected SoundEvent
GoatEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
GolemEntity.getHurtSound
(DamageSource source) protected SoundEvent
HorseEntity.getHurtSound
(DamageSource source) protected SoundEvent
IronGolemEntity.getHurtSound
(DamageSource source) protected SoundEvent
LlamaEntity.getHurtSound
(DamageSource source) protected SoundEvent
MuleEntity.getHurtSound
(DamageSource source) protected SoundEvent
OcelotEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
PandaEntity.getHurtSound
(DamageSource source) protected SoundEvent
ParrotEntity.getHurtSound
(DamageSource source) protected SoundEvent
PigEntity.getHurtSound
(DamageSource source) protected SoundEvent
PolarBearEntity.getHurtSound
(DamageSource source) protected SoundEvent
PufferfishEntity.getHurtSound
(DamageSource source) protected SoundEvent
RabbitEntity.getHurtSound
(DamageSource source) protected SoundEvent
SalmonEntity.getHurtSound
(DamageSource source) protected SoundEvent
SheepEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
SnowGolemEntity.getHurtSound
(DamageSource source) protected SoundEvent
SquidEntity.getHurtSound
(DamageSource source) protected SoundEvent
StriderEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
TadpoleEntity.getHurtSound
(DamageSource source) protected SoundEvent
TropicalFishEntity.getHurtSound
(DamageSource source) protected @Nullable SoundEvent
TurtleEntity.getHurtSound
(DamageSource source) protected SoundEvent
VillagerEntity.getHurtSound
(DamageSource source) protected SoundEvent
WanderingTraderEntity.getHurtSound
(DamageSource source) protected SoundEvent
WolfEntity.getHurtSound
(DamageSource source) boolean
AbstractHorseEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
AllayEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
BatEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
BeeEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
CatEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
ChickenEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
GolemEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
LlamaEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
OcelotEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
ParrotEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.void
IronGolemEntity.onDeath
(DamageSource damageSource) void
MerchantEntity.onDeath
(DamageSource damageSource) void
TameableEntity.onDeath
(DamageSource damageSource) void
VillagerEntity.onDeath
(DamageSource damageSource) void
WolfEntity.onDeath
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.player
Methods in net.minecraft.entity.player with parameters of type DamageSourceModifier and TypeMethodDescriptionprotected void
PlayerEntity.applyDamage
(DamageSource source, float amount) boolean
PlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.protected void
PlayerEntity.damageArmor
(DamageSource source, float amount) void
PlayerInventory.damageArmor
(DamageSource damageSource, float amount, int[] slots) protected void
PlayerEntity.damageHelmet
(DamageSource source, float amount) protected SoundEvent
PlayerEntity.getHurtSound
(DamageSource source) boolean
PlayerEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.boolean
PlayerEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.void
PlayerEntity.onDeath
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.projectile
Methods in net.minecraft.entity.projectile with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
DragonFireballEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ExplosiveProjectileEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ShulkerBulletEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
SmallFireballEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
WitherSkullEntity.damage
(DamageSource source, float amount) Applies a damage to this entity. -
Uses of DamageSource in net.minecraft.entity.raid
Methods in net.minecraft.entity.raid with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
RaiderEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.void
RaiderEntity.onDeath
(DamageSource damageSource) -
Uses of DamageSource in net.minecraft.entity.vehicle
Methods in net.minecraft.entity.vehicle with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
AbstractMinecartEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
BoatEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
TntMinecartEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.void
AbstractMinecartEntity.dropItems
(DamageSource damageSource) protected void
BoatEntity.dropItems
(DamageSource source) void
ChestBoatEntity.dropItems
(DamageSource source) void
StorageMinecartEntity.dropItems
(DamageSource damageSource) void
TntMinecartEntity.dropItems
(DamageSource damageSource) boolean
TntMinecartEntity.handleFallDamage
(float fallDistance, float damageMultiplier, DamageSource damageSource) Called when an entity falls.default void
VehicleInventory.onBroken
(DamageSource source, World world, Entity vehicle) -
Uses of DamageSource in net.minecraft.item
Methods in net.minecraft.item with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
Item.damage
(DamageSource source) Returns whether this item can be damaged by the givensource
. -
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.predicate
Methods in net.minecraft.predicate with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
DamagePredicate.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 TypeMethodDescriptionboolean
DamageSourcePredicate.test
(ServerPlayerEntity player, DamageSource damageSource) boolean
DamageSourcePredicate.test
(ServerWorld world, Vec3d pos, DamageSource damageSource) -
Uses of DamageSource in net.minecraft.server.network
Methods in net.minecraft.server.network with parameters of type DamageSourceModifier and TypeMethodDescriptionboolean
ServerPlayerEntity.damage
(DamageSource source, float amount) Applies a damage to this entity.boolean
ServerPlayerEntity.isInvulnerableTo
(DamageSource damageSource) Returns whether the entity is invulnerable todamageSource
.void
ServerPlayerEntity.onDeath
(DamageSource damageSource) void
ServerPlayerEntity.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, Explosion.DestructionType destructionType) Creates an explosion. -
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, Explosion.DestructionType destructionType) Creates an explosion. -
Uses of DamageSource in net.minecraft.world.explosion
Fields in net.minecraft.world.explosion declared as DamageSourceMethods in net.minecraft.world.explosion that return DamageSourceConstructors 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)