mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 03:15:35 -04:00
assets: index type: other (font)
Required for loading unifont texture (1.20)
This commit is contained in:
parent
4b773497a0
commit
f49518ad93
@ -23,6 +23,7 @@ enum class IndexAssetsType(val type: String) {
|
||||
LANGUAGE(FileAssetsTypes.GAME),
|
||||
SOUNDS(FileAssetsTypes.SOUNDS),
|
||||
TEXTURES(FileAssetsTypes.GAME),
|
||||
OTHER(FileAssetsTypes.GAME),
|
||||
;
|
||||
|
||||
companion object : ValuesEnum<IndexAssetsType> {
|
||||
@ -31,12 +32,14 @@ enum class IndexAssetsType(val type: String) {
|
||||
|
||||
|
||||
fun determinate(identifier: ResourceLocation): IndexAssetsType? {
|
||||
if (identifier.namespace != Namespaces.MINECRAFT) return null
|
||||
val path = identifier.path
|
||||
return when {
|
||||
identifier.path == "sounds.json" -> SOUNDS
|
||||
identifier.namespace != Namespaces.MINECRAFT -> null
|
||||
identifier.path.startsWith("sounds/") -> SOUNDS
|
||||
identifier.path.startsWith("lang/") -> LANGUAGE
|
||||
identifier.path.startsWith("textures/") -> TEXTURES
|
||||
path == "sounds.json" -> SOUNDS
|
||||
path.startsWith("sounds/") -> SOUNDS
|
||||
path.startsWith("lang/") -> LANGUAGE
|
||||
path.startsWith("textures/") -> TEXTURES
|
||||
path.startsWith("font/") -> OTHER
|
||||
else -> null
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user