Search in sources :

Example 21 with VertexConsumer

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);
    }
}
Also used : VertexConsumer(net.minecraft.client.render.VertexConsumer)

Example 22 with VertexConsumer

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();
    }
}
Also used : HatItem(party.lemons.biomemakeover.item.HatItem) EntityModel(net.minecraft.client.render.entity.model.EntityModel) VertexConsumer(net.minecraft.client.render.VertexConsumer) ItemStack(net.minecraft.item.ItemStack)

Example 23 with VertexConsumer

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);
}
Also used : RenderLayer(net.minecraft.client.render.RenderLayer) VertexConsumer(net.minecraft.client.render.VertexConsumer)

Example 24 with VertexConsumer

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);
}
Also used : VertexConsumer(net.minecraft.client.render.VertexConsumer)

Example 25 with VertexConsumer

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);
}
Also used : VertexConsumer(net.minecraft.client.render.VertexConsumer)

Aggregations

VertexConsumer (net.minecraft.client.render.VertexConsumer)44 Identifier (net.minecraft.util.Identifier)11 ItemStack (net.minecraft.item.ItemStack)8 RenderLayer (net.minecraft.client.render.RenderLayer)7 BlockState (net.minecraft.block.BlockState)5 Matrix4f (net.minecraft.util.math.Matrix4f)5 MatrixStack (net.minecraft.client.util.math.MatrixStack)4 Matrix3f (net.minecraft.util.math.Matrix3f)4 CapeItem (com.jab125.thonkutil.api.CapeItem)3 Quaternion (net.minecraft.util.math.Quaternion)3 Inject (org.spongepowered.asm.mixin.injection.Inject)3 MainMenu (com.tangykiwi.kiwiclient.gui.mainmenu.MainMenu)2 Cape (com.tangykiwi.kiwiclient.modules.other.Cape)2 ModelPart (net.minecraft.client.model.ModelPart)2 AbstractClientPlayerEntity (net.minecraft.client.network.AbstractClientPlayerEntity)2 Vector3f (net.minecraft.client.util.math.Vector3f)2 PlayerEntity (net.minecraft.entity.player.PlayerEntity)2 Vec3f (net.minecraft.util.math.Vec3f)2 Pair (com.mojang.datafixers.util.Pair)1 GlowflyEntity (com.toadstoolstudios.sprout.entities.GlowflyEntity)1