9
0
mirror of https://github.com/Winds-Studio/Leaf.git synced 2026-01-06 15:51:31 +00:00
Files
Leaf/leaf-server/paper-patches/features/0061-Remove-stream-in-CraftWorld-spawnParticle.patch
2025-10-29 02:21:35 -04:00

22 lines
1.5 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
Date: Wed, 29 Oct 2025 02:13:18 -0400
Subject: [PATCH] Remove stream in CraftWorld#spawnParticle
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 5f984a34d07f34d37616c76ee202c376d7e65ebe..745c34763dc67d410673b9ca0ade391dc292fd74 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -2226,8 +2226,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
if (data != null) {
Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
}
- this.getHandle().sendParticlesSource(
- receivers == null ? this.getHandle().players() : receivers.stream().map(player -> ((CraftPlayer) player).getHandle()).collect(java.util.stream.Collectors.toList()), // Paper - Particle API
+ this.getHandle().sendParticlesSourceBukkit( // Leaf - Remove stream in CraftWorld#spawnParticle
+ receivers, // Paper - Particle API // Leaf - Remove stream in CraftWorld#spawnParticle
sender != null ? ((CraftPlayer) sender).getHandle() : null, // Sender // Paper - Particle API
CraftParticle.createParticleParam(particle, data), // Particle
force,