Skip to content

Commit

Permalink
fix(anchors): offset getAnchors of PlacedBlueprint
Browse files Browse the repository at this point in the history
  • Loading branch information
andantet committed Jan 12, 2025
1 parent 6b1559b commit f48c486
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_build=8
loader_version=0.16.10

# Mod Properties
mod_version=1.14.3
mod_version=1.14.4
maven_group=net.mcbrawls
mod_id=blueprint

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ data class PlacedBlueprint(
*/
fun getAnchors(id: String): List<Anchor> {
return blueprint.anchors
.filter { it.first == id }
.map { it.second }
.filter { (testedId, _) -> testedId == id }
.map { (_, anchor) -> getAnchorOffset(anchor) }
}

/**
Expand All @@ -128,7 +128,7 @@ data class PlacedBlueprint(
*/
fun getUniqueAnchorPos(id: String): Vec3d {
val anchor = getAnchors(id).firstOrNull() ?: throw IllegalArgumentException("Anchor not found: $id")
return getAnchorOffset(anchor).position
return anchor.position
}

/**
Expand Down

0 comments on commit f48c486

Please sign in to comment.