diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-11-15 23:13:50 +0100 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-11-15 23:13:50 +0100 |
| commit | 4d8399ff4d769def62e6a8241327c4f2dac47e71 (patch) | |
| tree | 703f8651cb680d2583d82c2b1b4aee0911ccb490 /src/main/kotlin/features/misc/CustomCapes.kt | |
| parent | 215178c650d38a4a77fdef6dc8815c07bef29c25 (diff) | |
| download | Firmament-4d8399ff4d769def62e6a8241327c4f2dac47e71.tar.gz Firmament-4d8399ff4d769def62e6a8241327c4f2dac47e71.tar.bz2 Firmament-4d8399ff4d769def62e6a8241327c4f2dac47e71.zip | |
snapshot: main source set compile
Diffstat (limited to 'src/main/kotlin/features/misc/CustomCapes.kt')
| -rw-r--r-- | src/main/kotlin/features/misc/CustomCapes.kt | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/main/kotlin/features/misc/CustomCapes.kt b/src/main/kotlin/features/misc/CustomCapes.kt index 086f2fb..d66e6a3 100644 --- a/src/main/kotlin/features/misc/CustomCapes.kt +++ b/src/main/kotlin/features/misc/CustomCapes.kt @@ -8,8 +8,9 @@ import net.minecraft.client.render.RenderLayer import net.minecraft.client.render.VertexConsumer import net.minecraft.client.render.VertexConsumerProvider import net.minecraft.client.render.entity.state.PlayerEntityRenderState -import net.minecraft.client.util.SkinTextures import net.minecraft.client.util.math.MatrixStack +import net.minecraft.entity.player.SkinTextures +import net.minecraft.util.AssetInfo import net.minecraft.util.Identifier import moe.nea.firmament.Firmament import moe.nea.firmament.util.MC @@ -144,28 +145,11 @@ object CustomCapes { ).flatten().flatMap { (dev, cape) -> dev.uuids.map { it to cape.cape } }.toMap() @JvmStatic - fun render( - playerEntityRenderState: PlayerEntityRenderState, - vertexConsumer: VertexConsumer, - renderLayer: RenderLayer, - vertexConsumerProvider: VertexConsumerProvider, - matrixStack: MatrixStack, - model: (VertexConsumer) -> Unit - ) { - val capeStorage = CapeStorage.cast(playerEntityRenderState) - val firmCape = capeStorage.cape_firmament - if (firmCape != null) { - firmCape.render.replaceRender(renderLayer, vertexConsumerProvider, matrixStack, model) - } else { - model(vertexConsumer) - } - } - - @JvmStatic fun addCapeData( player: AbstractClientPlayerEntity, playerEntityRenderState: PlayerEntityRenderState ) { + if (true) return // TODO: see capefeaturerenderer mixin val cape = if (TConfig.showCapes) byUuid[player.uuid] else null val capeStorage = CapeStorage.cast(playerEntityRenderState) if (cape == null) { @@ -173,10 +157,9 @@ object CustomCapes { } else { capeStorage.cape_firmament = cape playerEntityRenderState.skinTextures = SkinTextures( - playerEntityRenderState.skinTextures.texture, - playerEntityRenderState.skinTextures.textureUrl, - Firmament.identifier("placeholder/fake_cape"), - playerEntityRenderState.skinTextures.elytraTexture, + playerEntityRenderState.skinTextures.body, + AssetInfo.TextureAssetInfo(Firmament.identifier("placeholder/fake_cape"), Firmament.identifier("placeholder/fake_cape")), + playerEntityRenderState.skinTextures.elytra, playerEntityRenderState.skinTextures.model, playerEntityRenderState.skinTextures.secure, ) |
