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

Probing authorities is difficult #38

Open
williambl opened this issue May 16, 2022 · 0 comments
Open

Probing authorities is difficult #38

williambl opened this issue May 16, 2022 · 0 comments

Comments

@williambl
Copy link

Debugging issues with authorities, especially in situations with many overlapping authorities, can be difficult. This is for multiple reasons:

No way to visualise authorities

There is no way to visualise authorities in-world. To get around this, I have written code in my projects to probe block positions within a 10-block diameter of the player and place a particle in every position found within a certain authority. This is a sub-optimal way of doing it, as it still does not allow me to visualise authorities on a large (>50block) scale.

This is a hard problem to fix, as there are many different types of protection shape, some of which are infinite. I'm thinking a method which creates a VoxelShape or a Box from a ProtectionShape may be a useful step. However, this is difficult too, as some protection shapes may not lend themselves well to being represented as a VoxelShape - as an example, in some projects I use a protection shape which is a vertically-projected polygon.

Difficult to probe authorities which do not apply to you

/protect test is rather limited - it only tests authorities which apply to the player running the command. As players running it are likely to be admins, and admins are unlikely to have most authorities apply to them, the command often simply replies "There are no authorities that apply to you at your current location!", requiring extra players and /execute as shenanigans to get around it. This could be improved by having a variant command which checks using EventSource.at on the command source's position, rather than EventSource.forEntity on the player running the command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant