package net.minecraft.client.renderer.entity.layers;

import net.minecraft.world.entity.EquipmentSlot;
import net.minecraft.client.renderer.entity.RenderLayerParent;
import net.minecraft.client.model.HumanoidModel;
import net.minecraft.world.entity.LivingEntity;

public class HumanoidArmorLayer<T extends LivingEntity, M extends HumanoidModel<T>, A extends HumanoidModel<T>> extends AbstractArmorLayer<T, M, A> {
    public HumanoidArmorLayer(final RenderLayerParent<T, M> dwv, final A dlj2, final A dlj3) {
        super(dwv, dlj2, dlj3);
    }
    
    @Override
    protected void setPartVisibility(final A dlj, final EquipmentSlot akv) {
        this.hideAllArmor(dlj);
        switch (akv) {
            case HEAD: {
                dlj.head.visible = true;
                dlj.hat.visible = true;
                break;
            }
            case CHEST: {
                dlj.body.visible = true;
                dlj.rightArm.visible = true;
                dlj.leftArm.visible = true;
                break;
            }
            case LEGS: {
                dlj.body.visible = true;
                dlj.rightLeg.visible = true;
                dlj.leftLeg.visible = true;
                break;
            }
            case FEET: {
                dlj.rightLeg.visible = true;
                dlj.leftLeg.visible = true;
                break;
            }
        }
    }
    
    @Override
    protected void hideAllArmor(final A dlj) {
        dlj.setAllVisible(false);
    }
}
