@FunctionalInterface public static interface ServerEntityWorldChangeEvents.AfterEntityChange
Modifier and Type | Method and 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.
|
void afterChangeWorld(net.minecraft.entity.Entity originalEntity, net.minecraft.entity.Entity newEntity, net.minecraft.server.world.ServerWorld origin, net.minecraft.server.world.ServerWorld destination)
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.
originalEntity
- the original entitynewEntity
- the new entity at the destinationorigin
- the world the original entity is indestination
- the destination world the new entity is in