mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-17 19:35:00 -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),
|
LANGUAGE(FileAssetsTypes.GAME),
|
||||||
SOUNDS(FileAssetsTypes.SOUNDS),
|
SOUNDS(FileAssetsTypes.SOUNDS),
|
||||||
TEXTURES(FileAssetsTypes.GAME),
|
TEXTURES(FileAssetsTypes.GAME),
|
||||||
|
OTHER(FileAssetsTypes.GAME),
|
||||||
;
|
;
|
||||||
|
|
||||||
companion object : ValuesEnum<IndexAssetsType> {
|
companion object : ValuesEnum<IndexAssetsType> {
|
||||||
@ -31,12 +32,14 @@ enum class IndexAssetsType(val type: String) {
|
|||||||
|
|
||||||
|
|
||||||
fun determinate(identifier: ResourceLocation): IndexAssetsType? {
|
fun determinate(identifier: ResourceLocation): IndexAssetsType? {
|
||||||
|
if (identifier.namespace != Namespaces.MINECRAFT) return null
|
||||||
|
val path = identifier.path
|
||||||
return when {
|
return when {
|
||||||
identifier.path == "sounds.json" -> SOUNDS
|
path == "sounds.json" -> SOUNDS
|
||||||
identifier.namespace != Namespaces.MINECRAFT -> null
|
path.startsWith("sounds/") -> SOUNDS
|
||||||
identifier.path.startsWith("sounds/") -> SOUNDS
|
path.startsWith("lang/") -> LANGUAGE
|
||||||
identifier.path.startsWith("lang/") -> LANGUAGE
|
path.startsWith("textures/") -> TEXTURES
|
||||||
identifier.path.startsWith("textures/") -> TEXTURES
|
path.startsWith("font/") -> OTHER
|
||||||
else -> null
|
else -> null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user