package com.zivilon.cinder_loe.client.render;

import lotr.client.model.LOTRModelHuman;
import lotr.client.render.entity.LOTRRenderBiped;
import lotr.client.render.entity.LOTRRandomSkins;
import lotr.common.entity.LOTRRandomSkinEntity;
import lotr.common.entity.npc.LOTREntityNPC;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelBiped;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLiving;
import net.minecraft.util.ResourceLocation;

import com.zivilon.cinder_loe.entity.npc.evil_human.Limwaith;

public class RenderLimwaith extends LOTRRenderBiped {
    public static LOTRRandomSkins skinsMale;
    
    public static LOTRRandomSkins skinsFemale;
    
    public ModelBiped outfitModel = (ModelBiped)new LOTRModelHuman(0.6F, false);
    
    public RenderLimwaith() {
        super((ModelBiped)new LOTRModelHuman(), 0.5F);
        setRenderPassModel((ModelBase)this.outfitModel);
        skinsMale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/limwaith/limwaith_male");
        skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/limwaith/limwaith_female");
    }

    public ResourceLocation getEntityTexture(Entity entity) {
        Limwaith limwaith = (Limwaith)entity;
        if (((LOTREntityNPC)limwaith).familyInfo.isMale())
            return skinsMale.getRandomSkin((LOTRRandomSkinEntity)limwaith); 
        return skinsFemale.getRandomSkin((LOTRRandomSkinEntity)limwaith);
    }

    public int shouldRenderPass(EntityLiving entity, int pass, float f) {
        Limwaith limwaith = (Limwaith)entity;
        return super.shouldRenderPass((EntityLiving)limwaith, pass, f);
    }
}