/*
 * 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.client.model;

import com.remains_cave.RemainsCaveMod;
import com.remains_cave.item.ModItems;
import com.remains_cave.item.custom.TrophyItem;
import net.minecraft.resources.ResourceLocation;
import net.minecraft.world.item.Item;
import software.bernie.geckolib.model.GeoModel;

public class TrophyItemModel extends GeoModel<TrophyItem> {
    @Override
    public ResourceLocation getModelResource(TrophyItem animatable) {
        Item item = animatable.asItem();
        if (item == ModItems.SKELETON_ARCHER_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "geo/block/skeleton_archer_trophy.geo.json");
        } else if (item == ModItems.SKELETON_KING_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "geo/block/skeleton_king_trophy.geo.json");
        } else if (item == ModItems.SKELETON_WARLOCK_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "geo/block/skeleton_warlock_trophy.geo.json");
        } else if (item == ModItems.SKELETON_WARRIOR_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "geo/block/skeleton_warrior_trophy.geo.json");
        }
        return null;
    }

    @Override
    public ResourceLocation getTextureResource(TrophyItem animatable) {
        Item item = animatable.asItem();
        if (item == ModItems.SKELETON_ARCHER_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "textures/entity/skeleton_archer.png");
        } else if (item == ModItems.SKELETON_KING_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "textures/entity/skeleton_king.png");
        } else if (item == ModItems.SKELETON_WARLOCK_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "textures/entity/skeleton_warlock.png");
        } else if (item == ModItems.SKELETON_WARRIOR_TROPHY_ITEM.get()) {
            return ResourceLocation.fromNamespaceAndPath(RemainsCaveMod.MODID, "textures/entity/skeleton_warrior.png");
        }
        return null;
    }

    @Override
    public ResourceLocation getAnimationResource(TrophyItem animatable) {
        return null;
    }
}