load models after init of renderers

+ crash fix
This commit is contained in:
Moritz Zwerger 2023-11-18 21:33:34 +01:00
parent b27c9a509b
commit 651a12337f
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 2 additions and 2 deletions

View File

@ -77,7 +77,6 @@ object RenderLoader {
textures.initializeSkins(connection)
textures.loadDefaultTextures()
font = FontManager.create(this, initLatch)
models.load(latch)
framebuffer.init()
@ -91,6 +90,7 @@ object RenderLoader {
// Wait for init stage to complete
initLatch.dec()
initLatch.await()
models.load(latch)
renderer[GUIRenderer]?.atlas?.load() // TODO: remove this

View File

@ -46,7 +46,7 @@ class ArmRenderer(override val context: RenderContext) : Renderer, Drawable {
override val framebuffer get() = context.framebuffer.gui
val shader = context.system.createShader(minosoft("entities/player/arm")) { ArmShader(it) }
init {
override fun init(latch: AbstractLatch) {
registerModels()
}