valence
valence copied to clipboard
More generic layers
Describe the problem related to your feature request.
Currently Layer
are for entity and chunk, it's would be mildly impractical and casse pied if we start creating different layers for each api were we want layer to be use.
For all componant that impl a layer solution, we attache ourself to one of the two layers, but we need to use filter
in our impl which is suboptimale.
What solution would you like?
I personally would see :
In the layer entity side ->
- A
LayerMarker
componant that store a message queue (like the current one) - Some
[...]LayerData
componant-
EntityLayerData
storeFxHashMap<ChunkPos, BTreeSet<Entity>>
-
BossBarLayerData
storeBTreeSet<Entity>
- ...
-
On the other componant side ->
- A
LayerId
componant that store the id of the layer it is on
What alternative(s) have you considered?
We can use the EntityLayer
and add the data componant.
I agree with this. After I finish some of my current work I'm going to give this a try.