From ef44483fd2a5589ac0fe854b7a63f00104b70104 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 7 Apr 2024 12:22:08 +1000 Subject: [PATCH] #982: Add API to copy BlockState to a new Location By: lbenav8095 --- .../src/main/java/org/bukkit/block/BlockState.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/paper-api/src/main/java/org/bukkit/block/BlockState.java b/paper-api/src/main/java/org/bukkit/block/BlockState.java index 7c5438fa92..3e07fc1bc0 100644 --- a/paper-api/src/main/java/org/bukkit/block/BlockState.java +++ b/paper-api/src/main/java/org/bukkit/block/BlockState.java @@ -57,6 +57,16 @@ public interface BlockState extends Metadatable { @ApiStatus.Experimental BlockState copy(); + /** + * Copies the state to another block as an unplaced BlockState. + * + * @param location the location to copy the block state to + * @return the new block state + */ + @NotNull + @ApiStatus.Experimental + BlockState copy(@NotNull Location location); + /** * Gets the type of this block state. *