Interface ServerEntityLevelChangeEvents.AfterEntityChange

Enclosing class:
ServerEntityLevelChangeEvents
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 ServerEntityLevelChangeEvents.AfterEntityChange
  • Method Summary

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

    • afterChangeLevel

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

      Note this event is not called if the entity is a ServerPlayer. ServerEntityLevelChangeEvents.AfterPlayerChange should be used to track when a player has changed levels.

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