package com.zivilon.cinder_loe.world.event;

import com.zivilon.cinder_loe.CinderLoE;
import com.zivilon.cinder_loe.entity.*;
import com.zivilon.cinder_loe.entity.npc.*;
import com.zivilon.cinder_loe.entity.npc.dwarf.*;
import com.zivilon.cinder_loe.entity.npc.evil_human.*;
import com.zivilon.cinder_loe.entity.npc.good_human.*;
import com.zivilon.cinder_loe.entity.npc.orc.*;
import com.zivilon.cinder_loe.entity.npc.elf.*;
import com.zivilon.cinder_loe.util.Utilities;

import net.minecraft.entity.*;
import net.minecraft.item.*;
import net.minecraft.init.Items;
import net.minecraft.world.World;

import lotr.common.world.biome.LOTRBiome;
import lotr.common.fac.LOTRFaction;
import lotr.common.LOTRMod;
import lotr.common.entity.npc.*;
import lotr.common.enchant.*;

import java.util.Arrays;
import java.util.ArrayList;
import java.util.List;

public enum WarbandFaction {
    MORDOR(LOTRFaction.MORDOR, "lotr.faction.MORDOR.name", Arrays.asList(LOTRBiome.gondor, LOTRBiome.emynMuil, LOTRBiome.dorwinion, LOTRBiome.rohan, LOTRBiome.imlothMelui, LOTRBiome.pinnathGelin, LOTRBiome.whiteMountains, LOTRBiome.whiteMountainsFoothills, LOTRBiome.lossarnach, LOTRBiome.lamedon, LOTRBiome.lamedonHills, LOTRBiome.brownLands, LOTRBiome.gondorWoodlands, LOTRBiome.anduinMouth)),
    BLACK_URUK(LOTRFaction.MORDOR, "lotr.invasion.MORDOR_blackUruk", Arrays.asList(LOTRBiome.dorwinion, LOTRBiome.dagorlad, LOTRBiome.pelennor, LOTRBiome.blackrootVale)),
    MORGUL_VALE(LOTRFaction.MORDOR, "warband.fac.MORGUL_VALE", Arrays.asList(LOTRBiome.ithilien, LOTRBiome.ithilienHills, LOTRBiome.ithilienWasteland)),
    GONDOR(LOTRFaction.GONDOR, "lotr.faction.GONDOR.name", Arrays.asList(LOTRBiome.dagorlad, LOTRBiome.udun, LOTRBiome.ithilien, LOTRBiome.mordor, LOTRBiome.gorgoroth, LOTRBiome.nurn, LOTRBiome.nurnen, LOTRBiome.mordorMountains, LOTRBiome.nurnMarshes, LOTRBiome.anduinMouth)),
    PELARGIR(LOTRFaction.GONDOR, "lotr.invasion.GONDOR_pelargir", Arrays.asList(LOTRBiome.nearHarad, LOTRBiome.harondor, LOTRBiome.umbar, LOTRBiome.umbarForest, LOTRBiome.umbarHills)),
    DOL_AMROTH(LOTRFaction.GONDOR, "lotr.invasion.GONDOR_dolAmroth", Arrays.asList(LOTRBiome.tolfalas, LOTRBiome.island)),
    ROHAN(LOTRFaction.ROHAN, "lotr.faction.ROHAN.name", Arrays.asList(LOTRBiome.rohanUrukHighlands, LOTRBiome.nanCurunir, LOTRBiome.dunland, LOTRBiome.adornland)),
    RIVENDELL(LOTRFaction.HIGH_ELF, "lotr.invasion.HIGH_ELF_rivendell", Arrays.asList(LOTRBiome.trollshaws, LOTRBiome.loneLands, LOTRBiome.loneLandsHills, LOTRBiome.eregion, LOTRBiome.angmar, LOTRBiome.angmarMountains)),
    LINDON(LOTRFaction.HIGH_ELF, "lotr.invasion.HIGH_ELF_lindon", Arrays.asList(LOTRBiome.towerHills, LOTRBiome.island)),
    BREE(LOTRFaction.BREE, "lotr.faction.BREE.name", Arrays.asList(LOTRBiome.chetwood, LOTRBiome.oldForest, LOTRBiome.midgewater, LOTRBiome.barrowDowns)),
    ARNOR(LOTRFaction.RANGER_NORTH, "lotr.faction.RANGER_NORTH.name", Arrays.asList(LOTRBiome.angmar, LOTRBiome.eriador, LOTRBiome.eriadorDowns, LOTRBiome.erynVorn, LOTRBiome.minhiriath, LOTRBiome.enedwaith, LOTRBiome.angle, LOTRBiome.mistyMountainsFoothills, LOTRBiome.loneLands, LOTRBiome.loneLandsHills, LOTRBiome.swanfleet)),
    GUNDABAD(LOTRFaction.GUNDABAD, "lotr.faction.GUNDABAD.name", Arrays.asList(LOTRBiome.swanfleet, LOTRBiome.eregion, LOTRBiome.gladdenFields, LOTRBiome.mistyMountains)),
    ANGMAR(LOTRFaction.ANGMAR, "lotr.faction.ANGMAR.name", Arrays.asList(LOTRBiome.rivendell, LOTRBiome.ettenmoors, LOTRBiome.coldfells, LOTRBiome.angle)),
    RHUDAUR(LOTRFaction.ANGMAR, "lotr.title.ANGMAR_rhudaur", Arrays.asList(LOTRBiome.ettenmoors, LOTRBiome.coldfells, LOTRBiome.angle)),
    WOOD_ELF(LOTRFaction.WOOD_ELF, "lotr.faction.WOOD_ELF.name", Arrays.asList(LOTRBiome.dolGuldur, LOTRBiome.mirkwoodMountains)),
    WOOD_ELF_SCOUT(LOTRFaction.WOOD_ELF, "warband.fac.WOOD_ELF_SCOUT", Arrays.asList(LOTRBiome.mirkwoodCorrupted, LOTRBiome.mirkwoodNorth)),
    DOL_GULDUR(LOTRFaction.DOL_GULDUR, "lotr.faction.DOL_GULDUR.name", Arrays.asList(LOTRBiome.lothlorien, LOTRBiome.lothlorienEdge, LOTRBiome.woodlandRealm, LOTRBiome.eastBight, LOTRBiome.anduinVale, LOTRBiome.anduinHills, LOTRBiome.celebrant, LOTRBiome.dale, LOTRBiome.ironHills, LOTRBiome.erebor)),
    DALE(LOTRFaction.DALE, "lotr.faction.DALE.name", Arrays.asList(LOTRBiome.wilderland)),
    DURINS_FOLK(LOTRFaction.DURINS_FOLK, "lotr.faction.DURINS_FOLK.name", Arrays.asList(LOTRBiome.mistyMountains, LOTRBiome.mistyMountainsFoothills, LOTRBiome.tundra, Utilities.reflected_taiga, LOTRBiome.greyMountains, LOTRBiome.greyMountainsFoothills)),
    BLUE_MOUNTAINS(LOTRFaction.BLUE_MOUNTAINS, "lotr.faction.BLUE_MOUNTAINS.name", Arrays.asList(LOTRBiome.mistyMountains, LOTRBiome.mistyMountainsFoothills)),
    RED_MOUNTAINS(LOTRFaction.DURINS_FOLK, "warband.fac.RED_MOUNTAINS", Arrays.asList(LOTRBiome.rhunForest, LOTRBiome.windMountains, LOTRBiome.windMountainsFoothills)),
    DUNLAND(LOTRFaction.DUNLAND, "lotr.faction.DUNLAND.name", Arrays.asList(LOTRBiome.rohan, LOTRBiome.wold, LOTRBiome.pukel, LOTRBiome.enedwaith)),
    ISENGARD(LOTRFaction.ISENGARD, "lotr.faction.ISENGARD.name", Arrays.asList(LOTRBiome.rohan, LOTRBiome.wold, LOTRBiome.rohanWoodlands)),
    ISENGARD_SNAGA(LOTRFaction.ISENGARD, "lotr.faction.ISENGARD.name", Arrays.asList(LOTRBiome.fangornWasteland)),
    FANGORN(LOTRFaction.FANGORN, "lotr.faction.FANGORN.name", Arrays.asList(LOTRBiome.fangornWasteland)),
    DORWINION(LOTRFaction.DORWINION, "lotr.faction.DORWINION.name", Arrays.asList(LOTRBiome.rhunLandSteppe, LOTRBiome.rhunLand, LOTRBiome.rhunLandHills, LOTRBiome.rhunRedForest, LOTRBiome.rhunIsland, LOTRBiome.rhunIslandForest)),
    RHUDEL(LOTRFaction.RHUDEL, "lotr.faction.RHUDEL.name", Arrays.asList(LOTRBiome.dorwinion, LOTRBiome.dorwinionHills, LOTRBiome.rhun, LOTRBiome.rhunForest, LOTRBiome.rhunRedForest, LOTRBiome.rhunIsland, LOTRBiome.rhunIslandForest)),
    RHUDEL_GOLDEN(LOTRFaction.RHUDEL, "warband.fac.RHUDEL_GOLDEN", Arrays.asList(LOTRBiome.dorwinion)),
    UMBAR(LOTRFaction.NEAR_HARAD, "lotr.invasion.NEAR_HARAD_umbar", Arrays.asList(LOTRBiome.pelargir, LOTRBiome.tolfalas, LOTRBiome.andrast, LOTRBiome.lebennin, LOTRBiome.dorEnErnil, LOTRBiome.dorEnErnilHills)),
    HARNENNOR(LOTRFaction.NEAR_HARAD, "lotr.invasion.NEAR_HARAD_harnedor", Arrays.asList(LOTRBiome.harnedor, LOTRBiome.lostladen)),
    GULFEN(LOTRFaction.NEAR_HARAD, "lotr.invasion.NEAR_HARAD_gulf", Arrays.asList(LOTRBiome.farHaradArid)),
    MORWAITH(LOTRFaction.MORWAITH, "lotr.faction.MORWAITH.name", Arrays.asList(LOTRBiome.farHaradJungle, LOTRBiome.farHaradJungleEdge, LOTRBiome.farHaradJungleMountains, LOTRBiome.farHaradSwamp)),
    LIMWAITH(LOTRFaction.MORWAITH, "warband.fac.LIMWAITH", Arrays.asList(LOTRBiome.farHaradKanuka, LOTRBiome.farHarad, LOTRBiome.farHaradForest)),
    TAURETHRIM(LOTRFaction.TAURETHRIM, "lotr.faction.TAURETHRIM.name", Arrays.asList(LOTRBiome.farHarad, LOTRBiome.farHaradForest, LOTRBiome.halfTrollForest, LOTRBiome.pertorogwaith, LOTRBiome.farHaradVolcano, LOTRBiome.farHaradArid, LOTRBiome.farHaradAridHills, LOTRBiome.farHaradBushland, LOTRBiome.farHaradBushlandHills, LOTRBiome.farHaradSwamp, LOTRBiome.farHaradCloudForest)),
    HALF_TROLL(LOTRFaction.HALF_TROLL, "lotr.faction.HALF_TROLL.name", Arrays.asList(LOTRBiome.halfTrollForest, LOTRBiome.farHaradMangrove)),
    UTUMNO(LOTRFaction.UTUMNO, "lotr.faction.UTUMNO.name", Arrays.asList(LOTRBiome.forodwaith, LOTRBiome.forodwaithMountains)),
    RENEGADE(LOTRFaction.UTUMNO, "warband.fac.RENEGADE", Arrays.asList(Utilities.reflected_river));

    public LOTRFaction faction;
    public List<LOTRBiome> valid_biomes;
    public List<Troop> troops;
    public String warband_name;

    WarbandFaction(LOTRFaction lotrfaction, String name, List<LOTRBiome> biomes) {
        this.faction = lotrfaction;
        this.warband_name = name;
        valid_biomes = biomes;
        troops = new ArrayList<Troop>();
    }

    /**
    *  Intialize troops to enums
    */
    static {
        MORDOR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityOlogHai.class, 5), new Troop(LOTREntityMordorOrc.class, 80), new Troop(LOTREntityMordorWarg.class, 30), new Troop(LOTREntityMordorOrcArcher.class, 25)));
        BLACK_URUK.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityBlackUruk.class, 70), new Troop(LOTREntityBlackUrukArcher.class, 30), new Troop(LOTREntityBlackUrukBannerBearer.class, 20)));
        MORGUL_VALE.troops = new ArrayList<>(Arrays.asList(new Troop(MorgulOrc.class, 80), new Troop(LOTREntityMinasMorgulBannerBearer.class, 20), new Troop(LOTREntityMordorOrcArcher.class, 30)));
        GONDOR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityGondorSoldier.class, 60), new Troop(LOTREntityGondorTowerGuard.class, 15), new Troop(LOTREntityGondorBannerBearer.class, 20), new Troop(LOTREntityGondorArcher.class, 30)));
        PELARGIR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityPelargirMarine.class, 100), new Troop(LOTREntityPelargirBannerBearer.class, 20)));
        DOL_AMROTH.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityDolAmrothSoldier.class, 60), new Troop(LOTREntityDolAmrothArcher.class, 30), new Troop(LOTREntityDolAmrothBannerBearer.class, 20), new Troop(LOTREntitySwanKnight.class, 15)));
        ROHAN.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityRohirrimWarrior.class, 120), new Troop(LOTREntityRohirrimArcher.class, 30)));
        RIVENDELL.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityRivendellWarrior.class, 100), new Troop(LOTREntityRivendellBannerBearer.class, 20)));
        LINDON.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityHighElfWarrior.class, 70), new Troop(Sirrandrai.class, 30), new Troop(LOTREntityHighElfBannerBearer.class, 20)));
        BREE.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityBreeGuard.class, 60), new Troop(BreeCrossbowman.class, 30), new Troop(BreeOutrider.class, 10), new Troop(LOTREntityBreeBannerBearer.class, 20)));
        ARNOR.troops = new ArrayList<>(Arrays.asList(new Troop(ArnorSoldier.class, 50), new Troop(BattleNun.class, 10), new Troop(ArnorSoldierArcher.class, 30), new Troop(ArnorBannerBearer.class, 20)));
        GUNDABAD.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityGundabadOrc.class, 90), new Troop(LOTREntityGundabadWarg.class, 40), new Troop(LOTREntityGundabadUruk.class, 20), new Troop(LOTREntityGundabadOrcArcher.class, 40)));
        ANGMAR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityAngmarOrc.class, 60), new Troop(LOTREntityAngmarWarg.class, 30), new Troop(LOTREntityTroll.class, 8), new Troop(LOTREntityMountainTroll.class, 8), new Troop(LOTREntityAngmarBannerBearer.class, 10)));
        RHUDAUR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityAngmarHillmanWarrior.class, 120), new Troop(LOTREntityAngmarHillmanAxeThrower.class, 40)));
        WOOD_ELF.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityWoodElfWarrior.class, 100), new Troop(LOTREntityWoodElfBannerBearer.class, 20)));
        WOOD_ELF_SCOUT.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityWoodElfScout.class, 120)));
        DOL_GULDUR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityDolGuldurOrc.class, 70), new Troop(LOTREntityDolGuldurOrcArcher.class, 15), new Troop(LOTREntityMirkTroll.class, 5), new Troop(LOTREntityMirkwoodSpider.class, 40)));
        DALE.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityDaleSoldier.class, 30), new Troop(LOTREntityDaleArcher.class, 50), new Troop(LOTREntityDaleLevyman.class, 60), new Troop(LOTREntityDaleBannerBearer.class, 20)));
        DURINS_FOLK.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityDwarfWarrior.class, 60), new Troop(LOTREntityDwarfAxeThrower.class, 40), new Troop(LOTREntityDwarfBannerBearer.class, 20)));
        BLUE_MOUNTAINS.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityBlueDwarfWarrior.class, 70), new Troop(LOTREntityBlueDwarfAxeThrower.class, 30), new Troop(LOTREntityBlueDwarfBannerBearer.class, 20)));
        RED_MOUNTAINS.troops = new ArrayList<>(Arrays.asList(new Troop(RedDwarfWarrior.class, 50), new Troop(RedDwarfArbalest.class, 50), new Troop(RedDwarfBannerBearer.class, 20)));
        DUNLAND.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityDunlendingWarrior.class, 60), new Troop(LOTREntityDunlendingAxeThrower.class, 30), new Troop(LOTREntityDunlendingBerserker.class, 20)));
        ISENGARD.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityUrukHai.class, 60), new Troop(LOTREntityUrukHaiCrossbower.class, 20), new Troop(LOTREntityUrukHaiBerserker.class, 20), new Troop(LOTREntityUrukHaiBannerBearer.class, 20)));
        ISENGARD_SNAGA.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityIsengardSnaga.class, 60), new Troop(LOTREntityIsengardSnagaArcher.class, 40), new Troop(LOTREntityUrukWarg.class, 30)));
        FANGORN.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityEnt.class, 30), new Troop(LOTREntityHuorn.class, 40)));
        DORWINION.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityDorwinionGuard.class, 40), new Troop(LOTREntityDorwinionCrossbower.class, 30), new Troop(LOTREntityDorwinionElfWarrior.class, 10), new Troop(LOTREntityDorwinionElfArcher.class, 10), new Troop(LOTREntityDorwinionBannerBearer.class, 20)));
        RHUDEL.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityEasterlingWarrior.class, 60), new Troop(LOTREntityEasterlingArcher.class, 30), new Troop(LOTREntityEasterlingBannerBearer.class, 20)));
        RHUDEL_GOLDEN.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityEasterlingGoldWarrior.class, 120), new Troop(LOTREntityEasterlingBannerBearer.class, 20)));
        UMBAR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityUmbarWarrior.class, 70), new Troop(LOTREntityCorsair.class, 30), new Troop(LOTREntityUmbarArcher.class, 30), new Troop(LOTREntityUmbarBannerBearer.class, 20)));
        HARNENNOR.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityHarnedorWarrior.class, 70), new Troop(LOTREntityHarnedorArcher.class, 30), new Troop(LOTREntityHarnedorBannerBearer.class, 20)));
        GULFEN.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityGulfHaradWarrior.class, 70), new Troop(LOTREntityGulfHaradArcher.class, 30), new Troop(LOTREntityGulfHaradBannerBearer.class, 20)));
        MORWAITH.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityMoredainWarrior.class, 100), new Troop(LOTREntityMoredainBannerBearer.class, 20)));
        LIMWAITH.troops = new ArrayList<>(Arrays.asList(new Troop(LimwaithWarrior.class, 60), new Troop(LimwaithBoneWarrior.class, 20), new Troop(LimwaithBlowgunner.class, 30), new Troop(LimwaithBannerBearer.class, 15)));
        TAURETHRIM.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityTauredainWarrior.class, 60), new Troop(LOTREntityTauredainBlowgunner.class, 50), new Troop(TauredainTrueBlood.class, 25)));
        HALF_TROLL.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityHalfTrollWarrior.class, 80), new Troop(LOTREntityHalfTrollBannerBearer.class, 20)));
        UTUMNO.troops = new ArrayList<>(Arrays.asList(new Troop(LOTREntityUtumnoOrc.class, 90), new Troop(LOTREntityUtumnoOrcArcher.class, 40), new Troop(LOTREntityUtumnoSnowTroll.class, 15), new Troop(LOTREntityUtumnoFireWarg.class, 15), new Troop(LOTREntityUtumnoIceWarg.class, 15), new Troop(LOTREntityUtumnoObsidianWarg.class, 15), new Troop(LOTREntityUtumnoTroll.class, 10)));
        RENEGADE.troops = new ArrayList<>(Arrays.asList(new Troop(Renegade.class, 140)));
    }

    public static Entity get_boss_entity(WarbandFaction faction, World world) {
        switch (faction) {
            case MORDOR:
                return get_mordor_boss(world);
            case BLACK_URUK:
                return get_black_uruk_boss(world);
            case MORGUL_VALE:
                return get_morgul_vale_boss(world);
            case GONDOR:
                return get_gondor_boss(world);
            case PELARGIR:
                return get_pelargir_boss(world);
            case DOL_AMROTH:
                return get_dol_amroth_boss(world);
            case ROHAN:
                return get_rohan_boss(world);
            case RIVENDELL:
                return get_rivendell_boss(world);
            case LINDON:
                return get_lindon_boss(world);
            case BREE:
                return get_bree_boss(world);
            case ARNOR:
                return get_arnor_boss(world);
            case GUNDABAD:
                return get_gundabad_boss(world);
            case ANGMAR:
                return get_angmar_boss(world);
            case RHUDAUR:
                return get_rhudaur_boss(world);
            case WOOD_ELF:
                return get_wood_elf_boss(world);
            case WOOD_ELF_SCOUT:
                return get_wood_elf_scout_boss(world);
            case DOL_GULDUR:
                return get_dol_guldur_boss(world);
            case DALE:
                return get_dale_boss(world);
            case DURINS_FOLK:
                return get_durins_folk_boss(world);
            case BLUE_MOUNTAINS:
                return get_blue_mountains_boss(world);
            case RED_MOUNTAINS:
                return get_red_mountains_boss(world);
            case DUNLAND:
                return get_dunland_boss(world);
            case ISENGARD:
                return get_isengard_boss(world);
            case ISENGARD_SNAGA:
                return get_isengard_snaga_boss(world);
            case FANGORN:
                return get_fangorn_boss(world);
            case DORWINION:
                return get_dorwinion_boss(world);
            case RHUDEL:
                return get_rhudel_boss(world);
            case RHUDEL_GOLDEN:
                return get_rhudel_golden_boss(world);
            case UMBAR:
                return get_umbar_boss(world);
            case HARNENNOR:
                return get_harnennor_boss(world);
            case GULFEN:
                return get_gulfen_boss(world);
            case MORWAITH:
                return get_morwaith_boss(world);
            case LIMWAITH:
                return get_limwaith_boss(world);
            case TAURETHRIM:
                return get_taurethrim_boss(world);
            case HALF_TROLL:
                return get_half_troll_boss(world);
            case UTUMNO:
                return get_utumno_boss(world);
            case RENEGADE:
                return get_renegade_boss(world);
        }
        return get_renegade_boss(world);
    }

    public static double default_boss_hp = 200.0D;
    public static double default_boss_speed = 0.22D;
    public static double default_boss_damage_boost = 10.0D;

    public static Entity get_mordor_boss(World world) {
        LOTREntityBlackUruk boss_entity = new LOTREntityBlackUruk(world);
        ItemStack boots = item(LOTRMod.bootsBlackUruk, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsBlackUruk, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyBlackUruk, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetBlackUruk, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(4)) {
            case 0: weapon = item(LOTRMod.scimitarBlackUruk, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearBlackUruk, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerBlackUruk, LOTREnchantment.knockback2); break;
            case 3: weapon = item(LOTRMod.battleaxeBlackUruk, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_black_uruk_boss(World world) {
        LOTREntityBlackUruk boss_entity = new LOTREntityBlackUruk(world);
        ItemStack boots = item(LOTRMod.bootsBlackUruk, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsBlackUruk, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyBlackUruk, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetBlackUruk, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(4)) {
            case 0: weapon = item(LOTRMod.scimitarBlackUruk, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearBlackUruk, LOTREnchantment.strong4, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerBlackUruk, LOTREnchantment.strong4, LOTREnchantment.knockback2); break;
            case 3: weapon = item(LOTRMod.battleaxeBlackUruk, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, 0.23D, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_morgul_vale_boss(World world) {
        MorgulOrc boss_entity = new MorgulOrc(world);
        ItemStack boots = item(LOTRMod.bootsBlackUruk, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsBlackUruk, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyBlackUruk, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetMorgul, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = item(LOTRMod.morgulBlade, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.meleeSpeed1);
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_gondor_boss(World world) {
        LOTREntityGondorTowerGuard boss_entity = new LOTREntityGondorTowerGuard(world);
        ItemStack boots = item(LOTRMod.bootsGondor, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsGondor, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyGondor, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetGondorWinged, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordGondor, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearGondor, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerGondor, LOTREnchantment.knockback2); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_pelargir_boss(World world) {
        LOTREntityPelargirMarine boss_entity = new LOTREntityPelargirMarine(world);
        ItemStack boots = item(LOTRMod.bootsPelargir, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsPelargir, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyPelargir, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetPelargir, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: weapon = item(LOTRMod.swordPelargir, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.tridentPelargir, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_dol_amroth_boss(World world) {
        LOTREntitySwanKnight boss_entity = new LOTREntitySwanKnight(world);
        ItemStack boots = item(LOTRMod.bootsDolAmroth, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsDolAmroth, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyDolAmroth, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetDolAmroth, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = item(LOTRMod.swordDolAmroth, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1);
        ItemStack mount_weapon = item(LOTRMod.lanceDolAmroth, LOTREnchantment.knockback2, LOTREnchantment.meleeReach1);
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        boss_entity.npcItemsInv.setIdleItemMounted(mount_weapon);
        boss_entity.npcItemsInv.setMeleeWeaponMounted(mount_weapon);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_rohan_boss(World world) {
        LOTREntityRohirrimWarrior boss_entity = null;
        switch (Warband.random.nextInt(2)) {
            case 0: boss_entity = new LOTREntityRohirrimWarrior(world); break;
            case 1: boss_entity = new LOTREntityRohirrimArcher(world); break;
        }
        ItemStack boots = item(LOTRMod.bootsRohanMarshal, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsRohanMarshal, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyRohanMarshal, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetRohanMarshal, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        if (boss_entity instanceof LOTREntityRohirrimArcher) {
            weapon = item(LOTRMod.rohanBow, LOTREnchantment.rangedStrong3, LOTREnchantment.rangedStrong3);
        } else {
            switch (Warband.random.nextInt(2)) {
                case 0: weapon = item(LOTRMod.swordRohan, LOTREnchantment.meleeSpeed1); break;
                case 1: weapon = item(LOTRMod.spearRohan, LOTREnchantment.meleeReach1); break;
            }
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_rivendell_boss(World world) {
        LOTREntityRivendellWarrior boss_entity = new LOTREntityRivendellWarrior(world);
        ItemStack boots = item(LOTRMod.bootsGondolin, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsGondolin, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyGondolin, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetGondolin, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack ranged_weapon = item(LOTRMod.rivendellBow, LOTREnchantment.rangedStrong3, LOTREnchantment.rangedStrong2);
        ItemStack melee_weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: melee_weapon = item(LOTRMod.swordRivendell, LOTREnchantment.meleeSpeed1); break;
            case 1: melee_weapon = item(LOTRMod.spearRivendell, LOTREnchantment.meleeReach1); break;
            case 2: melee_weapon = item(LOTRMod.polearmRivendell, LOTREnchantment.strong3); break;
        }
        set_equipment(boss_entity, melee_weapon, boots, legs, body, helmet);
        set_equipment(boss_entity, ranged_weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_lindon_boss(World world) {
        LOTREntityHighElfWarrior boss_entity = new Sirrandrai(world);
        ItemStack boots = item(LOTRMod.bootsGondolin, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsGondolin, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyGondolin, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetGondolin, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack melee_weapon = item(LOTRMod.swordGondolin, LOTREnchantment.meleeSpeed1);
        set_equipment(boss_entity, melee_weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_bree_boss(World world) {
        LOTREntityBreeGuard boss_entity = new LOTREntityBreeGuard(world);
        ItemStack boots = item(CinderLoE.bootsBree, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(CinderLoE.legsBree, LOTREnchantment.protectRanged3);
        ItemStack body = item(CinderLoE.bodyBree, LOTREnchantment.protectFire3);
        ItemStack helmet = item(CinderLoE.helmetBreeKettle, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = item(CinderLoE.swordBree, LOTREnchantment.meleeSpeed1);
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_arnor_boss(World world) {
        ArnorSoldier boss_entity = new ArnorSoldier(world);
        ItemStack boots = item(LOTRMod.bootsArnor, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsArnor, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyArnor, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetArnor, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: weapon = item(LOTRMod.swordArnor, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearArnor, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_gundabad_boss(World world) {
        LOTREntityGundabadUruk boss_entity = new LOTREntityGundabadUruk(world);
        ItemStack boots = item(LOTRMod.bootsGundabadUruk, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsGundabadUruk, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyGundabadUruk, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetGundabadUruk, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(4)) {
            case 0: weapon = item(LOTRMod.swordGundabadUruk, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearGundabadUruk, LOTREnchantment.strong4, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerGundabadUruk, LOTREnchantment.strong4, LOTREnchantment.knockback2); break;
            case 3: weapon = item(LOTRMod.battleaxeGundabadUruk, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_angmar_boss(World world) {
        LOTREntityAngmarOrc boss_entity = new LOTREntityAngmarOrc(world);
        ItemStack boots = item(LOTRMod.bootsMorgul, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsMorgul, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyMorgul, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetAngmar, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(5)) {
            case 0: weapon = item(LOTRMod.swordAngmar, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearAngmar, LOTREnchantment.strong4, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerAngmar, LOTREnchantment.strong4, LOTREnchantment.knockback2); break;
            case 3: weapon = item(LOTRMod.battleaxeAngmar, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1, LOTREnchantment.knockback1); break;
            case 4: weapon = item(LOTRMod.polearmAngmar, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_rhudaur_boss(World world) {
        LOTREntityAngmarOrc boss_entity = new LOTREntityAngmarOrc(world);
        ItemStack boots = item(CinderLoE.bootsRhudaur, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(CinderLoE.legsRhudaur, LOTREnchantment.protectRanged3);
        ItemStack body = item(CinderLoE.bodyRhudaur, LOTREnchantment.protectFire3);
        ItemStack helmet = item(CinderLoE.helmetRhudaur, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(5)) {
            case 0: weapon = item(LOTRMod.swordAngmar, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearAngmar, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerAngmar, LOTREnchantment.knockback2); break;
            case 3: weapon = item(LOTRMod.battleaxeAngmar, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
            case 4: weapon = item(LOTRMod.polearmAngmar, LOTREnchantment.strong4, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_wood_elf_boss(World world) {
        LOTREntityWoodElfWarrior boss_entity = new LOTREntityWoodElfWarrior(world);
        ItemStack boots = item(LOTRMod.bootsWoodElven, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsWoodElven, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyWoodElven, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetWoodElven, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack ranged_weapon = item(LOTRMod.mirkwoodBow, LOTREnchantment.rangedStrong3, LOTREnchantment.rangedStrong2);
        ItemStack melee_weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: melee_weapon = item(LOTRMod.swordWoodElven, LOTREnchantment.meleeSpeed1); break;
            case 1: melee_weapon = item(LOTRMod.spearWoodElven, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, melee_weapon, boots, legs, body, helmet);
        set_equipment(boss_entity, ranged_weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_wood_elf_scout_boss(World world) {
        LOTREntityWoodElfWarrior boss_entity = new LOTREntityWoodElfWarrior(world);
        ItemStack boots = item(LOTRMod.bootsWoodElvenScout, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsWoodElvenScout, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyWoodElvenScout, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetWoodElvenScout, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack ranged_weapon = item(LOTRMod.mirkwoodBow, LOTREnchantment.rangedStrong3, LOTREnchantment.rangedStrong2);
        ItemStack melee_weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: melee_weapon = item(LOTRMod.swordWoodElven, LOTREnchantment.meleeSpeed1); break;
            case 1: melee_weapon = item(LOTRMod.spearWoodElven, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, melee_weapon, boots, legs, body, helmet);
        set_equipment(boss_entity, ranged_weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, 0.25D, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_dol_guldur_boss(World world) {
        LOTREntityDolGuldurOrc boss_entity = new LOTREntityDolGuldurOrc(world);
        ItemStack boots = item(LOTRMod.bootsDolGuldur, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsDolGuldur, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyDolGuldur, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetDolGuldur, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(4)) {
            case 0: weapon = item(LOTRMod.swordDolGuldur, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearDolGuldur, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.hammerDolGuldur, LOTREnchantment.knockback2); break;
            case 3: weapon = item(LOTRMod.battleaxeDolGuldur, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_dale_boss(World world) {
        LOTREntityDaleSoldier boss_entity = new LOTREntityDaleSoldier(world);
        ItemStack boots = item(LOTRMod.bootsDale, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsDale, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyDale, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetDale, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordDale, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearDale, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.battleaxeDale, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_durins_folk_boss(World world) {
        LOTREntityDwarfWarrior boss_entity = new LOTREntityDwarfWarrior(world);
        ItemStack boots = item(LOTRMod.bootsDwarvenGold, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsDwarvenGold, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyDwarvenGold, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetDwarvenGold, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordDwarven, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearDwarven, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.battleaxeDwarven, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_blue_mountains_boss(World world) {
        LOTREntityBlueDwarfWarrior boss_entity = new LOTREntityBlueDwarfWarrior(world);
        ItemStack boots = item(LOTRMod.bootsBlueDwarven, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsBlueDwarven, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyBlueDwarven, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetBlueDwarven, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordBlueDwarven, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearBlueDwarven, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.battleaxeBlueDwarven, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_red_mountains_boss(World world) {
        RedDwarfWarrior boss_entity = new RedDwarfWarrior(world);
        ItemStack boots = item(CinderLoE.bootsRedDwarf, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(CinderLoE.legsRedDwarf, LOTREnchantment.protectRanged3);
        ItemStack body = item(CinderLoE.bodyRedDwarf, LOTREnchantment.protectFire3);
        ItemStack helmet = item(CinderLoE.helmetRedDwarf, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(CinderLoE.swordRedDwarf, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(CinderLoE.spearRedDwarf, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(CinderLoE.battleaxeRedDwarf, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_dunland_boss(World world) {
        LOTREntityDunlendingWarrior boss_entity = new LOTREntityDunlendingWarrior(world);
        ItemStack boots = item(LOTRMod.bootsDunlending, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsDunlending, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyDunlending, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetDunlending, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: weapon = item(LOTRMod.dunlendingTrident, LOTREnchantment.meleeReach1); break;
            case 1: weapon = item(LOTRMod.battleaxeIron, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_isengard_boss(World world) {
        LOTREntityUrukHai boss_entity = new LOTREntityUrukHai(world);
        ItemStack boots = item(LOTRMod.bootsUruk, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsUruk, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyUruk, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetUrukBerserker, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = item(LOTRMod.scimitarUrukBerserker, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1);
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_isengard_snaga_boss(World world) {
        LOTREntityIsengardSnaga boss_entity = new LOTREntityIsengardSnaga(world);
        ItemStack boots = item(LOTRMod.bootsUruk, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsUruk, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyUruk, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetUrukBerserker, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = item(CinderLoE.whip, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.meleeSpeed1);
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, 15.0D);
        return boss_entity;
    }
    public static Entity get_fangorn_boss(World world) {
        LOTREntityMallornEnt boss_entity = new LOTREntityMallornEnt(world);
        set_attributes(boss_entity, 300.0D, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_dorwinion_boss(World world) {
        LOTREntityDorwinionElfWarrior boss_entity = new LOTREntityDorwinionElfWarrior(world);
        ItemStack boots = item(LOTRMod.bootsDorwinionElf, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsDorwinionElf, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyDorwinionElf, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetDorwinionElf, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = item(LOTRMod.spearBladorthin, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.meleeSpeed1);
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_rhudel_boss(World world) {
        LOTREntityEasterlingGoldWarrior boss_entity = new LOTREntityEasterlingGoldWarrior(world);
        ItemStack boots = item(LOTRMod.bootsRhunGold, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsRhunGold, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyRhunGold, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetRhunGold, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordRhun, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearRhun, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.polearmRhun, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_rhudel_golden_boss(World world) {
        LOTREntityEasterlingGoldWarrior boss_entity = new LOTREntityEasterlingGoldWarrior(world);
        ItemStack boots = item(LOTRMod.bootsRhunGold, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsRhunGold, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyRhunGold, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetRhunWarlord, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordRhun, LOTREnchantment.strong4, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearRhun, LOTREnchantment.strong4, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.polearmRhun, LOTREnchantment.strong4, LOTREnchantment.meleeReach1, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_umbar_boss(World world) {
        LOTREntityUmbarWarrior boss_entity = new LOTREntityUmbarWarrior(world);
        ItemStack boots = item(LOTRMod.bootsBlackNumenorean, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsBlackNumenorean, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyBlackNumenorean, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetBlackNumenorean, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordBlackNumenorean, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearBlackNumenorean, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.maceBlackNumenorean, LOTREnchantment.knockback2); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_harnennor_boss(World world) {
        LOTREntityHarnedorWarrior boss_entity = new LOTREntityHarnedorWarrior(world);
        ItemStack boots = item(LOTRMod.bootsHarnedor, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsHarnedor, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyHarnedor, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetNearHaradWarlord, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: weapon = item(LOTRMod.swordHarad, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearHarad, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_gulfen_boss(World world) {
        LOTREntityGulfHaradWarrior boss_entity = new LOTREntityGulfHaradWarrior(world);
        ItemStack boots = item(LOTRMod.bootsGulfHarad, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsGulfHarad, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyGulfHarad, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetNearHaradWarlord, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(2)) {
            case 0: weapon = item(LOTRMod.swordGulfHarad, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearHarad, LOTREnchantment.meleeReach1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_morwaith_boss(World world) {
        LOTREntityMoredainWarrior boss_entity = new LOTREntityMoredainWarrior(world);
        ItemStack boots = item(LOTRMod.bootsMoredainLion, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsMoredainLion, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyMoredainLion, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetMoredainLion, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordMoredain, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearMoredain, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.battleaxeMoredain, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, 0.25D, 15.0D);
        return boss_entity;
    }
    public static Entity get_limwaith_boss(World world) {
        LimwaithWarrior boss_entity = new LimwaithWarrior(world);
        ItemStack boots = item(CinderLoE.bootsboneLimwaith, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(CinderLoE.legsboneLimwaith, LOTREnchantment.protectRanged3);
        ItemStack body = item(CinderLoE.bodyboneLimwaith, LOTREnchantment.protectFire3);
        ItemStack helmet = item(CinderLoE.helmetboneLimwaith, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(CinderLoE.truncheonLimwaith, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(CinderLoE.spearLimwaith, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(CinderLoE.battleaxeLimwaith, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_taurethrim_boss(World world) {
        LOTREntityTauredainWarrior boss_entity = new LOTREntityTauredainWarrior(world);
        ItemStack boots = item(LOTRMod.bootsTauredainGold, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsTauredainGold, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyTauredainGold, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetTauredainGold, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordTauredain, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearTauredain, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.battleaxeTauredain, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_half_troll_boss(World world) {
        LOTREntityHalfTrollWarrior boss_entity = new LOTREntityHalfTrollWarrior(world);
        ItemStack boots = item(LOTRMod.bootsHalfTroll, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsHalfTroll, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyHalfTroll, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetHalfTroll, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.scimitarHalfTroll, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.maceHalfTroll, LOTREnchantment.knockback2); break;
            case 2: weapon = item(LOTRMod.battleaxeHalfTroll, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_utumno_boss(World world) {
        LOTREntityUtumnoOrc boss_entity = new LOTREntityUtumnoOrc(world);
        ItemStack boots = item(LOTRMod.bootsUtumno, LOTREnchantment.protect1, LOTREnchantment.protectRanged3);
        ItemStack legs = item(LOTRMod.legsUtumno, LOTREnchantment.protectRanged3);
        ItemStack body = item(LOTRMod.bodyUtumno, LOTREnchantment.protectFire3);
        ItemStack helmet = item(LOTRMod.helmetUtumno, LOTREnchantment.protect1, LOTREnchantment.protectFire3);
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.swordUtumno, LOTREnchantment.meleeSpeed1); break;
            case 1: weapon = item(LOTRMod.spearUtumno, LOTREnchantment.meleeReach1); break;
            case 2: weapon = item(LOTRMod.battleaxeUtumno, LOTREnchantment.strong4, LOTREnchantment.knockback1); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, default_boss_hp, default_boss_speed, default_boss_damage_boost);
        return boss_entity;
    }
    public static Entity get_renegade_boss(World world) {
        RenegadeCaptain boss_entity = new RenegadeCaptain(world);
        ItemStack boots = null;
        ItemStack legs = null;
        ItemStack body = null;
        ItemStack helmet = null;
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.dunlendingClub, LOTREnchantment.meleeReach1, LOTREnchantment.meleeSpeed1, LOTREnchantment.knockback2, LOTREnchantment.knockback2); break;
            case 1: weapon = item(LOTRMod.dunlendingTrident, LOTREnchantment.meleeReach1, LOTREnchantment.meleeSpeed1); break;
            case 2: weapon = item(LOTRMod.daggerArnorPoisoned, LOTREnchantment.meleeReach1, LOTREnchantment.meleeSpeed1); break;
        }
        switch (Warband.random.nextInt(5)) {
            case 0: boots = item(Items.leather_boots); break;
            case 1: boots = item(Items.iron_boots); break;
            case 2: boots = item(LOTRMod.bootsArnor); break;
            case 3: boots = item(LOTRMod.bootsAngmar); break;
            case 4: boots = item(LOTRMod.bootsDunlending); break;
        }
        switch (Warband.random.nextInt(5)) {
            case 0: legs = item(Items.leather_leggings); break;
            case 1: legs = item(Items.iron_leggings); break;
            case 2: legs = item(LOTRMod.legsArnor); break;
            case 3: legs = item(LOTRMod.legsAngmar); break;
            case 4: legs = item(LOTRMod.legsDunlending); break;
        }
        switch (Warband.random.nextInt(5)) {
            case 0: body = item(Items.leather_chestplate); break;
            case 1: body = item(Items.iron_chestplate); break;
            case 2: body = item(LOTRMod.bodyArnor); break;
            case 3: body = item(LOTRMod.bodyAngmar); break;
            case 4: body = item(LOTRMod.bodyDunlending); break;
        }
        switch (Warband.random.nextInt(5)) {
            case 0: helmet = item(Items.leather_helmet); break;
            case 1: helmet = item(Items.iron_helmet); break;
            case 2: helmet = item(LOTRMod.helmetArnor); break;
            case 3: helmet = item(LOTRMod.helmetAngmar); break;
            case 4: helmet = item(LOTRMod.helmetDunlending); break;
        }
        set_equipment(boss_entity, weapon, boots, legs, body, helmet);
        set_attributes(boss_entity, 500.D, 0.25D, 15.0D);
        return boss_entity;
    }
    public static void equip_renegade(Renegade renegade) {
        ItemStack boots = null;
        ItemStack legs = null;
        ItemStack body = null;
        ItemStack helmet = null;
        ItemStack weapon = null;
        switch (Warband.random.nextInt(3)) {
            case 0: weapon = item(LOTRMod.dunlendingClub); break;
            case 1: weapon = item(LOTRMod.dunlendingTrident); break;
            case 2: weapon = item(LOTRMod.daggerArnorPoisoned, LOTREnchantment.strong3); break;
        }
        switch (Warband.random.nextInt(8)) {
            case 0: boots = item(Items.leather_boots); break;
            case 1: boots = item(Items.iron_boots); break;
            case 2: boots = item(LOTRMod.bootsArnor); break;
            case 3: boots = item(LOTRMod.bootsAngmar); break;
            case 4: boots = item(LOTRMod.bootsDunlending); break;
        }
        switch (Warband.random.nextInt(8)) {
            case 0: legs = item(Items.leather_leggings); break;
            case 1: legs = item(Items.iron_leggings); break;
            case 2: legs = item(LOTRMod.legsArnor); break;
            case 3: legs = item(LOTRMod.legsAngmar); break;
            case 4: legs = item(LOTRMod.legsDunlending); break;
        }
        switch (Warband.random.nextInt(8)) {
            case 0: body = item(Items.leather_chestplate); break;
            case 1: body = item(Items.iron_chestplate); break;
            case 2: body = item(LOTRMod.bodyArnor); break;
            case 3: body = item(LOTRMod.bodyAngmar); break;
            case 4: body = item(LOTRMod.bodyDunlending); break;
        }
        switch (Warband.random.nextInt(8)) {
            case 0: helmet = item(Items.leather_helmet); break;
            case 1: helmet = item(Items.iron_helmet); break;
            case 2: helmet = item(LOTRMod.helmetArnor); break;
            case 3: helmet = item(LOTRMod.helmetAngmar); break;
            case 4: helmet = item(LOTRMod.helmetDunlending); break;
        }
        set_equipment(renegade, weapon, boots, legs, body, helmet);
    }

    /**
    * Helper methods for boss creation
    */
    public static void set_attributes(EntityLivingBase entity, double health, double speed, double damage_boost) {
        entity.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(50.0D);
        entity.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(health);
        entity.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(speed);
        entity.getEntityAttribute(LOTREntityNPC.npcAttackDamageExtra).setBaseValue(damage_boost);
    }
    public static ItemStack item(Item item, LOTREnchantment... enchants) {
        ItemStack stack = new ItemStack(item);
        LOTREnchantmentHelper.setEnchantList(stack, Arrays.asList(enchants));
        return stack;
    }
    public static void set_equipment(EntityLivingBase entity, ItemStack weapon, ItemStack boots, ItemStack legs, ItemStack body, ItemStack helmet) {
        if (weapon != null)
            entity.setCurrentItemOrArmor(0, weapon);
        if (boots != null)
            entity.setCurrentItemOrArmor(1, boots);
        if (legs != null)
            entity.setCurrentItemOrArmor(2, legs);
        if (body != null)
            entity.setCurrentItemOrArmor(3, body);
        if (helmet != null)
            entity.setCurrentItemOrArmor(4, helmet);

        if (entity instanceof LOTREntityNPC) {
            LOTREntityNPC npc = (LOTREntityNPC) entity;
            if (weapon != null)
                npc.npcItemsInv.setIdleItem(weapon);
            if (weapon.getItem() instanceof ItemSword)
                npc.npcItemsInv.setMeleeWeapon(weapon);
            if (weapon.getItem() instanceof ItemBow)
                npc.npcItemsInv.setRangedWeapon(weapon);
        }
    }

    public static WarbandFaction get_warband_by_name(String name) {
        for (WarbandFaction faction : values()) {
            if (faction.name().equals(name))
                return faction;
            }
        return null;
    }

    public static class Troop {
        public Class entity_class;
        public int amount;

        public Troop(Class<? extends LOTREntityNPC> entity_class, int amount) {
            this.entity_class = entity_class;
            this.amount = amount;
        }
    }

}
