-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
None
-
-
-
Yes
Reported from https://bugs.mojang.com/browse/MC-142138 :
The problem is that `MapMeta.setMapId` might not behave as expected when you provide an ID which is not assigned yet. The game then uses the next available ID.
Therefore it would be good to either
- include that in the documentation of the method
- prevent the method from accepting unassigned IDs (throw exception)
- remove the method and provide a `setMapView(MapView)` method instead, since this is the common use case
The last suggestions are more restrictive and I do not know if there are use cases which require using unassigned IDs.
However without any of this, users like the reporter of MC-142138 might repeatedly use unassigned IDs which the game won't reach very soon (e.g. negative ones) resulting in performance decrease and a possible server crash in the end.