mojira.dev
MC-147210

Old maps being overwritten once the map ID overflows 2^15

This bug is about the first created maps (Map item not the “world map”) being overwritten after more than 32767 maps have been created in a world (Caused by the 16bit signed integer limit which stores the ID of the map). When this happens old maps and the newer created get ID 0 and become completely empty with sometimes a small compression artefacts. This affects all minecraft version since the map item was first introduced in the 1.8.1 Beta.

 

Linked issues

Comments 2

We have had this problem.  It would be nice if the game did not create maps that were never used (e.g. when you use the cartography table to go from 1:1 to 1:16, you waste a bunch of IDs that can never be created again).  One mechanism would be to allow users to create zoomed out maps before they used them - let the cartography table make empty 1:2-1:16 maps that could be used on demand at the requested zoom level.  Alternatively support an internal map defragmenter that removes map IDs that don't exist in your world and rewrites the existing ones indexed from 0 (we have a custom script that effectively does this).

Is this still happening in 1.15.2 or 20w18a? I cannot find the 32767 restriction anymore (though I know it existed in older versions). Unless I am missing something, it appears the ids can now take up the full int range, including negative values, which would therefore allow 4,294,967,296‬ maps.

Edit: So after that many maps have been created older maps would probably be overwritten again, but it is unlikely that so many maps will ever be created.

TheMineInventer

(Unassigned)

Unconfirmed

item

Minecraft 1.13.2

Retrieved