package com.dairymoose.entity;

import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.MultiBufferSource;
import net.minecraft.client.renderer.culling.Frustum;
import net.minecraft.client.renderer.entity.EntityRenderer;
import net.minecraft.client.renderer.entity.EntityRendererProvider;
import net.minecraft.client.renderer.texture.OverlayTexture;
import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.client.model.data.EmptyModelData;

/* loaded from: outputsrg.jar:com/dairymoose/entity/DummyRenderer.class */
public class DummyRenderer extends EntityRenderer<DummyEntity> {
    public DummyRenderer(EntityRendererProvider.Context ctx) {
        super(ctx);
    }

    public boolean shouldRender(DummyEntity dummyEntity, Frustum p_225626_2_, double p_225626_3_, double p_225626_5_, double p_225626_7_) {
        if (dummyEntity.renderables.isEmpty()) {
            return false;
        }
        return true;
    }

    public void render(DummyEntity dummyEntity, float p_114486_, float partialTick, PoseStack poseStack, MultiBufferSource mbs, int combinedLight) {
        if (!dummyEntity.renderables.isEmpty()) {
            poseStack.pushPose();
            poseStack.translate(-0.5d, 0.0d, -0.5d);
            for (RenderableBlock renderable : dummyEntity.renderables) {
                poseStack.pushPose();
                dummyEntity.blockPosition();
                poseStack.translate(renderable.relativeX, renderable.relativeY, renderable.relativeZ);
                if (renderable.offset > 0.0f) {
                    poseStack.translate(0.0d, renderable.offset, 0.0d);
                }
                Minecraft.getInstance().getBlockRenderer().renderSingleBlock(renderable.state, poseStack, mbs, combinedLight, OverlayTexture.NO_OVERLAY, EmptyModelData.INSTANCE);
                poseStack.popPose();
            }
            poseStack.popPose();
        }
        super.render(dummyEntity, p_114486_, partialTick, poseStack, mbs, combinedLight);
    }

    public ResourceLocation getTextureLocation(DummyEntity var1) {
        return null;
    }
}
