Interface EntityEvent.Add

Enclosing interface:
EntityEvent

public static interface EntityEvent.Add
  • Method Summary

    Modifier and Type
    Method
    Description
    add(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.Level world)
    Invoked when an entity is about to be added to the world.
  • Method Details

    • add

      EventResult add(net.minecraft.world.entity.Entity entity, net.minecraft.world.level.Level world)
      Invoked when an entity is about to be added to the world. Equivalent to Forge's EntityJoinWorldEvent event.
      Parameters:
      entity - The entity to add to the level.
      world - The level the entity is added to.
      Returns:
      A EventResult determining the outcome of the event, the execution of the entity addition may be cancelled by the result.