Fix crash when rendering SkyBlock id in a string

This commit is contained in:
Linnea Gräf
2024-02-09 12:00:50 +01:00
parent 0cb6e308ac
commit efbef71213
14 changed files with 55 additions and 87 deletions

View File

@@ -30,6 +30,9 @@ import moe.nea.firmament.util.json.DashlessUUIDSerializer
@Serializable
value class SkyblockId(val neuItem: String) {
val identifier get() = Identifier("skyblockitem", neuItem.lowercase().replace(";", "__").replace(":", "___"))
override fun toString(): String {
return neuItem
}
/**
* A bazaar stock item id, as returned by the HyPixel bazaar api endpoint.

View File

@@ -65,7 +65,7 @@ object WarpUtil {
) {
DConfig.data?.excludedWarps?.add(lastAttemptedWarp)
DConfig.markDirty()
MC.sendChat(Text.translatable("firmament.warp-util.mark-excluded", lastAttemptedWarp))
MC.sendChat(Text.stringifiedTranslatable("firmament.warp-util.mark-excluded", lastAttemptedWarp))
lastWarpAttempt = TimeMark.farPast()
}
if (it.unformattedString == "You may now fast travel to") {