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

Automatically discover map when it's created #3

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

TechnicJelle
Copy link
Owner

@TechnicJelle TechnicJelle commented Mar 4, 2024

Inspired by @ryanalexmartin's great PR #2.

(This PR can still use some extra cleaning up, though, so it's marked as a draft until that's done)

Closes #1

@TechnicJelle TechnicJelle marked this pull request as ready for review March 24, 2024 01:45
@TechnicJelle
Copy link
Owner Author

Hey @ryanalexmartin, I think I've about finished this now.
Would you be willing to test it?
As far as I can see, it works fine in my own tests, but it's always nice to get a second opinion, before I officially release it.

@Jaymus3
Copy link

Jaymus3 commented Jun 14, 2024

Tested the artifact you linked with Spigot and the map restriction works correctly, but the automatic discovery doesn't appear to be working. If I run /bmdiscover then force an update with /bluemap update world, all of the new mapdata appears, but otherwise nothing new comes through. I will test with Paper when it gets 1.21 support and report back.

@TechnicJelle
Copy link
Owner Author

Any errors in your server console?

@Jaymus3
Copy link

Jaymus3 commented Jun 14, 2024

No, I don't have any errors in my log. Here's all of the log entries from BlueMapMCMapSync on my most recent log.

[16:10:32] [Craft Scheduler Thread - 1/WARN]: [BlueMapMCMapSync] New version available: v0.1 (current: v0.2-SNAPSHOT)
[16:10:32] [Craft Scheduler Thread - 1/WARN]: [BlueMapMCMapSync] Download it at https://github.com/TechnicJelle/BlueMapMCMapSync/releases/latest
[16:10:32] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading existing configs
[16:10:32] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading config for map: world_nether
[16:10:33] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loaded 0 squares for map: world_nether (Debug Mode: false)
[16:10:33] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading config for map: world
[16:10:33] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loaded 2 squares for map: world (Debug Mode: false)
[16:10:33] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading config for map: world_the_end
[16:10:33] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loaded 0 squares for map: world_the_end (Debug Mode: false)
[16:10:33] [Craft Scheduler Thread - 1/INFO]: [BlueMap] Loaded!

I also restarted the server to make sure all of the current chunk data was flushed to disk, as I've had oddities with BlueMap rendering chunks correctly when they're in use by players.
EDIT: Here's the log after running /bmdiscover and reloading the server again, which shows the map squares count increased:

[16:55:14] [Craft Scheduler Thread - 1/WARN]: [BlueMapMCMapSync] New version available: v0.1 (current: v0.2-SNAPSHOT)
[16:55:14] [Craft Scheduler Thread - 1/WARN]: [BlueMapMCMapSync] Download it at https://github.com/TechnicJelle/BlueMapMCMapSync/releases/latest
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading existing configs
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading config for map: world_nether
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loaded 0 squares for map: world_nether (Debug Mode: false)
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading config for map: world
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loaded 3 squares for map: world (Debug Mode: false)
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loading config for map: world_the_end
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMapMCMapSync] Loaded 0 squares for map: world_the_end (Debug Mode: false)
[16:55:14] [Craft Scheduler Thread - 1/INFO]: [BlueMap] Loaded!

@TechnicJelle
Copy link
Owner Author

TechnicJelle commented Jun 16, 2024

Thank you!
Could you enable debug mode, explore some more stuff, and send the log again?
If I recall correctly, debug mode should log some stuff when a new square is discovered.
Both when discovered by command, and automatically, when a new map is created.

@Jaymus3
Copy link

Jaymus3 commented Jul 4, 2024

Hello again. We've done some testing. There is a config option that needs to be enabled first of all, and I did not have that enabled which is why it wasn't working initially. The map finding works fine for freshly created maps and for found maps like buried treasure, but does not work if a map has been scaled with the cartographer's table. Those maps require the command /bmdiscover to actually sync. I'd also like the ability to turn this map syncing off per world so players don't need to make maps for the nether for example.

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

Successfully merging this pull request may close these issues.

Make /bmdiscover redundant
2 participants