jason-green-io / papyri

Minecraft map item data mapping tool using Leaflet
MIT License
62 stars 10 forks source link

Newer maps of same dimension, region and zoom level, overwrite older maps with white "unexplored" information #28

Closed MnTronslien closed 3 years ago

MnTronslien commented 3 years ago

Noticed that a friend on the server had made a new map and was exploring the same region that I had spent most of my time in. When I went and check out my house I saw that much of my region was unexplored, despite me having an explored map for it.

The issue is probably that the code just takes the newest map and ignores older ones - on the presumtion that newer maps are the most up to date, but then you run into issues like this Oldest - most explored map 15 48c0594ef953d292919a4609c79e8ded 1607390244 minecraft@overworld 960 -1088 4 Newest, barely explored map. 71 b546038459917bb45d62358b395039f2 1607439867 minecraft@overworld 960 -1088 4

I don't know how you would do it specifically, but I suggest that before sticking the tiles together, if there are several maps of the same dimensions and region, you merge them pixel by pixel by pixel, replacing pixels from the oldest map with pixels from the newest map only if the pixel on the newer map isn't transparent.

jason-green-io commented 3 years ago

This is how it should be done and is fixed in 2.0.2 .. which isn't merged with master yet.

MnTronslien commented 3 years ago

Awesome - looking forward to testing it out :)

TheSabotender commented 3 years ago

any ETA on 2.0.2? our server has many players, and we have noticed this issue several times :P

jason-green-io commented 3 years ago

You can try out the dev branch, pretty sure it has the fixes applied, I just haven't pulled them to master since I'll be doing the Windows fixes at the same time.

jason-green-io commented 3 years ago

Nevermind, I just pulled in 2.0.2 .. I'll do the Windows fixes in 2.0.3 :)