use of party.lemons.biomemakeover.item.HatItem in project Biome-Makeover by Lemonszz.
the class HatFeatureRenderer method render.
@Override
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, T entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {
ItemStack headSlot = entity.getEquippedStack(EquipmentSlot.HEAD);
if (!headSlot.isEmpty() && headSlot.getItem() instanceof HatItem) {
matrices.push();
matrices.scale(1.2F, 1.2F, 1.2F);
EntityModel hatModel = MODELS.get(headSlot.getItem());
((ModelWithHead) this.getContextModel()).getHead().rotate(matrices);
VertexConsumer vertexConsumer = ItemRenderer.getArmorGlintConsumer(vertexConsumers, hatModel.getLayer(this.getTexture(entity)), true, false);
hatModel.render(matrices, vertexConsumer, light, OverlayTexture.DEFAULT_UV, 1F, 1F, 1F, 1F);
matrices.pop();
}
}
Aggregations