You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 aBox
from aProtectionShape
may be a useful step. However, this is difficult too, as some protection shapes may not lend themselves well to being represented as aVoxelShape
- 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 usingEventSource.at
on the command source's position, rather thanEventSource.forEntity
on the player running the command.The text was updated successfully, but these errors were encountered: