EntityRestoreContext
What an entity-scope save’s restore receives: as read’s, with the
entity’s predicted traits writable, since it runs as it appears, and
what it writes with.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Overrides |
|---|---|---|---|
account |
SaveAccount |
- | - |
entities |
readonly Entity[] |
The entities this record of the player’s keeps beside the player entity and saved entities: what the player built for themselves, registered with addRecordEntity or spawned by the record’s restore. A read reaches these and no other entity of the world; the world’s own things are the world’s record’s. |
- |
entity |
PredictedEntity |
The saved entity, whose predicted traits restore may write. |
EntitySaveContext.entity |
player |
PlayerEntity |
The player entity, which the core makes as the player joins. | - |
savedAs |
string |
The name it is saved as: main unless the game names another. |
- |
target |
PredictedEntity |
The same entity, so a save a game may keep in either scope writes one field. | EntitySaveContext.target |
world |
World |
The world, to read: restore writes through its writer. |
- |
writer |
Authority | JoinStep |
What restore writes with: the writer setSavedEntity was handed, the player’s join’s step where a join hook registered the entity. It keeps the rules of what was handed in, so keep none. |
- |