diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-03-22 11:27:03 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-03-22 11:40:33 +0100 |
| commit | 588f8bbb8217daa05b2c3e756601a3bcf60113ed (patch) | |
| tree | fe13538e34577f9bd2e6c44acd916b5819de8c3a /src/main/kotlin/features/world/FirmWaypoints.kt | |
| parent | aa327dcfd0bb09b42ca28dbfd9361ca9340351d6 (diff) | |
| download | Firmament-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.kt | 28 |
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) + } + } +} |
