Paper/patches/api/0347-Multi-Block-Change-API.patch
Jake Potrebic 4e994669d3
Updated Upstream (Bukkit/CraftBukkit/Spigot) (#8874)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
6b3c598b PR-814: Add a method to send multiple equipment changes
181a984b Update Maven shade version to align with CraftBukkit
a5a36e32 Revert "Update Maven shade version to align with CraftBukkit"
7a8f4a42 Update Maven shade version to align with CraftBukkit
58327201 Add support for Java 20

CraftBukkit Changes:
b56426c7a PR-1142: Calculate explosion damage separately for each affected EntityComplexPart
fbe3410af PR-1140: Add a method to send multiple equipment changes
8434e3633 Add support for Java 20
c998a1d23 Increase outdated build delay
4a929b5d6 SPIGOT-7267: Fix EntityType#getTranslationKey() and add unit test
086d8dc8a SPIGOT-7268: CraftMetaPotion reads ShowParticles and ShowIcon properties incorrectly
8ba5e399e SPIGOT-7262: Improve visibility API

Spigot Changes:
a2190e30 Rebuild patches
2023-03-10 12:18:50 -08:00

39 lines
1.8 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Brody Beckwith <brody@beckwith.dev>
Date: Fri, 14 Jan 2022 00:40:42 -0500
Subject: [PATCH] Multi Block Change API
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index b8649646550d92e74d81f8502ce7a0e3479ebced..596af6bb00429bad7d36ea9b06573ec0aacc4cff 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -646,6 +646,27 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
*/
public void sendBlockDamage(@NotNull Location loc, float progress);
+ // Paper start
+ /**
+ * Send multiple block changes. This fakes a multi block change packet for each
+ * chunk section that a block change occurs. This will not actually change the world in any way.
+ *
+ * @param blockChanges A map of the locations you want to change to their new block data
+ */
+ public default void sendMultiBlockChange(@NotNull java.util.Map<Location, BlockData> blockChanges) {
+ sendMultiBlockChange(blockChanges, false);
+ }
+
+ /**
+ * Send multiple block changes. This fakes a multi block change packet for each
+ * chunk section that a block change occurs. This will not actually change the world in any way.
+ *
+ * @param blockChanges A map of the locations you want to change to their new block data
+ * @param suppressLightUpdates Whether to suppress light updates or not
+ */
+ public void sendMultiBlockChange(@NotNull java.util.Map<Location, BlockData> blockChanges, boolean suppressLightUpdates);
+ // Paper end
+
/**
* Send an equipment change for the target entity. This will not
* actually change the entity's equipment in any way.