Package net.minecraftforge.event.entity
Class EntityJoinWorldEvent
- java.lang.Object
-
- net.minecraftforge.eventbus.api.Event
-
- net.minecraftforge.event.entity.EntityEvent
-
- net.minecraftforge.event.entity.EntityJoinWorldEvent
-
public class EntityJoinWorldEvent extends EntityEvent
EntityJoinWorldEvent is fired when an Entity joins the world.
This event is fired whenever an Entity is added to the world inWorld#loadEntities(Collection)
,net.minecraft.world.ServerWorld#loadEntities(Collection)
World#joinEntityInSurroundings(Entity)
, andWorld#spawnEntity(Entity)
.
Note: This event may be called before the underlyingChunk
is promoted toChunkStatus.FULL
. You will cause chunk loading deadlocks if you don't delay your world interactions.
world
contains the world in which the entity is to join.
This event isCancelable
.
If this event is canceled, the Entity is not added to the world.
This event does not have a result.Event.HasResult
This event is fired on theMinecraftForge.EVENT_BUS
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class net.minecraftforge.event.entity.EntityEvent
EntityEvent.CanUpdate, EntityEvent.EnteringChunk, EntityEvent.EntityConstructing, EntityEvent.Size
-
-
Constructor Summary
Constructors Constructor Description EntityJoinWorldEvent(Entity entity, World world)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description World
getWorld()
-
Methods inherited from class net.minecraftforge.event.entity.EntityEvent
getEntity
-
-