Fix crash when rendering SkyBlock id in a string
This commit is contained in:
@@ -52,25 +52,19 @@ fun firmamentCommand() = literal("firmament") {
|
|||||||
|
|
||||||
val configObj = AllConfigsGui.allConfigs.find { it.name == config }
|
val configObj = AllConfigsGui.allConfigs.find { it.name == config }
|
||||||
if (configObj == null) {
|
if (configObj == null) {
|
||||||
source.sendFeedback(Text.translatable("firmament.command.toggle.no-config-found", config))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.command.toggle.no-config-found", config))
|
||||||
return@thenExecute
|
return@thenExecute
|
||||||
}
|
}
|
||||||
val propertyObj = configObj.allOptions[property]
|
val propertyObj = configObj.allOptions[property]
|
||||||
if (propertyObj == null) {
|
if (propertyObj == null) {
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.command.toggle.no-property-found", property)
|
||||||
"firmament.command.toggle.no-property-found",
|
|
||||||
property
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
return@thenExecute
|
return@thenExecute
|
||||||
}
|
}
|
||||||
if (propertyObj.handler !is BooleanHandler) {
|
if (propertyObj.handler !is BooleanHandler) {
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.command.toggle.not-a-toggle", property)
|
||||||
"firmament.command.toggle.not-a-toggle",
|
|
||||||
property
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
return@thenExecute
|
return@thenExecute
|
||||||
}
|
}
|
||||||
@@ -78,12 +72,9 @@ fun firmamentCommand() = literal("firmament") {
|
|||||||
propertyObj.value = !propertyObj.value
|
propertyObj.value = !propertyObj.value
|
||||||
configObj.save()
|
configObj.save()
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.command.toggle.toggled",configObj.labelText,
|
||||||
"firmament.command.toggle.toggled",
|
propertyObj.labelText,
|
||||||
configObj.labelText,
|
Text.translatable("firmament.toggle.${propertyObj.value}"))
|
||||||
propertyObj.labelText,
|
|
||||||
Text.translatable("firmament.toggle.${propertyObj.value}")
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -145,48 +136,30 @@ fun firmamentCommand() = literal("firmament") {
|
|||||||
suggestsList { RepoManager.neuRepo.items.items.keys }
|
suggestsList { RepoManager.neuRepo.items.items.keys }
|
||||||
thenExecute {
|
thenExecute {
|
||||||
val itemName = SkyblockId(get(item))
|
val itemName = SkyblockId(get(item))
|
||||||
source.sendFeedback(Text.translatable("firmament.price", itemName.neuItem))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.price", itemName.neuItem))
|
||||||
val bazaarData = HypixelStaticData.bazaarData[itemName]
|
val bazaarData = HypixelStaticData.bazaarData[itemName]
|
||||||
if (bazaarData != null) {
|
if (bazaarData != null) {
|
||||||
source.sendFeedback(Text.translatable("firmament.price.bazaar"))
|
source.sendFeedback(Text.translatable("firmament.price.bazaar"))
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.price.bazaar.productid", bazaarData.productId.bazaarId)
|
||||||
"firmament.price.bazaar.productid",
|
|
||||||
bazaarData.productId.bazaarId
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.price.bazaar.buy.price", FirmFormatters.formatCurrency(bazaarData.quickStatus.buyPrice, 1))
|
||||||
"firmament.price.bazaar.buy.price",
|
|
||||||
FirmFormatters.formatCurrency(bazaarData.quickStatus.buyPrice, 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.price.bazaar.buy.order", bazaarData.quickStatus.buyOrders)
|
||||||
"firmament.price.bazaar.buy.order",
|
|
||||||
bazaarData.quickStatus.buyOrders
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.price.bazaar.sell.price", FirmFormatters.formatCurrency(bazaarData.quickStatus.sellPrice, 1))
|
||||||
"firmament.price.bazaar.sell.price",
|
|
||||||
FirmFormatters.formatCurrency(bazaarData.quickStatus.sellPrice, 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.price.bazaar.sell.order", bazaarData.quickStatus.sellOrders)
|
||||||
"firmament.price.bazaar.sell.order",
|
|
||||||
bazaarData.quickStatus.sellOrders
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
val lowestBin = HypixelStaticData.lowestBin[itemName]
|
val lowestBin = HypixelStaticData.lowestBin[itemName]
|
||||||
if (lowestBin != null) {
|
if (lowestBin != null) {
|
||||||
source.sendFeedback(
|
source.sendFeedback(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.price.lowestbin", FirmFormatters.formatCurrency(lowestBin, 1))
|
||||||
"firmament.price.lowestbin",
|
|
||||||
FirmFormatters.formatCurrency(lowestBin, 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -200,15 +173,15 @@ fun firmamentCommand() = literal("firmament") {
|
|||||||
}
|
}
|
||||||
thenLiteral("sbdata") {
|
thenLiteral("sbdata") {
|
||||||
thenExecute {
|
thenExecute {
|
||||||
source.sendFeedback(Text.translatable("firmament.sbinfo.profile", SBData.profileId))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.sbinfo.profile", SBData.profileId))
|
||||||
val locrawInfo = SBData.locraw
|
val locrawInfo = SBData.locraw
|
||||||
if (locrawInfo == null) {
|
if (locrawInfo == null) {
|
||||||
source.sendFeedback(Text.translatable("firmament.sbinfo.nolocraw"))
|
source.sendFeedback(Text.translatable("firmament.sbinfo.nolocraw"))
|
||||||
} else {
|
} else {
|
||||||
source.sendFeedback(Text.translatable("firmament.sbinfo.server", locrawInfo.server))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.sbinfo.server", locrawInfo.server))
|
||||||
source.sendFeedback(Text.translatable("firmament.sbinfo.gametype", locrawInfo.gametype))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.sbinfo.gametype", locrawInfo.gametype))
|
||||||
source.sendFeedback(Text.translatable("firmament.sbinfo.mode", locrawInfo.mode))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.sbinfo.mode", locrawInfo.mode))
|
||||||
source.sendFeedback(Text.translatable("firmament.sbinfo.map", locrawInfo.map))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.sbinfo.map", locrawInfo.map))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -217,7 +190,7 @@ fun firmamentCommand() = literal("firmament") {
|
|||||||
thenExecute {
|
thenExecute {
|
||||||
source.sendFeedback(Text.translatable("firmament.ursa.debugrequest.start"))
|
source.sendFeedback(Text.translatable("firmament.ursa.debugrequest.start"))
|
||||||
val text = UrsaManager.request(this[path].split("/")).bodyAsText()
|
val text = UrsaManager.request(this[path].split("/")).bodyAsText()
|
||||||
source.sendFeedback(Text.translatable("firmament.ursa.debugrequest.result", text))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.ursa.debugrequest.result", text))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,9 +46,9 @@ object QuickCommands : FirmamentFeature {
|
|||||||
}
|
}
|
||||||
val joinName = getNameForFloor(what.replace(" ", "").lowercase())
|
val joinName = getNameForFloor(what.replace(" ", "").lowercase())
|
||||||
if (joinName == null) {
|
if (joinName == null) {
|
||||||
source.sendFeedback(Text.translatable("firmament.quick-commands.join.unknown",what))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.quick-commands.join.unknown", what))
|
||||||
} else {
|
} else {
|
||||||
source.sendFeedback(Text.translatable("firmament.quick-commands.join.success", joinName))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.quick-commands.join.success", joinName))
|
||||||
MC.sendCommand("joininstance $joinName")
|
MC.sendCommand("joininstance $joinName")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -70,7 +70,7 @@ object QuickCommands : FirmamentFeature {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
if (l !in kuudraLevelNames.indices) {
|
if (l !in kuudraLevelNames.indices) {
|
||||||
source.sendFeedback(Text.translatable("firmament.quick-commands.join.unknown-kuudra", kuudraLevel))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.quick-commands.join.unknown-kuudra", kuudraLevel))
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return "KUUDRA_${kuudraLevelNames[l]}"
|
return "KUUDRA_${kuudraLevelNames[l]}"
|
||||||
@@ -90,7 +90,7 @@ object QuickCommands : FirmamentFeature {
|
|||||||
return "CATACOMBS_ENTRANCE"
|
return "CATACOMBS_ENTRANCE"
|
||||||
}
|
}
|
||||||
if (l !in dungeonLevelNames.indices) {
|
if (l !in dungeonLevelNames.indices) {
|
||||||
source.sendFeedback(Text.translatable("firmament.quick-commands.join.unknown-catacombs", kuudraLevel))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.quick-commands.join.unknown-catacombs", kuudraLevel))
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
return "${if (masterLevel != null) "MASTER_" else ""}CATACOMBS_FLOOR_${dungeonLevelNames[l]}"
|
return "${if (masterLevel != null) "MASTER_" else ""}CATACOMBS_FLOOR_${dungeonLevelNames[l]}"
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ object DeveloperFeatures : FirmamentFeature {
|
|||||||
MC.player?.sendMessage(Text.translatable("firmament.dev.resourcerebuild.start"))
|
MC.player?.sendMessage(Text.translatable("firmament.dev.resourcerebuild.start"))
|
||||||
val startTime = TimeMark.now()
|
val startTime = TimeMark.now()
|
||||||
process.toHandle().onExit().thenApply {
|
process.toHandle().onExit().thenApply {
|
||||||
MC.player?.sendMessage(Text.translatable("firmament.dev.resourcerebuild.done", startTime.passedTime()))
|
MC.player?.sendMessage(Text.stringifiedTranslatable("firmament.dev.resourcerebuild.done", startTime.passedTime()))
|
||||||
Unit
|
Unit
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ object PowerUserTools : FirmamentFeature {
|
|||||||
ItemTooltipEvent.subscribe {
|
ItemTooltipEvent.subscribe {
|
||||||
if (TConfig.showItemIds) {
|
if (TConfig.showItemIds) {
|
||||||
val id = it.stack.skyBlockId ?: return@subscribe
|
val id = it.stack.skyBlockId ?: return@subscribe
|
||||||
it.lines.add(Text.translatable("firmament.tooltip.skyblockid", id.neuItem))
|
it.lines.add(Text.stringifiedTranslatable("firmament.tooltip.skyblockid", id.neuItem))
|
||||||
}
|
}
|
||||||
val (item, text) = lastCopiedStack ?: return@subscribe
|
val (item, text) = lastCopiedStack ?: return@subscribe
|
||||||
if (!ItemStack.areEqual(item, it.stack)) {
|
if (!ItemStack.areEqual(item, it.stack)) {
|
||||||
@@ -83,7 +83,7 @@ object PowerUserTools : FirmamentFeature {
|
|||||||
MC.sendChat(Text.translatable("firmament.tooltip.copied.skull.fail"))
|
MC.sendChat(Text.translatable("firmament.tooltip.copied.skull.fail"))
|
||||||
} else {
|
} else {
|
||||||
ClipboardUtils.setTextContent(id.toString())
|
ClipboardUtils.setTextContent(id.toString())
|
||||||
MC.sendChat(Text.translatable("firmament.tooltip.copied.skull", id.toString()))
|
MC.sendChat(Text.stringifiedTranslatable("firmament.tooltip.copied.skull", id.toString()))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -105,7 +105,7 @@ object PowerUserTools : FirmamentFeature {
|
|||||||
return@subscribe
|
return@subscribe
|
||||||
}
|
}
|
||||||
ClipboardUtils.setTextContent(sbId.neuItem)
|
ClipboardUtils.setTextContent(sbId.neuItem)
|
||||||
lastCopiedStack = Pair(item, Text.translatable("firmament.tooltip.copied.skyblockid", sbId.neuItem))
|
lastCopiedStack = Pair(item, Text.stringifiedTranslatable("firmament.tooltip.copied.skyblockid", sbId.neuItem))
|
||||||
} else if (it.matches(TConfig.copyTexturePackId)) {
|
} else if (it.matches(TConfig.copyTexturePackId)) {
|
||||||
val model = CustomItemModelEvent.getModelIdentifier(item)
|
val model = CustomItemModelEvent.getModelIdentifier(item)
|
||||||
if (model == null) {
|
if (model == null) {
|
||||||
@@ -113,7 +113,7 @@ object PowerUserTools : FirmamentFeature {
|
|||||||
return@subscribe
|
return@subscribe
|
||||||
}
|
}
|
||||||
ClipboardUtils.setTextContent(model.toString())
|
ClipboardUtils.setTextContent(model.toString())
|
||||||
lastCopiedStack = Pair(item, Text.translatable("firmament.tooltip.copied.modelid", model.toString()))
|
lastCopiedStack = Pair(item, Text.stringifiedTranslatable("firmament.tooltip.copied.modelid", model.toString()))
|
||||||
} else if (it.matches(TConfig.copyNbtData)) {
|
} else if (it.matches(TConfig.copyNbtData)) {
|
||||||
val nbt = item.orCreateNbt.toString()
|
val nbt = item.orCreateNbt.toString()
|
||||||
ClipboardUtils.setTextContent(nbt)
|
ClipboardUtils.setTextContent(nbt)
|
||||||
|
|||||||
@@ -36,24 +36,15 @@ object PriceData : FirmamentFeature {
|
|||||||
if (bazaarData != null) {
|
if (bazaarData != null) {
|
||||||
it.lines.add(Text.literal(""))
|
it.lines.add(Text.literal(""))
|
||||||
it.lines.add(
|
it.lines.add(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.tooltip.bazaar.sell-order", FirmFormatters.formatCurrency(bazaarData.quickStatus.sellPrice, 1))
|
||||||
"firmament.tooltip.bazaar.sell-order",
|
|
||||||
FirmFormatters.formatCurrency(bazaarData.quickStatus.sellPrice, 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
it.lines.add(
|
it.lines.add(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.tooltip.bazaar.buy-order", FirmFormatters.formatCurrency(bazaarData.quickStatus.buyPrice, 1))
|
||||||
"firmament.tooltip.bazaar.buy-order",
|
|
||||||
FirmFormatters.formatCurrency(bazaarData.quickStatus.buyPrice, 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
} else if (lowestBin != null) {
|
} else if (lowestBin != null) {
|
||||||
it.lines.add(Text.literal(""))
|
it.lines.add(Text.literal(""))
|
||||||
it.lines.add(
|
it.lines.add(
|
||||||
Text.translatable(
|
Text.stringifiedTranslatable("firmament.tooltip.ah.lowestbin", FirmFormatters.formatCurrency(lowestBin, 1))
|
||||||
"firmament.tooltip.ah.lowestbin",
|
|
||||||
FirmFormatters.formatCurrency(lowestBin, 1)
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,15 +97,9 @@ object PristineProfitTracker : FirmamentFeature {
|
|||||||
val moneyPerSecond = moneyHistogram.averagePer({ it }, 1.seconds)
|
val moneyPerSecond = moneyHistogram.averagePer({ it }, 1.seconds)
|
||||||
if (collectionPerSecond == null || moneyPerSecond == null) return
|
if (collectionPerSecond == null || moneyPerSecond == null) return
|
||||||
ProfitHud.collectionCurrent = collectionPerSecond
|
ProfitHud.collectionCurrent = collectionPerSecond
|
||||||
ProfitHud.collectionText = Text.translatable(
|
ProfitHud.collectionText = Text.stringifiedTranslatable("firmament.pristine-profit.collection", formatCurrency(collectionPerSecond * SECONDS_PER_HOUR, 1)).formattedString()
|
||||||
"firmament.pristine-profit.collection",
|
|
||||||
formatCurrency(collectionPerSecond * SECONDS_PER_HOUR, 1)
|
|
||||||
).formattedString()
|
|
||||||
ProfitHud.moneyCurrent = moneyPerSecond
|
ProfitHud.moneyCurrent = moneyPerSecond
|
||||||
ProfitHud.moneyText = Text.translatable(
|
ProfitHud.moneyText = Text.stringifiedTranslatable("firmament.pristine-profit.money", formatCurrency(moneyPerSecond * SECONDS_PER_HOUR, 1)).formattedString()
|
||||||
"firmament.pristine-profit.money",
|
|
||||||
formatCurrency(moneyPerSecond * SECONDS_PER_HOUR, 1)
|
|
||||||
).formattedString()
|
|
||||||
val data = DConfig.data
|
val data = DConfig.data
|
||||||
if (data != null) {
|
if (data != null) {
|
||||||
if (data.maxCollectionPerSecond < collectionPerSecond && collectionHistogram.oldestUpdate()
|
if (data.maxCollectionPerSecond < collectionPerSecond && collectionHistogram.oldestUpdate()
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ object Waypoints : FirmamentFeature {
|
|||||||
?.skinTextures
|
?.skinTextures
|
||||||
?.texture
|
?.texture
|
||||||
withFacingThePlayer(waypoint.pos.toCenterPos()) {
|
withFacingThePlayer(waypoint.pos.toCenterPos()) {
|
||||||
waypoint(waypoint.pos, Text.translatable("firmament.waypoint.temporary", player))
|
waypoint(waypoint.pos, Text.stringifiedTranslatable("firmament.waypoint.temporary", player))
|
||||||
if (skin != null) {
|
if (skin != null) {
|
||||||
matrixStack.translate(0F, -20F, 0F)
|
matrixStack.translate(0F, -20F, 0F)
|
||||||
// Head front
|
// Head front
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ class HudMetaHandler(val config: ManagedConfig, val label: MutableText, val widt
|
|||||||
}
|
}
|
||||||
|
|
||||||
override fun emitGuiElements(opt: ManagedOption<HudMeta>, guiAppender: GuiAppender) {
|
override fun emitGuiElements(opt: ManagedOption<HudMeta>, guiAppender: GuiAppender) {
|
||||||
guiAppender.appendLabeledRow(opt.labelText, WButton(Text.translatable("firmament.hud.edit", label))
|
guiAppender.appendLabeledRow(opt.labelText, WButton(Text.stringifiedTranslatable("firmament.hud.edit", label))
|
||||||
.also {
|
.also {
|
||||||
it.setOnClick {
|
it.setOnClick {
|
||||||
MC.screen = JarvisIntegration.jarvis.getHudEditor(
|
MC.screen = JarvisIntegration.jarvis.getHudEditor(
|
||||||
|
|||||||
@@ -44,31 +44,31 @@ class ProfileViewer(
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
suspend fun onCommand(source: FabricClientCommandSource, name: String) {
|
suspend fun onCommand(source: FabricClientCommandSource, name: String) {
|
||||||
source.sendFeedback(Text.translatable("firmament.pv.lookingup", name))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.pv.lookingup", name))
|
||||||
try {
|
try {
|
||||||
val uuid = Routes.getUUIDForPlayerName(name)
|
val uuid = Routes.getUUIDForPlayerName(name)
|
||||||
if (uuid == null) {
|
if (uuid == null) {
|
||||||
source.sendError(Text.translatable("firmament.pv.noplayer", name))
|
source.sendError(Text.stringifiedTranslatable("firmament.pv.noplayer", name))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val name = Routes.getPlayerNameForUUID(uuid) ?: name
|
val name = Routes.getPlayerNameForUUID(uuid) ?: name
|
||||||
val names = mapOf(uuid to (name))
|
val names = mapOf(uuid to (name))
|
||||||
val data = Routes.getAccountData(uuid)
|
val data = Routes.getAccountData(uuid)
|
||||||
if (data == null) {
|
if (data == null) {
|
||||||
source.sendError(Text.translatable("firmament.pv.noprofile", name))
|
source.sendError(Text.stringifiedTranslatable("firmament.pv.noprofile", name))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
val accountData = mapOf(data.uuid to data)
|
val accountData = mapOf(data.uuid to data)
|
||||||
val profiles = Routes.getProfiles(uuid)
|
val profiles = Routes.getProfiles(uuid)
|
||||||
val profile = profiles?.profiles?.find { it.selected }
|
val profile = profiles?.profiles?.find { it.selected }
|
||||||
if (profile == null) {
|
if (profile == null) {
|
||||||
source.sendFeedback(Text.translatable("firmament.pv.noprofile", name))
|
source.sendFeedback(Text.stringifiedTranslatable("firmament.pv.noprofile", name))
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ScreenUtil.setScreenLater(CottonClientScreen(ProfileViewer(uuid, names, accountData, profile)))
|
ScreenUtil.setScreenLater(CottonClientScreen(ProfileViewer(uuid, names, accountData, profile)))
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Firmament.logger.error("Error loading profile data for $name", e)
|
Firmament.logger.error("Error loading profile data for $name", e)
|
||||||
source.sendError(Text.translatable("firmament.pv.badprofile", name, e.message))
|
source.sendError(Text.stringifiedTranslatable("firmament.pv.badprofile", name, e.message))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ object SkillPage : ProfilePage {
|
|||||||
) {
|
) {
|
||||||
override fun addTooltip(tooltip: TooltipBuilder) {
|
override fun addTooltip(tooltip: TooltipBuilder) {
|
||||||
tooltip.add(Text.literal("$level/$maxLevel"))
|
tooltip.add(Text.literal("$level/$maxLevel"))
|
||||||
tooltip.add(Text.translatable("firmament.pv.skills.total", FirmFormatters.formatCurrency(exp, 1)))
|
tooltip.add(Text.stringifiedTranslatable("firmament.pv.skills.total", FirmFormatters.formatCurrency(exp, 1)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ class SBForgeRecipe(override val neuRecipe: NEUForgeRecipe) : SBRecipe() {
|
|||||||
add(Widgets.createResultSlotBackground(Point(bounds.minX + 124, bounds.minY + 46)))
|
add(Widgets.createResultSlotBackground(Point(bounds.minX + 124, bounds.minY + 46)))
|
||||||
val arrow = Widgets.createArrow(Point(bounds.minX + 90, bounds.minY + 54 - 18 / 2))
|
val arrow = Widgets.createArrow(Point(bounds.minX + 90, bounds.minY + 54 - 18 / 2))
|
||||||
add(arrow)
|
add(arrow)
|
||||||
add(Widgets.createTooltip(arrow.bounds, Text.translatable("firmament.recipe.forge.time", display.neuRecipe.duration.seconds)))
|
add(Widgets.createTooltip(arrow.bounds, Text.stringifiedTranslatable("firmament.recipe.forge.time", display.neuRecipe.duration.seconds)))
|
||||||
val ingredientsCenter = Point(bounds.minX + 49 - 8, bounds.minY + 54 - 8)
|
val ingredientsCenter = Point(bounds.minX + 49 - 8, bounds.minY + 54 - 8)
|
||||||
val count = display.neuRecipe.inputs.size
|
val count = display.neuRecipe.inputs.size
|
||||||
if (count == 1) {
|
if (count == 1) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import io.github.moulberry.repo.IReloadable
|
|||||||
import io.github.moulberry.repo.NEURepository
|
import io.github.moulberry.repo.NEURepository
|
||||||
import io.github.moulberry.repo.data.NEUItem
|
import io.github.moulberry.repo.data.NEUItem
|
||||||
import java.text.NumberFormat
|
import java.text.NumberFormat
|
||||||
import java.util.UUID
|
import java.util.*
|
||||||
import java.util.concurrent.ConcurrentHashMap
|
import java.util.concurrent.ConcurrentHashMap
|
||||||
import org.apache.logging.log4j.LogManager
|
import org.apache.logging.log4j.LogManager
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
@@ -74,7 +74,14 @@ object ItemCache : IReloadable {
|
|||||||
fun brokenItemStack(neuItem: NEUItem?, idHint: SkyblockId? = null): ItemStack {
|
fun brokenItemStack(neuItem: NEUItem?, idHint: SkyblockId? = null): ItemStack {
|
||||||
return ItemStack(Items.PAINTING).apply {
|
return ItemStack(Items.PAINTING).apply {
|
||||||
setCustomName(Text.literal(neuItem?.displayName ?: idHint?.neuItem ?: "null"))
|
setCustomName(Text.literal(neuItem?.displayName ?: idHint?.neuItem ?: "null"))
|
||||||
appendLore(listOf(Text.translatable("firmament.repo.brokenitem", neuItem?.skyblockItemId ?: idHint)))
|
appendLore(
|
||||||
|
listOf(
|
||||||
|
Text.stringifiedTranslatable(
|
||||||
|
"firmament.repo.brokenitem",
|
||||||
|
(neuItem?.skyblockItemId ?: idHint)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,9 @@ import moe.nea.firmament.util.json.DashlessUUIDSerializer
|
|||||||
@Serializable
|
@Serializable
|
||||||
value class SkyblockId(val neuItem: String) {
|
value class SkyblockId(val neuItem: String) {
|
||||||
val identifier get() = Identifier("skyblockitem", neuItem.lowercase().replace(";", "__").replace(":", "___"))
|
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.
|
* A bazaar stock item id, as returned by the HyPixel bazaar api endpoint.
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ object WarpUtil {
|
|||||||
) {
|
) {
|
||||||
DConfig.data?.excludedWarps?.add(lastAttemptedWarp)
|
DConfig.data?.excludedWarps?.add(lastAttemptedWarp)
|
||||||
DConfig.markDirty()
|
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()
|
lastWarpAttempt = TimeMark.farPast()
|
||||||
}
|
}
|
||||||
if (it.unformattedString == "You may now fast travel to") {
|
if (it.unformattedString == "You may now fast travel to") {
|
||||||
|
|||||||
Reference in New Issue
Block a user