mirror of
https://gitlab.bixilon.de/bixilon/minosoft.git
synced 2025-09-14 01:48:04 -04:00
block model loader: print failed model name
This commit is contained in:
parent
15d582cc1a
commit
56adb8fe74
@ -63,7 +63,14 @@ class BlockLoader(private val loader: ModelLoader) {
|
|||||||
|
|
||||||
fun load(latch: AbstractLatch?) {
|
fun load(latch: AbstractLatch?) {
|
||||||
loader.context.connection.registries.block.async {
|
loader.context.connection.registries.block.async {
|
||||||
val model = loadState(it) ?: return@async
|
val model: DirectBlockModel
|
||||||
|
try {
|
||||||
|
model = loadState(it) ?: return@async
|
||||||
|
} catch (error: Exception) {
|
||||||
|
Log.log(LogMessageType.RENDERING, LogLevels.WARN) { "Can not load block model for block $it: $error" }
|
||||||
|
Log.log(LogMessageType.RENDERING, LogLevels.VERBOSE) { error }
|
||||||
|
return@async
|
||||||
|
}
|
||||||
|
|
||||||
val prototype = model.load(loader.context.textures)
|
val prototype = model.load(loader.context.textures)
|
||||||
it.model = prototype
|
it.model = prototype
|
||||||
|
Loading…
x
Reference in New Issue
Block a user