接口 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.
  • 方法详细资料

    • createEntity

      Creates an entity using this template. Does not spawn the copy in the world.
      参数:
      world - the world to create the entity in
      返回:
      a copy of this entity.
    • createEntity

      Creates an entity using this template and spawns it at the provided location.
      参数:
      to - the location to copy to
      返回:
      the new entity.
    • getEntityType

      @NotNull @NotNull EntityType getEntityType()
      Gets the type of entity this template holds.
      返回:
      the type
    • getAsString

      Get this EntitySnapshot as an NBT string.

      This string should not be relied upon as a serializable value.

      返回:
      the NBT string