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 in World#loadEntities(Collection), net.minecraft.world.ServerWorld#loadEntities(Collection) World#joinEntityInSurroundings(Entity), and World#spawnEntity(Entity).
Note: This event may be called before the underlying Chunk is promoted to ChunkStatus.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 is Cancelable.
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 the MinecraftForge.EVENT_BUS.
  • Field Details

    • world

      private final World world
  • Constructor Details

    • EntityJoinWorldEvent

      public EntityJoinWorldEvent(Entity entity, World world)
  • Method Details

    • getWorld

      public World getWorld()