aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/world/FirmWaypoints.kt
diff options
context:
space:
mode:
authorLinnea Gräf <nea@nea.moe>2025-03-22 11:27:03 +0100
committerLinnea Gräf <nea@nea.moe>2025-03-22 11:40:33 +0100
commit588f8bbb8217daa05b2c3e756601a3bcf60113ed (patch)
treefe13538e34577f9bd2e6c44acd916b5819de8c3a /src/main/kotlin/features/world/FirmWaypoints.kt
parentaa327dcfd0bb09b42ca28dbfd9361ca9340351d6 (diff)
downloadFirmament-588f8bbb8217daa05b2c3e756601a3bcf60113ed.tar.gz
Firmament-588f8bbb8217daa05b2c3e756601a3bcf60113ed.tar.bz2
Firmament-588f8bbb8217daa05b2c3e756601a3bcf60113ed.zip
refactor: Split waypoint classes
Diffstat (limited to 'src/main/kotlin/features/world/FirmWaypoints.kt')
-rw-r--r--src/main/kotlin/features/world/FirmWaypoints.kt28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/kotlin/features/world/FirmWaypoints.kt b/src/main/kotlin/features/world/FirmWaypoints.kt
new file mode 100644
index 0000000..1f368f6
--- /dev/null
+++ b/src/main/kotlin/features/world/FirmWaypoints.kt
@@ -0,0 +1,28 @@
+package moe.nea.firmament.features.world
+
+import net.minecraft.util.math.BlockPos
+
+data class FirmWaypoints(
+ var label: String,
+ var id: String,
+ /**
+ * A hint to indicate where to stand while loading the waypoints.
+ */
+ var isRelativeTo: String?,
+ var waypoints: MutableList<Waypoint>,
+ var isOrdered: Boolean,
+ // TODO: val resetOnSwap: Boolean,
+) {
+ val size get() = waypoints.size
+ data class Waypoint(
+ val x: Int,
+ val y: Int,
+ val z: Int,
+ ) {
+ val blockPos get() = BlockPos(x, y, z)
+
+ companion object {
+ fun from(blockPos: BlockPos) = Waypoint(blockPos.x, blockPos.y, blockPos.z)
+ }
+ }
+}