diff options
Diffstat (limited to 'src/main/kotlin/features/world')
-rw-r--r-- | src/main/kotlin/features/world/ColeWeightCompat.kt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/kotlin/features/world/ColeWeightCompat.kt b/src/main/kotlin/features/world/ColeWeightCompat.kt index b92a91e..f7f1317 100644 --- a/src/main/kotlin/features/world/ColeWeightCompat.kt +++ b/src/main/kotlin/features/world/ColeWeightCompat.kt @@ -16,9 +16,9 @@ import moe.nea.firmament.util.tr object ColeWeightCompat { @Serializable data class ColeWeightWaypoint( - val x: Int, - val y: Int, - val z: Int, + val x: Int?, + val y: Int?, + val z: Int?, val r: Int = 0, val g: Int = 0, val b: Int = 0, @@ -31,9 +31,9 @@ object ColeWeightCompat { } fun intoFirm(waypoints: List<ColeWeightWaypoint>, relativeTo: BlockPos): FirmWaypoints { - val w = waypoints.map { - FirmWaypoints.Waypoint(it.x + relativeTo.x, it.y + relativeTo.y, it.z + relativeTo.z) - } + val w = waypoints + .filter { it.x != null && it.y != null && it.z != null } + .map { FirmWaypoints.Waypoint(it.x!! + relativeTo.x, it.y!! + relativeTo.y, it.z!! + relativeTo.z) } return FirmWaypoints( "Imported Waypoints", "imported", @@ -101,8 +101,8 @@ object ColeWeightCompat { thenLiteral("importcw") { thenExecute { importAndInform(source, null) { - Text.stringifiedTranslatable("firmament.command.waypoint.import.cw", - it) + tr("firmament.command.waypoint.import.cw.success", + "Imported $it waypoints from ColeWeight.") } } } |