feat: Detect when player is within map bounds#692
feat: Detect when player is within map bounds#692zachthedev wants to merge 1 commit intoBlueMap-Minecraft:masterfrom
Conversation
- Issue: if there are multiple maps, the player shows up on the lowest priority map of the same dimension but not where the rendered part of chunks are.
- Use case: A nether map with roof transparency and then another map that is only the roof and above (to showcase redstone builds, etc).
- Clicking on a player on a different map, will take the user to the correct map for viewing what they are working on
TBlueF
left a comment
There was a problem hiding this comment.
I actually forgot to review this PR, sorry ..
Here are my thoughts:
The implementation looks good! There is just the problem that this implementation will clash with the plans to make the map-render-boundaries more versatile: #81
The plan here is to make it possible to add all kinds of shapes which can be defined in the map-config for in or excluding them, and even make it possible to extend this with addons.
To make the webapp compatible with this, i would suggest a server-side approach .. where instead of the webapp knowing the map-boundaries and having it calculate if the player is out of bounds, send the player.outOfBounds from the server and let the server calculate that boolean.
This way the server can easily be extended by more complex map-boundaries and the webapp doesn't need to mirror all that logic.
|
@TBlueF No worries! That totally makes sense. I had actually started on that approach to refactor this PR, but time got away from me. I plan to pick it back up sometime in the next week or so. |
|
BlueMap has now implemented I will close this for now due to inactivity, feel free to re-open if this is being updated :) |
Issue
If there are multiple maps, the player shows up on the lowest priority map of the same dimension but not where the rendered part of chunks are.
Use case
A nether map with roof transparency and then another map that is only the roof and above (to showcase redstone builds, etc).