Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
use recode's text() function instead
Browse files Browse the repository at this point in the history
  • Loading branch information
RedVortexDev committed Mar 27, 2024
1 parent df604d7 commit f209d7a
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import io.github.homchom.recode.feature.AddsFeature
import io.github.homchom.recode.feature.registerFeature
import io.github.homchom.recode.id
import io.github.homchom.recode.render.RGB
import io.github.homchom.recode.ui.text.toVanilla
import io.github.homchom.recode.ui.text.style
import io.github.homchom.recode.ui.text.text
import io.github.homchom.recode.ui.text.toVanillaComponent
import net.fabricmc.fabric.api.resource.ResourceManagerHelper
import net.fabricmc.fabric.api.resource.ResourcePackActivationType
import net.kyori.adventure.text.Component
import net.kyori.adventure.text.format.TextColor

@OptIn(AddsFeature::class)
object FBuiltInResourcePacks {
Expand All @@ -26,15 +26,15 @@ object FBuiltInResourcePacks {
activationType: ResourcePackActivationType = ResourcePackActivationType.DEFAULT_ENABLED
) {

val packDescription = Component.text("[$MOD_ID] ")
.append(Component.translatable("resourcePack.recode.$id")
.color(TextColor.color(displayColor.hex))
)
val packDescription = text {
literal("[$MOD_ID] ")
translate("resourcePack.recode.$id", style().color(displayColor))
}

ResourceManagerHelper.registerBuiltinResourcePack(
id(id),
Recode,
packDescription.toVanilla(),
packDescription.toVanillaComponent(),
activationType
)
}
Expand Down

0 comments on commit f209d7a

Please sign in to comment.