use of net.minecraft.client.render.VertexConsumer in project Client by MatHax.
the class BannerBlockEntityRendererMixin method renderCrossbar.
private void renderCrossbar(BannerBlockEntity bannerBlockEntity, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j) {
matrixStack.push();
BlockState blockState = bannerBlockEntity.getCachedState();
matrixStack.translate(0.5D, -0.1666666716337204D, 0.5D);
float h = -(blockState.get(WallBannerBlock.FACING)).asRotation();
matrixStack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(h));
matrixStack.translate(0.0D, -0.3125D, -0.4375D);
matrixStack.push();
matrixStack.scale(0.6666667F, -0.6666667F, -0.6666667F);
VertexConsumer vertexConsumer = ModelLoader.BANNER_BASE.getVertexConsumer(vertexConsumerProvider, RenderLayer::getEntitySolid);
this.crossbar.render(matrixStack, vertexConsumer, i, j);
matrixStack.pop();
matrixStack.pop();
}
use of net.minecraft.client.render.VertexConsumer in project Client by MatHax.
the class BannerBlockEntityRendererMixin method renderPillar.
private void renderPillar(BannerBlockEntity bannerBlockEntity, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i, int j) {
matrixStack.push();
BlockState blockState = bannerBlockEntity.getCachedState();
matrixStack.translate(0.5D, 0.5D, 0.5D);
float h = -blockState.get(WallBannerBlock.FACING).asRotation();
matrixStack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(h));
matrixStack.push();
matrixStack.scale(0.6666667F, -0.6666667F, -0.6666667F);
VertexConsumer vertexConsumer = ModelLoader.BANNER_BASE.getVertexConsumer(vertexConsumerProvider, RenderLayer::getEntitySolid);
this.pillar.render(matrixStack, vertexConsumer, i, j);
matrixStack.pop();
matrixStack.pop();
}
use of net.minecraft.client.render.VertexConsumer in project Paradise-Lost by devs-immortal.
the class PhygWingLayer method render.
@Override
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, PhygEntity phyg, float limbAngle, float limbDistance, float tickDelta, float customAngle, float netHeadYaw, float headPitch) {
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(RenderLayer.getEntityCutoutNoCull(TEXTURE_WINGS));
this.model.render(matrices, vertexConsumer, light, OverlayTexture.DEFAULT_UV, 1.0F, 1.0F, 1.0F, 1.0F);
}
use of net.minecraft.client.render.VertexConsumer in project wildmod by Osmiooo.
the class FireflyEntityRenderer method render.
@Override
public void render(FireflyEntity entity, float f, float g, MatrixStack matrixStack, VertexConsumerProvider vertexConsumerProvider, int i) {
matrixStack.push();
// you may need to adjust this
matrixStack.scale(1, 1, 1);
matrixStack.translate(0, 0.3, 0);
matrixStack.multiply(this.dispatcher.getRotation());
matrixStack.multiply(Vec3f.POSITIVE_Y.getDegreesQuaternion(180.0F));
MatrixStack.Entry entry = matrixStack.peek();
Matrix4f matrix4f = entry.getPositionMatrix();
Matrix3f matrix3f = entry.getNormalMatrix();
VertexConsumer vertexConsumer = vertexConsumerProvider.getBuffer(LAYER);
int j = getLight(i);
vertex(vertexConsumer, matrix4f, matrix3f, j, 0.0F, 0, 0, 1);
vertex(vertexConsumer, matrix4f, matrix3f, j, 1.0F, 0, 1, 1);
vertex(vertexConsumer, matrix4f, matrix3f, j, 1.0F, 1, 1, 0);
vertex(vertexConsumer, matrix4f, matrix3f, j, 0.0F, 1, 0, 0);
matrixStack.pop();
super.render(entity, f, g, matrixStack, vertexConsumerProvider, i);
}
use of net.minecraft.client.render.VertexConsumer in project wildmod by Osmiooo.
the class WardenEntityDotFeatureRendererAlt method render.
@Override
public void render(MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, WardenEntity entity, float limbAngle, float limbDistance, float tickDelta, float animationProgress, float headYaw, float headPitch) {
if (entity.shouldRender) {
VertexConsumer vertexConsumer = vertexConsumers.getBuffer(this.OVERLAY);
int a = calculateLight(getBlockLight(entity, entity.getBlockPos()));
float b = colors(entity.getWorld().getTime());
this.getContextModel().render(matrices, vertexConsumer, a, OverlayTexture.DEFAULT_UV, b, b, b, 1.0f);
}
}
Aggregations