fix: dev capes on people without regular capes not rendering
This commit is contained in:
@@ -14,6 +14,6 @@ public class SaveCapeToPlayerEntityRenderState {
|
||||
@Inject(method = "updateRenderState(Lnet/minecraft/client/network/AbstractClientPlayerEntity;Lnet/minecraft/client/render/entity/state/PlayerEntityRenderState;F)V",
|
||||
at = @At("TAIL"))
|
||||
private void addCustomCape(AbstractClientPlayerEntity abstractClientPlayerEntity, PlayerEntityRenderState playerEntityRenderState, float f, CallbackInfo ci) {
|
||||
CustomCapes.addCapeData(abstractClientPlayerEntity, playerEntityRenderState);
|
||||
CustomCapes.addCapeData(abstractClientPlayerEntity, playerEntityRenderState);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ 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.BufferAllocator
|
||||
import net.minecraft.client.util.SkinTextures
|
||||
import net.minecraft.util.Identifier
|
||||
import moe.nea.firmament.Firmament
|
||||
import moe.nea.firmament.util.MC
|
||||
@@ -109,10 +110,12 @@ object CustomCapes {
|
||||
110.seconds
|
||||
)
|
||||
),
|
||||
// FURFSKY(
|
||||
// "FurfSky",
|
||||
// TexturedCapeRenderer(Firmament.identifier("textures/cape/fsr_static.png"))
|
||||
// ),
|
||||
|
||||
FURFSKY_STATIC(
|
||||
"FurfSky",
|
||||
TexturedCapeRenderer(Firmament.identifier("textures/cape/fsr_static.png"))
|
||||
),
|
||||
|
||||
FIRMAMENT_STATIC(
|
||||
"Firmament",
|
||||
TexturedCapeRenderer(Firmament.identifier("textures/cape/firm_static.png"))
|
||||
@@ -123,11 +126,15 @@ object CustomCapes {
|
||||
}
|
||||
|
||||
val byId = AllCapes.entries.associateBy { it.cape.id }
|
||||
val byUuid = listOf(
|
||||
Devs.nea to AllCapes.FIRMAMENT_ANIMATED,
|
||||
Devs.kath to AllCapes.FIRMAMENT_STATIC,
|
||||
Devs.jani to AllCapes.FIRMAMENT_ANIMATED,
|
||||
).flatMap { (dev, cape) -> dev.uuids.map { it to cape.cape } }.toMap()
|
||||
val byUuid =
|
||||
listOf(
|
||||
listOf(
|
||||
Devs.nea to AllCapes.FIRMAMENT_ANIMATED,
|
||||
Devs.kath to AllCapes.FIRMAMENT_STATIC,
|
||||
Devs.jani to AllCapes.FIRMAMENT_ANIMATED,
|
||||
),
|
||||
Devs.FurfSky.all.map { it to AllCapes.FURFSKY_STATIC },
|
||||
).flatten().flatMap { (dev, cape) -> dev.uuids.map { it to cape.cape } }.toMap()
|
||||
|
||||
@JvmStatic
|
||||
fun render(
|
||||
@@ -157,7 +164,15 @@ object CustomCapes {
|
||||
capeStorage.cape_firmament = null
|
||||
} else {
|
||||
capeStorage.cape_firmament = cape
|
||||
playerEntityRenderState.capeVisible = true;
|
||||
playerEntityRenderState.skinTextures = SkinTextures(
|
||||
playerEntityRenderState.skinTextures.texture,
|
||||
playerEntityRenderState.skinTextures.textureUrl,
|
||||
Firmament.identifier("placeholder/fake_cape"),
|
||||
playerEntityRenderState.skinTextures.elytraTexture,
|
||||
playerEntityRenderState.skinTextures.model,
|
||||
playerEntityRenderState.skinTextures.secure,
|
||||
)
|
||||
playerEntityRenderState.capeVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,4 +13,23 @@ object Devs {
|
||||
val nea = Dev("d3cb85e2-3075-48a1-b213-a9bfb62360c1", "842204e6-6880-487b-ae5a-0595394f9948")
|
||||
val kath = Dev("add71246-c46e-455c-8345-c129ea6f146c", "b491990d-53fd-4c5f-a61e-19d58cc7eddf")
|
||||
val jani = Dev("8a9f1841-48e9-48ed-b14f-76a124e6c9df")
|
||||
|
||||
object FurfSky {
|
||||
val smolegit = Dev("02b38b96-eb19-405a-b319-d6bc00b26ab3")
|
||||
val itsCen = Dev("ada70b5a-ac37-49d2-b18c-1351672f8051")
|
||||
val webster = Dev("02166f1b-9e8d-4e48-9e18-ea7a4499492d")
|
||||
val vrachel = Dev("22e98637-ba97-4b6b-a84f-fb57a461ce43")
|
||||
val cunuduh = Dev("2a15e3b3-c46e-4718-b907-166e1ab2efdc")
|
||||
val eiiies = Dev("2ae162f2-81a7-4f91-a4b2-104e78a0a7e1")
|
||||
val june = Dev("2584a4e3-f917-4493-8ced-618391f3b44f")
|
||||
val denasu = Dev("313cbd25-8ade-4e41-845c-5cab555a30c9")
|
||||
val libyKiwii = Dev("4265c52e-bd6f-4d3c-9cf6-bdfc8fb58023")
|
||||
val madeleaan = Dev("bcb119a3-6000-4324-bda1-744f00c44b31")
|
||||
val turtleSP = Dev("f1ca1934-a582-4723-8283-89921d008657")
|
||||
val all = listOf(
|
||||
smolegit, itsCen, webster, vrachel, cunuduh, eiiies,
|
||||
june, denasu, libyKiwii, madeleaan, turtleSP,
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,4 +13,7 @@ path = ["firm_static.png"]
|
||||
SPDX-License-Identifier = "CC-BY-4.0"
|
||||
SPDX-FileCopyrightText = ["ic22487", "kathund"]
|
||||
|
||||
|
||||
[[annotations]]
|
||||
path = ["fsr_static.png"]
|
||||
SPDX-License-Identifier = "CC-BY-4.0"
|
||||
SPDX-FileCopyrightText = ["Tendan"]
|
||||
|
||||
BIN
src/main/resources/assets/firmament/textures/cape/fsr_static.png
Normal file
BIN
src/main/resources/assets/firmament/textures/cape/fsr_static.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
Reference in New Issue
Block a user