package com.tiedup.remake.entities.damsel.hosts;

import com.tiedup.remake.entities.EntityDamsel;
import com.tiedup.remake.entities.damsel.components.DamselBondageManager;
import com.tiedup.remake.entities.damsel.components.DamselPersonalitySystem;
import com.tiedup.remake.entities.damsel.components.IAIHost;
import java.util.UUID;
import net.minecraft.util.RandomSource;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3;

/**
 * Host implementation for AIController callbacks.
 * Extracted from EntityDamsel inner class for better organization.
 *
 */
public class AIHost implements IAIHost {

    private final EntityDamsel entity;

    public AIHost(EntityDamsel entity) {
        this.entity = entity;
    }

    // BASIC ENTITY ACCESS

    @Override
    public Level level() {
        return entity.level();
    }

    @Override
    public UUID getUUID() {
        return entity.getUUID();
    }

    @Override
    public String getNpcName() {
        return entity.getNpcName();
    }

    @Override
    public RandomSource getRandom() {
        return entity.getRandom();
    }

    @Override
    public AABB getBoundingBox() {
        return entity.getBoundingBox();
    }

    // LEASH SYSTEM ACCESS

    @Override
    public boolean isLeashed() {
        return entity.isLeashed();
    }

    @Override
    public Entity getLeashHolder() {
        return entity.getLeashHolder();
    }

    @Override
    public Vec3 getDeltaMovement() {
        return entity.getDeltaMovement();
    }

    @Override
    public void setDeltaMovement(Vec3 motion) {
        entity.setDeltaMovement(motion);
    }

    @Override
    public float maxUpStep() {
        return entity.maxUpStep();
    }

    @Override
    public void setMaxUpStep(float height) {
        entity.setMaxUpStep(height);
    }

    @Override
    public void teleportTo(double x, double y, double z) {
        entity.teleportTo(x, y, z);
    }

    @Override
    public float distanceTo(Entity other) {
        return entity.distanceTo(other);
    }

    @Override
    public double getX() {
        return entity.getX();
    }

    @Override
    public double getY() {
        return entity.getY();
    }

    @Override
    public double getZ() {
        return entity.getZ();
    }

    // COMPONENT ACCESS

    @Override
    public DamselBondageManager getBondageManager() {
        return entity.getBondageManager();
    }

    @Override
    public DamselPersonalitySystem getPersonalitySystem() {
        return entity.getPersonalitySystem();
    }

    // BONDAGE STATE QUERIES (delegated)

    @Override
    public boolean isTiedUp() {
        return entity.isTiedUp();
    }

    @Override
    public boolean isGagged() {
        return entity.isGagged();
    }

    @Override
    public boolean isCaptive() {
        return entity.isCaptive();
    }
}
