package com.tiedup.remake.entities;

import net.minecraft.world.entity.Entity;

/**
 * Centralized NPC type checks. Use these instead of scattered instanceof chains.
 *
 * Updated for C7-Phase3 (AbstractTiedUpNpc extraction):
 * EntityKidnapper now extends AbstractTiedUpNpc directly, not EntityDamsel.
 * The hierarchy is:
 *   AbstractTiedUpNpc
 *     ├── EntityDamsel (+ DamselShiny, LaborGuard)
 *     └── EntityKidnapper (+ Elite, Archer, Merchant, Maid, Master, SlaveTrader)
 */
public final class NpcTypeHelper {

    private NpcTypeHelper() {}

    /** True for EntityDamsel and its non-kidnapper subtypes (DamselShiny, LaborGuard) */
    public static boolean isDamselOnly(Entity entity) {
        return entity instanceof EntityDamsel;
    }

    /** True for EntityKidnapper and all subtypes (Elite, Archer, Merchant, Maid, Master, SlaveTrader) */
    public static boolean isKidnapperFamily(Entity entity) {
        return entity instanceof EntityKidnapper;
    }

    /** True for any TiedUp NPC (EntityDamsel or EntityKidnapper families) */
    public static boolean isTiedUpNpc(Entity entity) {
        return entity instanceof AbstractTiedUpNpc;
    }
}
