net.minecraft.world.item
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
--- a/net/minecraft/world/item/SplashPotionItem.java
|
||||
+++ b/net/minecraft/world/item/SplashPotionItem.java
|
||||
@@ -14,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(),
|
||||
@@ -24,6 +_,6 @@
|
||||
0.5F,
|
||||
0.4F / (level.getRandom().nextFloat() * 0.4F + 0.8F)
|
||||
);
|
||||
- return super.use(level, player, hand);
|
||||
+ return wrapper; // Paper - PlayerLaunchProjectileEvent
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user