package com.zivilon.cinder_loe.client.render;

import com.zivilon.cinder_loe.entity.npc.good_human.BattleNun;
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;

public class RenderBattleNun extends LOTRRenderBiped {

    public static LOTRRandomSkins skinsFemale;

    public ModelBiped outfitModel = (ModelBiped)new LOTRModelHuman(0.6F, false);

    public RenderBattleNun() {
        super((ModelBiped)new LOTRModelHuman(), 0.5F);
        setRenderPassModel((ModelBase)this.outfitModel);
        skinsFemale = LOTRRandomSkins.loadSkinsList("cinder_loe:mob/arnorNun/arnorNun_female");
    }

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

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