Interface EntitySnapshot<E extends LiveEntity>

Type Parameters:
E - The live entity type of this EntitySnapshot
All Superinterfaces:
Entity<EntitySnapshot<? extends LiveEntity>>, Positionable<SyncExactPosition>
All Known Subinterfaces:
BatSnapshot, ChickenSnapshot, ClassicZombieSnapshot, CodSnapshot, CowSnapshot, CreeperEntitySnapshot, DroppedItemSnapshot, EntitySnapshot.NoneDestructibleSnapshot<E>, HumanSnapshot, ItemFrameSnapshot, MinecartSnapshot, ParrotSnapshot, PlayerSnapshot, SnowballEntitySnapshot

public interface EntitySnapshot<E extends LiveEntity> extends Entity<EntitySnapshot<? extends LiveEntity>>
The base class for EntitySnapshots. An EntitySnapshot is a Entity that isn't in the world that you can create multiple Entities from.
  • Method Details

    • spawnEntity

      E spawnEntity()
      Spawn the entity in the current condition of the snapshot
      Returns:
      Spawns the entity
    • createSnapshot

      EntitySnapshot<E> createSnapshot()
      Creates a new instance of this snapshot with all values copied over as new instances
      Specified by:
      createSnapshot in interface Entity<E extends LiveEntity>
      Returns:
      A new snapshot
    • getCreatedFrom

      Optional<E> getCreatedFrom()
      If the entity is based on a LiveEntity then this will be returnable.
      Returns:
      Optional of the original entity