Interface EntityEvent.Add
- Enclosing interface:
- EntityEvent
public static interface EntityEvent.Add
-
Method Summary
Modifier and TypeMethodDescriptionadd
(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
Invoked when an entity is about to be added to the world. Equivalent to Forge'sEntityJoinWorldEvent
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.
-