Paper/patches/api/0356-Multi-Block-Change-API.patch
Nassim Jahnke 928bcc8d3a
Updated Upstream (Bukkit/CraftBukkit) (#8430)
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:
09943450 Update SnakeYAML version
5515734f SPIGOT-7162: Incorrect description for Entity#getVehicle javadoc
6f82b381 PR-788: Add getHand() to all relevant events

CraftBukkit Changes:
aaf484f6f SPIGOT-7163: CraftMerchantRecipe doesn't copy demand and specialPrice from BukkitMerchantRecipe
5329dd6fd PR-1107: Add getHand() to all relevant events
93061706e SPIGOT-7045: Ocelots never spawn with babies with spawn reason OCELOT_BABY
2022-10-02 09:56:36 +02:00

39 Zeilen
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 b5519cf329485a2ec72586e66a8a88617c09312e..82d9cfadb00da9b7c2034938780354a573801728 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -624,6 +624,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 the equipment change of an entity. This fakes the equipment change
* of an entity for a user. This will not actually change the inventory of