Interface ServerEntityWorldChangeEvents.AfterEntityChange

Enclosing class:
ServerEntityWorldChangeEvents
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ServerEntityWorldChangeEvents.AfterEntityChange
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterChangeWorld​(net.minecraft.entity.Entity originalEntity, net.minecraft.entity.Entity newEntity, net.minecraft.server.world.ServerWorld origin, net.minecraft.server.world.ServerWorld destination)
    Called after an entity has been recreated at the destination when being moved to a different world.
  • Method Details

    • afterChangeWorld

      void afterChangeWorld(net.minecraft.entity.Entity originalEntity, net.minecraft.entity.Entity newEntity, net.minecraft.server.world.ServerWorld origin, net.minecraft.server.world.ServerWorld destination)
      Called after an entity has been recreated at the destination when being moved to a different world.

      Note this event is not called if the entity is a ServerPlayerEntity. ServerEntityWorldChangeEvents.AfterPlayerChange should be used to track when a player has changed worlds.

      Parameters:
      originalEntity - the original entity
      newEntity - the new entity at the destination
      origin - the world the original entity is in
      destination - the destination world the new entity is in