From 280361091621aadf828ebdc6a15124849ba00b33 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Mon, 15 Jan 2024 20:33:15 +1100 Subject: [PATCH] #961: Add BlockData#copyTo By: Jishuna --- .../src/main/java/org/bukkit/block/data/BlockData.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/block/data/BlockData.java b/paper-api/src/main/java/org/bukkit/block/data/BlockData.java index dff615d7cc..29fd06cb80 100644 --- a/paper-api/src/main/java/org/bukkit/block/data/BlockData.java +++ b/paper-api/src/main/java/org/bukkit/block/data/BlockData.java @@ -247,6 +247,16 @@ public interface BlockData extends Cloneable { */ void mirror(@NotNull Mirror mirror); + /** + * Copies all applicable properties from this BlockData to the provided + * BlockData. + *

+ * Only modifies properties that both blocks share in common. + * + * @param other the BlockData to copy properties to + */ + void copyTo(@NotNull BlockData other); + /** * Creates a new default {@link BlockState} for this type of Block, not * bound to a location.