Package net.minecraftforge.event.entity.living
package net.minecraftforge.event.entity.living
-
ClassDescriptionThis event is fired when an
EntityAnimal
is tamed.BabyEntitySpawnEvent is fired just before a baby entity is about to be spawned.Deprecated.EntityTeleportEvent is fired when an event involving any teleportation of an Entity occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
EntityTeleportEvent.getTarget()
contains the target destination.
EntityTeleportEvent.getPrev()
contains the entity's current position.
All children of this event are fired on theMinecraftForge.EVENT_BUS
.EntityTeleportEvent.ChorusFruit is fired before a LivingEntity is teleported due to consuming Chorus Fruit.EntityTeleportEvent.EnderEntity is fired before an Enderman or Shulker randomly teleports.EntityTeleportEvent.EnderPearl is fired before an Entity is teleported from an EnderPearlEntity.EntityTeleportEvent.SpreadPlayersCommand is fired before a living entity is teleported from use ofSpreadPlayersCommand
.EntityTeleportEvent.TeleportCommand is fired before a living entity is teleported from use ofTeleportCommand
.LivingAttackEvent is fired when a living Entity is attacked.LivingConversionEvent.Post is triggered when an entity is replacing itself with another entity.LivingConversionEvent.Pre is triggered when an entity is trying to replace itself with another entity This event may trigger every tick even if it was cancelled last tick for entities like Zombies and Hoglins.LivingDamageEvent is fired just before damage is applied to entity.
At this point armor, potion and absorption modifiers have already been applied to damage - this is FINAL value.
Also note that appropriate resources (like armor durability and absorption extra hearths) have already been consumed.
This event is fired whenever an Entity is damaged inEntityLivingBase#damageEntity(DamageSource, float)
andEntityPlayer#damageEntity(DamageSource, float)
.
This event is fired via theForgeHooks.onLivingDamage(EntityLivingBase, DamageSource, float)
.
LivingDamageEvent.source
contains the DamageSource that caused this Entity to be hurt.LivingDeathEvent is fired when an Entity dies.Fired when the ender dragon or wither attempts to destroy a block and when ever a zombie attempts to break a door.LivingDropsEvent is fired when an Entity's death causes dropped items to appear.
This event is fired whenever an Entity dies and drops items inEntityLivingBase#onDeath(DamageSource)
.
This event is fired via theForgeHooks#onLivingDrops(EntityLivingBase, DamageSource, ArrayList, int, boolean)
.
LivingDropsEvent.source
contains the DamageSource that caused the drop to occur.
LivingDropsEvent.drops
contains the ArrayList of EntityItems that will be dropped.
LivingDropsEvent.lootingLevel
contains the amount of loot that will be dropped.
LivingDropsEvent.recentlyHit
determines whether the Entity doing the drop has recently been damaged.
This event isCancelable
.
If this event is canceled, the Entity does not drop anything.
This event does not have a result.Fired after an item has fully finished being used.Fired when a player starts 'using' an item, typically when they hold right mouse.Fired when a player stops using an item without the use duration timing out.Fired every tick that a player is 'using' an item, seeLivingEntityUseItemEvent.Start
for info.LivingEquipmentChangeEvent
is fired when the Equipment of a Entity changes.LivingEvent is fired whenever an event involving Living entities occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
All children of this event are fired on theMinecraftForge.EVENT_BUS
.LivingJumpEvent is fired when an Entity jumps.
This event is fired whenever an Entity jumps inEntityLivingBase#jump()
,EntityMagmaCube#jump()
, andEntityHorse#jump()
.
This event is fired via theForgeHooks.onLivingJump(EntityLivingBase)
.
This event is notCancelable
.
This event does not have a result.LivingUpdateEvent is fired when an Entity is updated.Event for when an entity drops experience on its death, can be used to change the amount of experience points dropped or completely prevent dropping of experience by canceling the event.LivingFallEvent is fired when an Entity is set to be falling.
This event is fired whenever an Entity is set to fall inEntityLivingBase#fall(float, float)
.
This event is fired via theForgeHooks.onLivingFall(EntityLivingBase, float, float)
.
LivingFallEvent.distance
contains the distance the Entity is to fall.LivingHealEvent is fired when an Entity is set to be healed.LivingHurtEvent is fired when an Entity is set to be hurt.LivingKnockBackEvent is fired when a living entity is about to be knocked back.LivingSetAttackTargetEvent is fired when an Entity sets a target to attack.
This event is fired whenever an Entity sets a target to attack inEntityLiving#setAttackTarget(EntityLivingBase)
andEntityLivingBase#setRevengeTarget(EntityLivingBase)
.
This event is fired via theForgeHooks.onLivingSetAttackTarget(EntityLivingBase, EntityLivingBase)
.
LivingSetAttackTargetEvent.target
contains the newly targeted Entity.
This event is notCancelable
.
This event does not have a result.LivingSpawnEvent is fired for any events associated with Living Entities spawn status.Fired each tick for despawnable mobs to allow control over despawning.Fires before mob spawn events.SpecialSpawn is fired when an Entity is to be spawned.
This allows you to do special inializers in the new entity.
This event is fired via theForgeEventFactory#doSpecialSpawn(EntityLiving, World, float, float, float)
.
This event isCancelable
.
If this event is canceled, the Entity is not spawned.
This event does not have a result.Fires after Potion Color Calculation.This Event is fired when a new Potion is added to the Entity.This Event is fired to check if a Potion can get applied to an Entity.This Event is fired when a Potion effect expires on an Entity.This Event is fired when a Potion is about to get removed from an Entity.ZombieEvent is fired whenever a zombie is spawned for aid.SummonAidEvent is fired when a Zombie Entity is summoned.
EntityTeleportEvent.EnderEntity
orEntityTeleportEvent.EnderPearl
.