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

import com.tiedup.remake.entities.EntityKidnapper;
import com.tiedup.remake.entities.kidnapper.components.IAppearanceHost;
import com.tiedup.remake.entities.skins.Gender;
import java.util.UUID;
import net.minecraft.network.syncher.EntityDataAccessor;
import net.minecraft.util.RandomSource;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;

/**
 * Host implementation for AppearanceManager callbacks.
 */
public class AppearanceHost implements IAppearanceHost {

    private final EntityKidnapper entity;

    public AppearanceHost(EntityKidnapper entity) {
        this.entity = entity;
    }

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

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

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

    @Override
    public void setSlimArms(boolean slimArms) {
        entity.setSlimArms(slimArms);
    }

    @Override
    public void setGender(Gender gender) {
        entity.setGender(gender);
    }

    @Override
    public void setNpcName(String name) {
        entity.setNpcName(name);
    }

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

    @Override
    public void setEntityDataString(
        EntityDataAccessor<String> accessor,
        String value
    ) {
        entity.getEntityData().set(accessor, value);
    }

    @Override
    public String getEntityDataString(EntityDataAccessor<String> accessor) {
        return entity.getEntityData().get(accessor);
    }
}
