Package net.minecraftforge.event.entity
package net.minecraftforge.event.entity
-
ClassDescriptionEntityAttributeCreationEvent.
Use this event to register attributes for your own EntityTypes.EntityAttributeModificationEvent.
Use this event to add attributes to existing entity types.EntityEvent is fired when an event involving any Entity occurs.
If a method utilizes thisEvent
as its parameter, the method will receive every child event of this class.
EntityEvent.entity
contains the entity that caused this event to occur.
All children of this event are fired on theMinecraftForge.EVENT_BUS
.This event is fired on server and client after an Entity has entered a different section.EntityConstructing is fired when an Entity is being created.This event is fired whenever thePose
changes, and in a few other hardcoded scenarios.
CAREFUL: This is also fired in the Entity constructor.EntityMobGriefingEvent is fired when mob griefing is about to occur and allows an event listener to specify whether it should or not.
This event is fired when ever themobGriefing
game rule is checked.
This event has aresult
:Event.Result.ALLOW
means this instance of mob griefing is allowed.Event.Result.DEFAULT
means themobGriefing
game rule is used to determine the behaviour.Event.Result.DENY
means this instance of mob griefing is not allowed. This event is fired on theMinecraftForge.EVENT_BUS
.This event gets fired whenever a entity mounts/dismounts another entity.
entityBeingMounted can be null, be sure to check for that.EntityStruckByLightningEvent is fired when an Entity is about to be struck by lightening.
This event is fired whenever an EntityLightningBolt is updated to strike an Entity inLightningBolt.tick()
viaForgeEventFactory.onEntityStruckByLightning(Entity, LightningBolt)
.
EntityStruckByLightningEvent.lightning
contains the instance of EntityLightningBolt attempting to strike an entity.
This event isCancelable
.
If this event is canceled, the Entity is not struck by the lightening.
This event does not have a result.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
.EntityTravelToDimensionEvent is fired before an Entity travels to a dimension.
EntityTravelToDimensionEvent.dimension
contains the id of the dimension the entity is traveling to.
This event isCancelable
.
If this event is canceled, the Entity does not travel to the dimension.
This event does not have a result.This event is fired on theMinecraftForge.EVENT_BUS
.
This event is fired when a projectile entity impacts something.
This event is fired viaForgeEventFactory.onProjectileImpact(Projectile, HitResult)
This event is fired for all vanilla projectiles by Forge, custom projectiles should fire this event and check the result in a similar fashion.This event allows eachEntityType
to have aSpawnPlacements.SpawnPredicate
registered or modified.