Fixed crash when trying to render capes whilst Entity Model Features is installed

This commit is contained in:
Sollace 2023-07-01 21:43:58 +01:00
parent 471b2f01a0
commit 7f9bdcbde5
No known key found for this signature in database
GPG key ID: E52FACE7B5C773DB

View file

@ -23,7 +23,7 @@ public class CapeFeature<M extends ClientPonyModel<AbstractClientPlayerEntity>>
@Override @Override
public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) { public void render(MatrixStack stack, VertexConsumerProvider renderContext, int lightUv, AbstractClientPlayerEntity player, float limbDistance, float limbAngle, float tickDelta, float age, float headYaw, float headPitch) {
M model = getContextModel(); M model = getModelWrapper().body();
if (player.hasSkinTexture() && !player.isInvisible() if (player.hasSkinTexture() && !player.isInvisible()
&& player.isPartVisible(PlayerModelPart.CAPE) && player.getCapeTexture() != null && player.isPartVisible(PlayerModelPart.CAPE) && player.getCapeTexture() != null