What are good approaches or patterns to construction a dynamic spawn system ?
It ought to be capable of “create” entities by their type-ID based mostly on a algorithm that are capable of change dynamic throughout runtime.
For instance… A spawner which spawns particular “summer time mobs” if the generated entity lays in a sure space… Or to have the prospect to spawn all accessible entities throughout day, however throughout evening an different modifier kicks and which solely spawns “black tremendous mobs”…
My present spawner relies on a pipeline, which appears like this…
Pipeline<SpawnerData, Listing<Entity>> spawnerAlgorithm = new PositionSpawner().pipe(new EntitySpawner());
Its a typical java pipeline sample, it really works… However its not dynamic because of the enter/ouput of every step…
What structure would you select for a spawner which is ready to prolong its prospects throughout runtime ? Any tipps and methods ?