net.minecraft.world.item

This commit is contained in:
Jake Potrebic
2024-12-14 12:50:20 -08:00
parent 718d970f97
commit 31913c0b0a
64 changed files with 1134 additions and 2053 deletions

View File

@@ -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
}
}