/*
 * Copyright (c) 2026 盐灯水母
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at https://mozilla.org/MPL/2.0/.
 */

package com.remains_cave.item.client;

import com.remains_cave.item.custom.BonePauldronItem;
import net.minecraft.world.entity.EquipmentSlot;
import software.bernie.geckolib.cache.object.GeoBone;
import software.bernie.geckolib.model.GeoModel;
import software.bernie.geckolib.renderer.GeoArmorRenderer;

import javax.annotation.Nullable;

public class BonePauldronArmorRenderer extends GeoArmorRenderer<BonePauldronItem> {

    public BonePauldronArmorRenderer() {
        super(new BonePauldronModel());
    }

    @Override
    @Nullable
    public GeoBone getHeadBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    @Nullable
    public GeoBone getBodyBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    @Nullable
    public GeoBone getRightArmBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    @Nullable
    public GeoBone getLeftArmBone(GeoModel<BonePauldronItem> model) {
        return model.getBone("leftArm").orElse(null);
    }

    @Override
    @Nullable
    public GeoBone getRightLegBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    @Nullable
    public GeoBone getLeftLegBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    @Nullable
    public GeoBone getRightBootBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    @Nullable
    public GeoBone getLeftBootBone(GeoModel<BonePauldronItem> model) { return null; }

    @Override
    protected void applyBoneVisibilityBySlot(EquipmentSlot currentSlot) {
        setAllBonesVisible(false);
        if (this.leftArm != null) {
            this.leftArm.setHidden(false);
        }
    }
}