package com.tiedup.remake.entities.skins;

import net.minecraft.util.StringRepresentable;

/**
 * Gender of the entity skin.
 * Used for model selection, voice lines, and text formatting.
 */
public enum Gender implements StringRepresentable {
    FEMALE("female"),
    MALE("male");

    private final String name;

    Gender(String name) {
        this.name = name;
    }

    @Override
    public String getSerializedName() {
        return this.name;
    }

    public static Gender fromName(String name) {
        if (name == null) return FEMALE;
        return name.equalsIgnoreCase("male") ? MALE : FEMALE;
    }
}
