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