mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 03:43:40 +01:00
21 lines
795 B
Diff
21 lines
795 B
Diff
--- a/net/minecraft/world/item/LingeringPotionItem.java
|
|
+++ b/net/minecraft/world/item/LingeringPotionItem.java
|
|
@@ -24,6 +_,10 @@
|
|
|
|
@Override
|
|
public InteractionResult use(Level level, Player player, InteractionHand hand) {
|
|
+ // Paper start - PlayerLaunchProjectileEvent
|
|
+ final InteractionResult wrapper = super.use(level, player, hand);
|
|
+ if (wrapper instanceof InteractionResult.Fail) return wrapper;
|
|
+ // Paper end - PlayerLaunchProjectileEvent
|
|
level.playSound(
|
|
null,
|
|
player.getX(),
|
|
@@ -34,6 +_,6 @@
|
|
0.5F,
|
|
0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)
|
|
);
|
|
- return super.use(level, player, hand);
|
|
+ return wrapper; // Paper - PlayerLaunchProjectileEvent
|
|
}
|
|
}
|