package com.tiedup.remake.items;

import com.tiedup.remake.items.base.ItemMittens;
import com.tiedup.remake.items.base.MittensVariant;
import net.minecraft.world.item.Item;

/**
 * Generic mittens item created from MittensVariant enum.
 *
 * Factory pattern: All mittens variants are created using this single class.
 *
 */
public class GenericMittens extends ItemMittens {

    private final MittensVariant variant;

    public GenericMittens(MittensVariant variant) {
        super(new Item.Properties().stacksTo(16));
        this.variant = variant;
    }

    /**
     * Get the variant this mittens was created from.
     */
    public MittensVariant getVariant() {
        return variant;
    }

    /**
     * Get the texture subfolder for this mittens variant.
     * Issue #12 fix: Eliminates string checks in renderers.
     */
    @Override
    public String getTextureSubfolder() {
        return variant.getTextureSubfolder();
    }
}
