接口 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.
-
方法概要
修饰符和类型方法说明Creates an entity using this template and spawns it at the provided location.createEntity
(@NotNull World world) Creates an entity using this template.Get this EntitySnapshot as an NBT string.Gets the type of entity this template holds.
-
方法详细资料
-
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
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
-