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 biy, final NonNullList<ItemStack> gi) {
        if (this.allowdedIn(biy)) {
            for (final Potion bmb5 : Registry.POTION) {
                if (!bmb5.getEffects().isEmpty()) {
                    gi.add(PotionUtils.setPotion(new ItemStack(this), bmb5));
                }
            }
        }
    }
    
    @Override
    public void appendHoverText(final ItemStack bki, @Nullable final Level bqb, final List<Component> list, final TooltipFlag bls) {
        PotionUtils.addPotionTooltip(bki, list, 0.125f);
    }
    
    @Override
    public String getDescriptionId(final ItemStack bki) {
        return PotionUtils.getPotion(bki).getName(this.getDescriptionId() + ".effect.");
    }
}
