aboutsummaryrefslogtreecommitdiff
path: root/src/main/kotlin/features/world
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/kotlin/features/world')
-rw-r--r--src/main/kotlin/features/world/ColeWeightCompat.kt16
-rw-r--r--src/main/kotlin/features/world/FairySouls.kt3
-rw-r--r--src/main/kotlin/features/world/TemporaryWaypoints.kt3
-rw-r--r--src/main/kotlin/features/world/Waypoints.kt2
4 files changed, 13 insertions, 11 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.")
}
}
}
diff --git a/src/main/kotlin/features/world/FairySouls.kt b/src/main/kotlin/features/world/FairySouls.kt
index 1263074..d4bf560 100644
--- a/src/main/kotlin/features/world/FairySouls.kt
+++ b/src/main/kotlin/features/world/FairySouls.kt
@@ -3,6 +3,7 @@
package moe.nea.firmament.features.world
import io.github.moulberry.repo.data.Coordinate
+import me.shedaniel.math.Color
import kotlinx.serialization.Serializable
import kotlinx.serialization.serializer
import net.minecraft.text.Text
@@ -100,7 +101,7 @@ object FairySouls : FirmamentFeature {
if (!TConfig.displaySouls) return
renderInWorld(it) {
currentMissingSouls.forEach {
- block(it.blockPos, 0x80FFFF00.toInt())
+ block(it.blockPos, Color.ofRGBA(176, 0, 255, 128).color)
}
color(1f, 0f, 1f, 1f)
currentLocationSouls.forEach {
diff --git a/src/main/kotlin/features/world/TemporaryWaypoints.kt b/src/main/kotlin/features/world/TemporaryWaypoints.kt
index b36c49d..3c8e895 100644
--- a/src/main/kotlin/features/world/TemporaryWaypoints.kt
+++ b/src/main/kotlin/features/world/TemporaryWaypoints.kt
@@ -1,5 +1,6 @@
package moe.nea.firmament.features.world
+import me.shedaniel.math.Color
import kotlin.compareTo
import kotlin.text.clear
import kotlin.time.Duration.Companion.seconds
@@ -38,7 +39,7 @@ object TemporaryWaypoints {
if (temporaryPlayerWaypointList.isEmpty()) return
RenderInWorldContext.renderInWorld(event) {
temporaryPlayerWaypointList.forEach { (_, waypoint) ->
- block(waypoint.pos, 0xFFFFFF00.toInt())
+ block(waypoint.pos, Color.ofRGBA(255, 255, 0, 128).color)
}
temporaryPlayerWaypointList.forEach { (player, waypoint) ->
val skin =
diff --git a/src/main/kotlin/features/world/Waypoints.kt b/src/main/kotlin/features/world/Waypoints.kt
index b5c2b66..b4f91b0 100644
--- a/src/main/kotlin/features/world/Waypoints.kt
+++ b/src/main/kotlin/features/world/Waypoints.kt
@@ -45,7 +45,7 @@ object Waypoints : FirmamentFeature {
RenderInWorldContext.renderInWorld(event) {
if (!w.isOrdered) {
w.waypoints.withIndex().forEach {
- block(it.value.blockPos, 0x800050A0.toInt())
+ block(it.value.blockPos, Color.ofRGBA(0, 80, 160, 128).color)
if (TConfig.showIndex) withFacingThePlayer(it.value.blockPos.toCenterPos()) {
text(Text.literal(it.index.toString()))
}