Interface EntitySnapshot


public interface EntitySnapshot
Represents an immutable copy of an entity's state. Can be used at any time to create an instance of the stored entity.
  • Method Details

    • createEntity

      Creates an entity using this template. Does not spawn the copy in the world.
      Parameters:
      world - the world to create the entity in
      Returns:
      a copy of this entity.
    • createEntity

      Creates an entity using this template and spawns it at the provided location.
      Parameters:
      to - the location to copy to
      Returns:
      the new entity.
    • getEntityType

      @NotNull @NotNull EntityType getEntityType()
      Gets the type of entity this template holds.
      Returns:
      the type