Skip to content

Commit

Permalink
update: update code
Browse files Browse the repository at this point in the history
  • Loading branch information
RTAkland committed Nov 18, 2023
1 parent 11b1c82 commit ccbd846
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/main/java/cn/rtast/viewdimension/ViewDimension.kt
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,23 @@ class ViewDimension : DedicatedServerModInitializer {
private fun makeText(dimension: String): MutableText {
val header = Text.literal(" <").styled { it.withBold(true).withItalic(true).withColor(Formatting.GRAY) }
val dimensionText: Text = when (dimension) {
"overworld" -> Text.literal("主世界")
"overworld" -> Text.literal("Overworld")
.styled { it.withBold(true).withItalic(true).withColor(Formatting.GREEN) }

"the_nether" -> Text.literal("下界")
"the_nether" -> Text.literal("The Nether")
.styled { it.withBold(true).withItalic(true).withColor(Formatting.RED) }

else -> Text.literal("末地")
else -> Text.literal("The End")
.styled { it.withBold(true).withItalic(true).withColor(Formatting.DARK_PURPLE) }
}
val footer = Text.literal("> ").styled { it.withBold(true).withItalic(true).withColor(Formatting.GRAY) }
return header.append(dimensionText).append(footer)
}

enum class Dimension(val id: String) {
TheNether("the_nether"), TheEnd("the_end"), Overworld("overworld")
TheNether("the_nether"),
TheEnd("the_end"),
Overworld("overworld")
}

}

0 comments on commit ccbd846

Please sign in to comment.