feat: Add pickobulus blocker on private island
This commit is contained in:
15
src/main/kotlin/gui/config/EnumRenderer.kt
Normal file
15
src/main/kotlin/gui/config/EnumRenderer.kt
Normal file
@@ -0,0 +1,15 @@
|
||||
package moe.nea.firmament.gui.config
|
||||
|
||||
import net.minecraft.text.Text
|
||||
|
||||
interface EnumRenderer<E : Any> {
|
||||
fun getName(option: ManagedOption<E>, value: E): Text
|
||||
|
||||
companion object {
|
||||
fun <E : Enum<E>> default() = object : EnumRenderer<E> {
|
||||
override fun getName(option: ManagedOption<E>, value: E): Text {
|
||||
return Text.translatable(option.rawLabelText + ".choice." + value.name.lowercase())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user