Class ServerEntityWorldChangeEvents

java.lang.Object
net.fabricmc.fabric.api.entity.event.v1.ServerEntityWorldChangeEvents

@Deprecated public final class ServerEntityWorldChangeEvents extends Object
Deprecated.
Use Quilt Entity Events' EntityWorldChangeEvents instead.
Events related to an entity being moved to another world.
API Note:
For a ServerPlayerEntity, please use AFTER_PLAYER_CHANGE_WORLD.
  • Field Details

    • AFTER_ENTITY_CHANGE_WORLD

      public static final Event<ServerEntityWorldChangeEvents.AfterEntityChange> AFTER_ENTITY_CHANGE_WORLD
      Deprecated.
      An event which is called after an entity has been moved to a different world.

      All entities are copied to the destination and the old entity removed. This event does not apply to the ServerPlayerEntity since players are physically moved to the new world instead of being copied over.

      A mod may use this event for reference cleanup if it is tracking an entity's current world.

      See Also:
    • AFTER_PLAYER_CHANGE_WORLD

      public static final Event<ServerEntityWorldChangeEvents.AfterPlayerChange> AFTER_PLAYER_CHANGE_WORLD
      Deprecated.
      An event which is called after a player has been moved to a different world.

      This is similar to AFTER_ENTITY_CHANGE_WORLD but is only called for players. This is because the player is physically moved to the new world instead of being recreated at the destination.

      See Also: