package net.minecraft.client.renderer.entity;

import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.Mob;
import com.mojang.blaze3d.vertex.PoseStack;
import net.minecraft.client.renderer.entity.layers.RenderLayer;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.client.renderer.entity.layers.HumanoidArmorLayer;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.client.model.ZombieModel;
import net.minecraft.world.entity.monster.Zombie;

public abstract class AbstractZombieRenderer<T extends Zombie, M extends ZombieModel<T>> extends HumanoidMobRenderer<T, M> {
    private static final ResourceLocation ZOMBIE_LOCATION;
    
    protected AbstractZombieRenderer(final EntityRenderDispatcher dvf, final M dne2, final M dne3, final M dne4) {
        super(dvf, dne2, 0.5f);
        this.addLayer((RenderLayer<T, M>)new HumanoidArmorLayer((RenderLayerParent<LivingEntity, HumanoidModel>)this, dne3, dne4));
    }
    
    @Override
    public ResourceLocation getTextureLocation(final Zombie axp) {
        return AbstractZombieRenderer.ZOMBIE_LOCATION;
    }
    
    @Override
    protected void setupRotations(final T axp, final PoseStack cyl, final float float3, float float4, final float float5) {
        if (axp.isUnderWaterConverting()) {
            float4 += (float)(Math.cos(axp.tickCount * 3.25) * 3.141592653589793 * 0.25);
        }
        super.setupRotations(axp, cyl, float3, float4, float5);
    }
    
    static {
        ZOMBIE_LOCATION = new ResourceLocation("textures/entity/zombie/zombie.png");
    }
}
