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

Create BlockQuery System Parameter #9

Open
TheDudeFromCI opened this issue Dec 17, 2022 · 1 comment
Open

Create BlockQuery System Parameter #9

TheDudeFromCI opened this issue Dec 17, 2022 · 1 comment
Labels
quality of life A new feature or change to make existing tasks easier

Comments

@TheDudeFromCI
Copy link
Member

Is your feature request related to a problem? Please describe.
When trying to read or write block data to a world, the developer must take several more steps than are necessary to do so. The developer must create a VoxelQuery parameter, calculate the chunk coordinate from the block coordinates, get the chunk, then finally read the block data value from that chunk. This entire process is a bit more verbose than is needed.

Describe the solution you'd like
I propose adding a second system parameter companion to voxel query (which should probably be renamed to ChunkQuery) that would abstract away chunks and allow for reading and writing block data directly to a world.

Describe alternatives you've considered
Adding more verbose code or simply writing a macro for reading and writing block data also works, but it is less flexible and requires more work. This is something that should be quick and simple.

Additional context
N/A

@TheDudeFromCI TheDudeFromCI added the quality of life A new feature or change to make existing tasks easier label Dec 17, 2022
@TheDudeFromCI
Copy link
Member Author

Another approach to this proposal might be to further extend VoxelQuery into subcommand executors, similar to how Bevy Commands can call .entity(_) to receive a mutable EntityCommands object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
quality of life A new feature or change to make existing tasks easier
Projects
None yet
Development

No branches or pull requests

1 participant