21 lines
804 B
Java
21 lines
804 B
Java
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.level.Level;
|
|
|
|
public class SplashPotionItem extends ThrowablePotionItem {
|
|
public SplashPotionItem(final Properties a) {
|
|
super(a);
|
|
}
|
|
|
|
@Override
|
|
public InteractionResultHolder<ItemStack> use(final Level bjt, final Player ayg, final InteractionHand ajh) {
|
|
bjt.playSound(null, ayg.getX(), ayg.getY(), ayg.getZ(), SoundEvents.SPLASH_POTION_THROW, SoundSource.PLAYERS, 0.5f, 0.4f / (SplashPotionItem.random.nextFloat() * 0.4f + 0.8f));
|
|
return super.use(bjt, ayg, ajh);
|
|
}
|
|
}
|