init skins after setting the player

This fixes a critical loading crash
This commit is contained in:
Bixilon 2022-12-14 17:50:32 +01:00
parent d49f5e0b12
commit fdc05f6348
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 3 additions and 0 deletions

View File

@ -218,6 +218,7 @@ class PlayConnection(
language = LanguageUtil.load(profiles.connection.language ?: profiles.eros.general.language, version, assetsManager)
player = LocalPlayerEntity(account, this, privateKey)
settingsManager.initSkins()
if (!RunConfiguration.DISABLE_RENDERING) {
val rendering = Rendering(this)

View File

@ -47,7 +47,9 @@ class ClientSettingsManager(
profile::language.observe(this) { sendLanguage() }
connection.profiles.eros.general::language.observe(this) { sendLanguage() }
}
fun initSkins() {
connection.profiles.connection.skin::parts.observeSet(this, true) { connection.player.skinParts += it.adds; connection.player.skinParts -= it.removes }
}