User Tools

Site Tools


ientityspawnloadingservice

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ientityspawnloadingservice [2026/04/25 17:34] – created divinerientityspawnloadingservice [2026/04/25 17:35] (current) diviner
Line 2: Line 2:
 ===== IEntitySpawnLoadingService ===== ===== IEntitySpawnLoadingService =====
  
-This service's primary responsibility is to load [[EntitySpawn|EntitySpawns]] into a specified [[Chunk]]. It unwraps spawn hierarchies into a flat loading list, validates their referenced entity static data, creates entity instances, restores parent-child transform relationships, and then broadcasts entity creation. Loading is performed through a coroutine so large spawn collections can be processed over multiple frames.+This service's primary responsibility is to load [[EntitySpawn|EntitySpawns]] into a specified [[Chunk]]. Loading is performed through a coroutine so large spawn collections can be processed over multiple frames.
  
 **Broadcasts Events:** [[EntitySpawnLoadingStartedTopic]], [[EntitySpawnLoadingProgressTopic]], [[EntitySpawnLoadingCompleteTopic]] **Broadcasts Events:** [[EntitySpawnLoadingStartedTopic]], [[EntitySpawnLoadingProgressTopic]], [[EntitySpawnLoadingCompleteTopic]]
Line 8: Line 8:
 === Methods === === Methods ===
 ^Method | Task **LoadEntitySpawns**([[EntitySpawn]][] entitySpawns, [[Chunk]] chunk, CancellationToken cancellationToken) | ^Method | Task **LoadEntitySpawns**([[EntitySpawn]][] entitySpawns, [[Chunk]] chunk, CancellationToken cancellationToken) |
-^Description | Loads all valid [[EntitySpawn|EntitySpawns]] into the specified [[Chunk]]. The method first unwraps the supplied spawn collection, including nested child spawns, into a flat list while preserving hierarchy information. Spawns with missing static data IDs, unresolved static data, or missing transform data are skipped. If no valid spawns are found, nothing happens. Loading then runs through a coroutine in three stages: entity creation, transform parenting, and entity creation broadcasting. Progress is broadcast during loading according to the configured loading frequency. |+^Description | Loads all valid [[EntitySpawn|EntitySpawns]] into the specified [[Chunk]]. Loading runs through a coroutine in three stages: entity creation, transform parenting, and entity creation broadcasting. Progress is broadcast during loading according to the configured loading frequency. |
ientityspawnloadingservice.txt · Last modified: by diviner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki