From c87ea083a0242cbdd2fb7f5a645dfa634772d351 Mon Sep 17 00:00:00 2001 From: James Lyne Date: Mon, 17 Jan 2022 19:21:52 +0000 Subject: [PATCH] Only center points that need centering --- src/util/dynmap.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/dynmap.ts b/src/util/dynmap.ts index de2a45b..2bf0e4d 100644 --- a/src/util/dynmap.ts +++ b/src/util/dynmap.ts @@ -308,9 +308,9 @@ export function buildMarker(id: string, data: Marker): LiveAtlasPointMarker { id, type: LiveAtlasMarkerType.POINT, location: { - x: !isNaN(data.x) ? data.x + 0.5 : 0, - y: !isNaN(data.y) ? data.y + 0.5 : 0, - z: !isNaN(data.z) ? data.z + 0.5 : 0, + x: !isNaN(data.x) ? Number.isInteger(data.x) ? data.x + 0.5 : data.x : 0, + y: !isNaN(data.y) ? Number.isInteger(data.y) ? data.y + 0.5 : data.y : 0, + z: !isNaN(data.z) ? Number.isInteger(data.z) ? data.z + 0.5 : data.z : 0, }, dimensions: (dimensions || [16, 16]) as PointTuple, icon: data.icon || "default",