package com.tiedup.remake.items;

import java.util.List;
import net.minecraft.ChatFormatting;
import net.minecraft.network.chat.Component;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import org.jetbrains.annotations.Nullable;

/**
 * Padlock - Used to make bondage items lockable.
 *
 *
 * Usage:
 * - Combine with a bondage item (ILockable) in an Anvil
 * - The item becomes "lockable" (can be locked with a Key)
 * - Cost: 1 XP level
 *
 * @see com.tiedup.remake.events.system.AnvilEventHandler
 */
public class ItemPadlock extends Item {

    public ItemPadlock() {
        super(new Item.Properties().stacksTo(16));
    }

    @Override
    public void appendHoverText(
        ItemStack stack,
        @Nullable Level level,
        List<Component> tooltip,
        TooltipFlag flag
    ) {
        super.appendHoverText(stack, level, tooltip, flag);

        tooltip.add(
            Component.translatable("item.tiedup.padlock.tooltip").withStyle(
                ChatFormatting.GRAY
            )
        );
    }
}
