Class 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 Summary

      Fields 
      Modifier and Type Field Description
      private World world  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      World getWorld()  
      • Methods inherited from class net.minecraftforge.eventbus.api.Event

        getListenerList, getParentListenerList, getPhase, getResult, hasResult, isCancelable, isCanceled, setCanceled, setPhase, setResult, setup
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • world

        private final World world
    • Constructor Detail

      • EntityJoinWorldEvent

        public EntityJoinWorldEvent​(Entity entity,
                                    World world)
    • Method Detail

      • getWorld

        public World getWorld()