use of party.lemons.biomemakeover.util.extensions.HorseHat in project Biome-Makeover by Lemonszz.
the class HorseHatFeatureRenderer method render.
@Override
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, HorseEntity entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {
if (((HorseHat) entity).hasHat()) {
matrices.scale(1.05F, 1.05F, 1.05F);
CowboyHatModel<HorseEntity> hatModel = new CowboyHatModel<>();
((ModelPart) ((HorseEntityModel) this.getContextModel()).getHeadParts().iterator().next()).rotate(matrices);
matrices.translate(0F, -0.23F, 0.15);
matrices.multiply(Vector3f.POSITIVE_X.getDegreesQuaternion(-25F));
VertexConsumer vertexConsumer = ItemRenderer.getArmorGlintConsumer(vertexConsumers, hatModel.getLayer(this.getTexture(entity)), true, false);
hatModel.render(matrices, vertexConsumer, light, OverlayTexture.DEFAULT_UV, 1F, 1F, 1F, 1F);
}
}
Aggregations