Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More generic layers #443

Open
Tracked by #288
Bafbi opened this issue Aug 4, 2023 · 1 comment · May be fixed by #533 or #599
Open
Tracked by #288

More generic layers #443

Bafbi opened this issue Aug 4, 2023 · 1 comment · May be fixed by #533 or #599
Assignees
Labels
enhancement New feature or request

Comments

@Bafbi
Copy link
Contributor

Bafbi commented Aug 4, 2023

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 store FxHashMap<ChunkPos, BTreeSet<Entity>>
    • BossBarLayerData store BTreeSet<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.

@Bafbi Bafbi added the enhancement New feature or request label Aug 4, 2023
@rj00a
Copy link
Member

rj00a commented Aug 27, 2023

I agree with this. After I finish some of my current work I'm going to give this a try.

@rj00a rj00a self-assigned this Aug 27, 2023
@rj00a rj00a mentioned this issue Aug 27, 2023
56 tasks
@rj00a rj00a linked a pull request Sep 20, 2023 that will close this issue
@rj00a rj00a linked a pull request Feb 11, 2024 that will close this issue
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants