diff --git a/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocalMultiplayer.java b/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocalMultiplayer.java
index 9118aa0d5..c1e672c65 100644
--- a/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocalMultiplayer.java
+++ b/game/client/src/main/java/net/minecraft/client/entity/player/PlayerLocalMultiplayer.java
@@ -98,41 +98,34 @@ public class PlayerLocalMultiplayer extends PlayerLocal implements Player.Player
             }
             wasSneaking = flag;
         }
-        double d = x - oldPosX;
-        double d1 = bb.minY - oldPosY1;
-        double d2 = y - oldPosY2;
-        double d3 = z - oldPosZ;
-        double d4 = yRot - oldRotationYaw;
-        double d5 = xRot - oldRotationPitch;
-        boolean flag1 = d1 != 0.0D || d2 != 0.0D || d != 0.0D || d3 != 0.0D;
-        boolean flag2 = d4 != 0.0D || d5 != 0.0D;
+        double xDiff = x - oldPosX;
+        double yDiff = bb.minY - oldPosY1;
+        double yDiff2 = y - oldPosY2;
+        double zDiff = z - oldPosZ;
+        double yRotDiff = yRot - oldRotationYaw;
+        double xRotDiff = xRot - oldRotationPitch;
+        boolean hasMoved = yDiff != 0.0D || yDiff2 != 0.0D || xDiff != 0.0D || zDiff != 0.0D;
+        boolean hasRotated = yRotDiff != 0.0D || xRotDiff != 0.0D;
         if(vehicle != null)
         {
-            if(flag2)
+            if(hasMoved)
             {
                 sendQueue.addToSendQueue(new PacketMovePlayer.Pos(xd, -999D, zd, onGround));
             } else
             {
                 sendQueue.addToSendQueue(new PacketMovePlayer.PosRot(xd, -999D, zd, yRot, xRot, onGround));
             }
-            flag1 = false;
-        } else
-        if(flag1 && flag2)
-        {
+            hasMoved = false;
+        } else if(hasMoved && hasRotated) {
             sendQueue.addToSendQueue(new PacketMovePlayer.PosRot(x, bb.minY, z, yRot, xRot, onGround));
             noSendTime = 0;
-        } else
-        if(flag1)
-        {
+        } else if(hasMoved) {
             sendQueue.addToSendQueue(new PacketMovePlayer.Pos(x, bb.minY, z, onGround));
             noSendTime = 0;
-        } else
-        if(flag2)
-        {
+        } else if(hasRotated) {
             sendQueue.addToSendQueue(new PacketMovePlayer.Rot(yRot, xRot, onGround));
             noSendTime = 0;
-        } else
-        {
+        } else {
             sendQueue.addToSendQueue(new PacketMovePlayer(onGround));
             if(wasOnGround != onGround || noSendTime > 200)
             {
@@ -143,14 +136,14 @@ public class PlayerLocalMultiplayer extends PlayerLocal implements Player.Player
             }
         }
         wasOnGround = onGround;
-        if(flag1)
+        if(hasMoved)
         {
             oldPosX = x;
             oldPosY1 = bb.minY;
             oldPosY2 = y;
             oldPosZ = z;
         }
-        if(flag2)
+        if(hasRotated)
         {
             oldRotationYaw = yRot;
             oldRotationPitch = xRot;
diff --git a/game/core/src/main/java/net/minecraft/core/item/ItemMap.java b/game/core/src/main/java/net/minecraft/core/item/ItemMap.java
index fc64a62c0..e8c77a889 100644
--- a/game/core/src/main/java/net/minecraft/core/item/ItemMap.java
+++ b/game/core/src/main/java/net/minecraft/core/item/ItemMap.java
@@ -330,6 +330,7 @@ public class ItemMap extends Item implements IComplexItem
 			for (byte scale = 0; scale <= ItemMapSavedData.MAX_SCALE; scale++) {
 				final ItemMapSavedData mapData = getOrCreateSavedData((short) selfStack.getMetadata(), scale, world);
 				if(entity instanceof Player player) {
+					mapData.addCarriedBy(player);
                     if (scale == mapScale) mapData.tickCarriedBy(player, selfStack);
 					mapData.tickForWaypoints(player, selfStack);
 				}
diff --git a/game/core/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java b/game/core/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java
index 866a571e9..704e70a9c 100644
--- a/game/core/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java
+++ b/game/core/src/main/java/net/minecraft/core/world/saveddata/maps/ItemMapSavedData.java
@@ -128,12 +128,7 @@ public class ItemMapSavedData extends SavedData
 
     public void tickCarriedBy(Player player, ItemStack stack)
     {
-        if(!carriedByPlayers.containsKey(player))
-        {
-            HoldingPlayer mapinfo = new HoldingPlayer(player);
-            carriedByPlayers.put(player, mapinfo);
-            carriedBy.add(mapinfo);
-        }
+        addCarriedBy(player);
         decorations.clear();
 
         for(int i = 0; i < carriedBy.size(); i++)
@@ -150,7 +145,7 @@ public class ItemMapSavedData extends SavedData
             byte color = 0;
             byte xCoord = (byte)(MathHelper.clamp((double)(f * 2.0F) + 0.5D, -128, 127));
             byte zCoord = (byte)(MathHelper.clamp((double)(f1 * 2.0F) + 0.5D, -128, 127));
-            byte rotation = (byte)Math.round(((player.yRot % 360) * MapDecoration.ROTATION_STEPS) / 360F);
+            byte rotation = (byte)Math.round(((mapinfo1.player.yRot % 360) * MapDecoration.ROTATION_STEPS) / 360F);
             if(dimension == 1)
             {
                 int l = tick / 10;
@@ -165,6 +160,15 @@ public class ItemMapSavedData extends SavedData
         }
     }
 
+    public void addCarriedBy(Player player) {
+        if(!carriedByPlayers.containsKey(player))
+        {
+            HoldingPlayer mapinfo = new HoldingPlayer(player);
+            carriedByPlayers.put(player, mapinfo);
+            carriedBy.add(mapinfo);
+        }
+    }
+
     public @NotNull FlagError createNewWaypoint(TileEntityFlag flag)
     {
         if(mapWaypoints.size() >= MAX_WAYPOINTS)
