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.LOTREntityNPC;
import lotr.common.world.structure2.LOTRWorldGenDolGuldurCamp;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Overwrite;

import java.util.Random;

@Mixin(LOTRWorldGenDolGuldurCamp.class)
public class MixinLOTRWorldGenDolGuldurCamp {

    @Overwrite(remap = false)
    protected LOTREntityNPC getCampCaptain(World world, Random random) {
        int pick = random.nextInt(5);
        switch (pick) {
            case 1:
                return new DolGuldurOrcBrewer(world);
            case 2:
                return new DolGuldurOrcButcher(world);
            case 3:
                return new DolGuldurOrcSmith(world);
            case 4:
                return new LOTREntityDolGuldurOrcTrader(world);
            default:
                return null;
        }
    }
}
