package com.zivilon.cinder_loe.mixins.structures;

import com.zivilon.cinder_loe.entity.npc.orc.trader.*;
import lotr.common.entity.npc.LOTREntityDolGuldurOrcTrader;
import lotr.common.entity.npc.LOTREntityGundabadOrcMercenaryCaptain;
import lotr.common.entity.npc.LOTREntityGundabadOrcTrader;
import lotr.common.entity.npc.LOTREntityNPC;
import lotr.common.world.structure2.LOTRWorldGenDolGuldurCamp;
import lotr.common.world.structure2.LOTRWorldGenGundabadCamp;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;

import java.util.Random;

@Mixin(LOTRWorldGenGundabadCamp.class)
public class MixinLOTRWorldGenGundabadCamp {

    @Overwrite(remap = false)
    protected LOTREntityNPC getCampCaptain(World world, Random random) {
        int pick = random.nextInt(5);
        switch (pick) {
            case 1:
                return new GundabadOrcBrewer(world);
            case 2:
                return new GundabadOrcButcher(world);
            case 3:
                return new GundabadOrcSmith(world);
            case 4:
                return new LOTREntityGundabadOrcTrader(world);
            default:
                return new LOTREntityGundabadOrcMercenaryCaptain(world);
        }
    }
}
