2018-07-21 03:11:03 -05:00
|
|
|
--- a/net/minecraft/world/item/SplashPotionItem.java
|
|
|
|
+++ b/net/minecraft/world/item/SplashPotionItem.java
|
2024-12-14 12:50:20 -08:00
|
|
|
@@ -14,6 +_,10 @@
|
2018-07-21 03:11:03 -05:00
|
|
|
|
|
|
|
@Override
|
2024-12-14 12:50:20 -08:00
|
|
|
public InteractionResult use(Level level, Player player, InteractionHand hand) {
|
2018-07-21 03:11:03 -05:00
|
|
|
+ // Paper start - PlayerLaunchProjectileEvent
|
2024-12-14 12:50:20 -08:00
|
|
|
+ final InteractionResult wrapper = super.use(level, player, hand);
|
2018-07-21 03:11:03 -05:00
|
|
|
+ if (wrapper instanceof InteractionResult.Fail) return wrapper;
|
|
|
|
+ // Paper end - PlayerLaunchProjectileEvent
|
2024-12-14 12:50:20 -08:00
|
|
|
level.playSound(
|
2018-07-21 03:11:03 -05:00
|
|
|
null,
|
2024-12-14 12:50:20 -08:00
|
|
|
player.getX(),
|
|
|
|
@@ -24,6 +_,6 @@
|
2018-07-21 03:11:03 -05:00
|
|
|
0.5F,
|
2024-12-14 12:50:20 -08:00
|
|
|
0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)
|
2018-07-21 03:11:03 -05:00
|
|
|
);
|
2024-12-14 12:50:20 -08:00
|
|
|
- return super.use(level, player, hand);
|
2018-07-21 03:11:03 -05:00
|
|
|
+ return wrapper; // Paper - PlayerLaunchProjectileEvent
|
|
|
|
}
|
|
|
|
}
|