package top.azimkin.militaryarmor;

import net.minecraft.resources.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.OnlyIn;
import software.bernie.geckolib.core.animatable.GeoAnimatable;
import software.bernie.geckolib.model.DefaultedItemGeoModel;
import software.bernie.geckolib.renderer.GeoArmorRenderer;

@OnlyIn(Dist.CLIENT)
public class CommonMilitaryArmorRenderer extends GeoArmorRenderer<CommonMilitaryArmorItem> {
    public CommonMilitaryArmorRenderer(String armorName) {
        super(prepareModel(armorName));
    }

    protected static <I extends GeoAnimatable> DefaultedItemGeoModel<I> prepareModel(String armorName) {
        var model = new DefaultedItemGeoModel<I>(ResourceLocation.fromNamespaceAndPath(MilitaryArmor.MOD_ID, "armor/" + armorName));
        model.withAltAnimations(ResourceLocation.fromNamespaceAndPath(MilitaryArmor.MOD_ID, "armor/common"));
        return model;
    }
}
