package net.minecraft.world.item;

import net.minecraft.sounds.SoundSource;
import net.minecraft.sounds.SoundEvents;
import net.minecraft.world.InteractionResultHolder;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.alchemy.PotionUtils;
import net.minecraft.network.chat.Component;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.world.level.Level;

public class LingeringPotionItem extends ThrowablePotionItem {
    public LingeringPotionItem(final Properties a) {
        super(a);
    }
    
    @Override
    public void appendHoverText(final ItemStack ben, @Nullable final Level bjw, final List<Component> list, final TooltipFlag bfw) {
        PotionUtils.addPotionTooltip(ben, list, 0.25f);
    }
    
    @Override
    public InteractionResultHolder<ItemStack> use(final Level bjw, final Player ayj, final InteractionHand ajk) {
        bjw.playSound(null, ayj.getX(), ayj.getY(), ayj.getZ(), SoundEvents.LINGERING_POTION_THROW, SoundSource.NEUTRAL, 0.5f, 0.4f / (LingeringPotionItem.random.nextFloat() * 0.4f + 0.8f));
        return super.use(bjw, ayj, ajk);
    }
}
