use of net.minecraft.client.render.VertexConsumer in project Biome-Makeover by Lemonszz.
the class LightningBugOuterFeatureRenderer method render.
public void render(MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, LightningBugEntity entity, float f, float g, float h, float j, float k, float l) {
if (!entity.isInvisible()) {
this.getContextModel().copyStateTo(this.model);
this.model.animateModel(entity, f, g, h);
this.model.setAngles(entity, f, g, j, k, l);
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(RenderLayer.getEntityTranslucent(this.getTexture(entity)));
this.model.render(matrixStack, vertexConsumer, i, LivingEntityRenderer.getOverlay(entity, 0.0F), 1.0F, 1.0F, 1.0F, 1.0F);
}
}
use of net.minecraft.client.render.VertexConsumer 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();
}
}
use of net.minecraft.client.render.VertexConsumer in project Biome-Makeover by Lemonszz.
the class StoneGolemEntityRender method render.
@Override
public void render(StoneGolemEntity entity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
matrixStack.push();
boolean visible = this.isVisible(entity);
boolean isInvis = !visible && !entity.isInvisibleTo(MinecraftClient.getInstance().player);
boolean outline = MinecraftClient.getInstance().hasOutline(entity);
matrixStack.scale(-1.0F, -1.0F, 1.0F);
// ????
matrixStack.translate(0.0D, -1.5010000467300415D, 0.0D);
RenderLayer renderLayer = this.getRenderLayer(entity, visible, isInvis, outline);
if (renderLayer != null) {
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(renderLayer);
int overlay = getOverlay(entity, this.getAnimationCounter(entity, g));
getModel().renderBase(matrixStack, vertexConsumer, i, overlay, 1F, 1F, 1F, isInvis ? 0.15F : 1.0F);
}
matrixStack.pop();
super.render(entity, f, g, matrixStack, vertexConsumerProvider, i);
}
use of net.minecraft.client.render.VertexConsumer in project friends-and-foes by Faboslav.
the class IceologerIceChunkRenderer method render.
public void render(IceologerIceChunkEntity iceChunkEntity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
var summonAnimationProgress = iceChunkEntity.getSummonAnimationProgress();
matrixStack.push();
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(this.model.getLayer(TEXTURE));
matrixStack.scale(summonAnimationProgress, summonAnimationProgress, summonAnimationProgress);
this.model.render(matrixStack, vertexConsumer, i, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
matrixStack.pop();
super.render(iceChunkEntity, f, g, matrixStack, vertexConsumerProvider, i);
}
use of net.minecraft.client.render.VertexConsumer in project Terracraft by SimplyCmd.
the class BaseEntityRenderer method render.
public void render(Entity entity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
matrixStack.push();
matrixStack.scale(-1.0F, -1.0F, 1.0F);
this.model.setAngles(entity, 0.0F, 0.0F, 0.0F, 0.0F, 0.0F);
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(this.model.getLayer(TEXTURE));
this.model.render(matrixStack, vertexConsumer, i, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
matrixStack.pop();
super.render(entity, f, g, matrixStack, vertexConsumerProvider, i);
}
Aggregations