Ayfri
01/27/2023, 4:46 AMambient/cave/cave7
ambient/cave/cave8
ambient/cave/cave9
ambient/nether/basalt_deltas/ambience
ambient/nether/basalt_deltas/basaltground1
ambient/nether/basalt_deltas/basaltground2
And I need to generate something like this for this pattern :
sealed interface Sounds : Argument.Sound {
override val namespace = "minecraft"
object Ambiant {
@Serializable(with = Cave.Companion.CaveSerializer::class)
enum class Cave : Sounds {
CAVE7,
CAVE8,
CAVE9;
override fun asString() = "$namespace:ambiant/cave/${name.lowercase()}"
companion object {
val values = values()
object CaveSerializer LowercaseSerializer<Cave>(values)
}
}
}
...
}
The deep level can varies from 1 to 3 (a/b
to a/b/c/d/e
) and I need the serialization thing, and especially the asString()
method. For now I have something kinda working but it's made mainly by hand and customized for each files I have with this pattern instead of having a main builder that I use for each ones.ephemient
01/27/2023, 5:44 AMpublic object ambient {
public enum class cave {
cave7,
cave8,
cave9,
}
public object nether {
public enum class basalt_deltas {
ambience,
basaltground1,
basaltground2,
}
}
}
and of course you can customize it moreAyfri
01/27/2023, 5:46 AMephemient
01/27/2023, 5:48 AMephemient
01/27/2023, 5:49 AMephemient
01/27/2023, 6:04 AMobject ambient {
enum class cave {
cave7, cave8, cave9;
}
object nether {
enum class basalt_deltas {
ambience, basaltground1, basaltground2;
}
}
}
ephemient
01/27/2023, 6:05 AMAyfri
01/27/2023, 6:54 AM