Mojira Archive
MC-275072

Map decorations are off by one half pixel in negative area of the map

Map decorations on the negative side of the maps midpoint is of by half a pixel

In the provided picture there are picture showing an example. The banners that are placed on the positive side of the map and has their icon centered around the block its placed on. While the banners that are on the negative side are one half pixel too far right.

You can also see that the player is not centered on the diamonds on the map.

Steps to Reproduce:

  • Create a map
  • Go to the center of the map
  • Place a banner on the positive and negative side of the middle
  • Reload the world to avoid MC-129386 moving the banners another half pixel more right
  • Look at the map

 

Code:

In function:

net>minecraft>world>level>saveddata>maps>MapItemSavedData.java>MapItemSavedData>addDecoration()

Code is:

byte $$10 = (byte)((int)((double)($$8 * 2.0F) + 0.5));
byte $$11 = (byte)((int)((double)($$9 * 2.0F) + 0.5)); 

Code should be:

byte $$10 = (byte)((int)Math.floor((double)($$8 * 2.0F) + 0.5)); 
byte $$11 = (byte)((int)Math.floor((double)($$9 * 2.0F) + 0.5));

Unresolved

JustAVirus

2024-08-09, 08:24 PM

2024-12-14, 07:14 PM

2

3

Community Consensus

Low

Platform

Maps

map, map-marker

1.21.1, 1.21.2 Pre-Release 3, 1.21.4

-