config: render arm

This commit is contained in:
Bixilon 2022-12-06 12:20:21 +01:00
parent b130f23531
commit 69a38ae6ed
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
3 changed files with 24 additions and 1 deletions

View File

@ -15,6 +15,7 @@ package de.bixilon.minosoft.config.profile.profiles.rendering.overlay
import de.bixilon.minosoft.config.profile.delegate.primitive.BooleanDelegate
import de.bixilon.minosoft.config.profile.profiles.rendering.RenderingProfile
import de.bixilon.minosoft.config.profile.profiles.rendering.overlay.arm.ArmC
import de.bixilon.minosoft.config.profile.profiles.rendering.overlay.fire.FireC
import de.bixilon.minosoft.config.profile.profiles.rendering.overlay.weather.WeatherC
@ -36,4 +37,5 @@ class OverlayC(profile: RenderingProfile) {
val fire = FireC(profile)
val weather = WeatherC(profile)
val arm = ArmC(profile)
}

View File

@ -0,0 +1,21 @@
/*
* Minosoft
* Copyright (C) 2020-2022 Moritz Zwerger
*
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* This software is not affiliated with Mojang AB, the original developer of Minecraft.
*/
package de.bixilon.minosoft.config.profile.profiles.rendering.overlay.arm
import de.bixilon.minosoft.config.profile.delegate.primitive.BooleanDelegate
import de.bixilon.minosoft.config.profile.profiles.rendering.RenderingProfile
class ArmC(profile: RenderingProfile) {
val render by BooleanDelegate(profile, true)
}

View File

@ -30,7 +30,7 @@ class ArmOverlay(private val renderWindow: RenderWindow) : Overlay {
private val config = renderWindow.connection.profiles.rendering.overlay
private val shader = renderWindow.renderSystem.createShader(minosoft("arm")) { ArmOverlayShader(it) }
override val render: Boolean
get() = renderWindow.camera.view.view.renderArm
get() = renderWindow.camera.view.view.renderArm && config.arm.render
private var arm = renderWindow.connection.player.mainArm // TODO: camera player entity
private var skin: DynamicTexture? = null
private var model: PlayerModel? = null