Skip to content

Commit 2bb2120

Browse files
committed
attempt to fix waypoint position
1 parent c9fc5e6 commit 2bb2120

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/js/journeymap.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class Journeymap {
237237
const posX = waypoint.pos.x
238238
const posZ = waypoint.pos.z
239239

240-
const coords = reverseTranslateCoords(posX + 0.5, posZ + 0.5, reverseHellTranslate)
240+
const coords = translateCoords(posX + 0.5, posZ + 0.5, reverseHellTranslate)
241241

242242
const masked = waypoint.icon.resourceLocation.startsWith("journeymap") || waypoint.icon.color !== null
243243

src/main/js/utils.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ export function patch() {
1212

1313
export function translateCoords(x, z, hellTranslate, offset = 0) {
1414
if (hellTranslate) {
15-
x = Math.floor(x / 8)
16-
z = Math.floor(z / 8)
15+
x = x << 3
16+
z = z << 3
1717
}
1818

1919
return [(z * - 1) + offset, x + offset]

0 commit comments

Comments
 (0)