package net.minecraft.world.item;

import net.minecraft.network.chat.Component;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.world.level.Level;
import java.util.Iterator;
import net.minecraft.world.level.ItemLike;
import net.minecraft.world.item.alchemy.Potion;
import net.minecraft.core.Registry;
import net.minecraft.core.NonNullList;
import net.minecraft.world.item.alchemy.PotionUtils;
import net.minecraft.world.item.alchemy.Potions;

public class TippedArrowItem extends ArrowItem {
    public TippedArrowItem(final Properties a) {
        super(a);
    }
    
    @Override
    public ItemStack getDefaultInstance() {
        return PotionUtils.setPotion(super.getDefaultInstance(), Potions.POISON);
    }
    
    @Override
    public void fillItemCategory(final CreativeModeTab bdd, final NonNullList<ItemStack> fy) {
        if (this.allowdedIn(bdd)) {
            for (final Potion bgd5 : Registry.POTION) {
                if (!bgd5.getEffects().isEmpty()) {
                    fy.add(PotionUtils.setPotion(new ItemStack(this), bgd5));
                }
            }
        }
    }
    
    @Override
    public void appendHoverText(final ItemStack ben, @Nullable final Level bjw, final List<Component> list, final TooltipFlag bfw) {
        PotionUtils.addPotionTooltip(ben, list, 0.125f);
    }
    
    @Override
    public String getDescriptionId(final ItemStack ben) {
        return PotionUtils.getPotion(ben).getName(this.getDescriptionId() + ".effect.");
    }
}
