mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-16 02:45:13 -04:00
don't prefix item model parents with item/
This fixes some issues with loading models
This commit is contained in:
parent
ad4fd8b37f
commit
92892c9de8
@ -133,7 +133,7 @@ class HotbarHungerElement(guiRenderer: GUIRenderer) : Element(guiRenderer), Poll
|
||||
return true
|
||||
}
|
||||
|
||||
private class HungerAtlas(val atlas: Atlas?) {
|
||||
private class HungerAtlas(atlas: Atlas?) {
|
||||
private val container = arrayOf(atlas["container"], atlas["container_hunger"])
|
||||
private val saturation = arrayOf(atlas["container_saturation_half"], atlas["container_saturation_full"])
|
||||
private val hunger = arrayOf(arrayOf(atlas["full"], atlas["half"]), arrayOf(atlas["full_hunger"], atlas["half_hunger"]))
|
||||
|
@ -36,7 +36,7 @@ class ItemLoader(private val loader: ModelLoader) {
|
||||
val version = loader.context.connection.version
|
||||
|
||||
fun loadItem(name: ResourceLocation): ItemModel? {
|
||||
val file = name.itemModel()
|
||||
val file = name.model()
|
||||
cache[file]?.let { return it }
|
||||
val data = assets.getOrNull(file)?.readJsonObject()
|
||||
if (data == null) {
|
||||
@ -52,7 +52,7 @@ class ItemLoader(private val loader: ModelLoader) {
|
||||
}
|
||||
|
||||
private fun loadItem(item: Item): ItemModel? {
|
||||
val file = (if (item is CustomModel) item.getModelName(version) else item.identifier) ?: return null
|
||||
val file = (if (item is CustomModel) item.getModelName(version) else item.identifier.itemModel()) ?: return null
|
||||
|
||||
return loadItem(file)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user