Skip to content

Commit

Permalink
attempt to fix waypoint position
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticdrew committed Jun 21, 2024
1 parent c9fc5e6 commit 2bb2120
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/js/journeymap.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class Journeymap {
const posX = waypoint.pos.x
const posZ = waypoint.pos.z

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

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

Expand Down
4 changes: 2 additions & 2 deletions src/main/js/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ export function patch() {

export function translateCoords(x, z, hellTranslate, offset = 0) {
if (hellTranslate) {
x = Math.floor(x / 8)
z = Math.floor(z / 8)
x = x << 3
z = z << 3
}

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

0 comments on commit 2bb2120

Please sign in to comment.