diff --git a/patches/server/0212-PlayerLaunchProjectileEvent.patch b/patches/server/0212-PlayerLaunchProjectileEvent.patch index b41463a06a..de1f0193b6 100644 --- a/patches/server/0212-PlayerLaunchProjectileEvent.patch +++ b/patches/server/0212-PlayerLaunchProjectileEvent.patch @@ -151,7 +151,7 @@ index b255e40277585928a767e5efd4b61708e13dab50..dfa3f9534159400e539ee61debedffb5 } diff --git a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java -index 400ad0fa1d07c8b120e3c3b5488dfa315aa2d23f..7e308b364227dedc2d05496f5e0c90573f4a53f7 100644 +index 400ad0fa1d07c8b120e3c3b5488dfa315aa2d23f..29a048a9b09166838616ac7ba1d31625d56b0bca 100644 --- a/src/main/java/net/minecraft/world/item/FireworkRocketItem.java +++ b/src/main/java/net/minecraft/world/item/FireworkRocketItem.java @@ -33,7 +33,7 @@ public class FireworkRocketItem extends Item implements ProjectileItem { @@ -170,7 +170,7 @@ index 400ad0fa1d07c8b120e3c3b5488dfa315aa2d23f..7e308b364227dedc2d05496f5e0c9057 - itemStack.shrink(1); + // Paper start - PlayerLaunchProjectileEvent + com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent event = new com.destroystokyo.paper.event.player.PlayerLaunchProjectileEvent((org.bukkit.entity.Player) context.getPlayer().getBukkitEntity(), org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(itemStack), (org.bukkit.entity.Firework) fireworkRocketEntity.projectile().getBukkitEntity()); -+ if (!event.callEvent() || fireworkRocketEntity.attemptSpawn()) return InteractionResult.PASS; ++ if (!event.callEvent() || !fireworkRocketEntity.attemptSpawn()) return InteractionResult.PASS; + if (event.shouldConsume() && !context.getPlayer().hasInfiniteMaterials()) itemStack.shrink(1); + else if (context.getPlayer() instanceof net.minecraft.server.level.ServerPlayer) ((net.minecraft.server.level.ServerPlayer) context.getPlayer()).getBukkitEntity().updateInventory(); + // Paper end - PlayerLaunchProjectileEvent