From 7b5c280187add9e749486c5033270ef7058237ec Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sun, 2 Apr 2023 13:32:01 +1000 Subject: [PATCH] #839: Add BlockData#rotate and BlockData#mirror By: Jishuna --- .../java/org/bukkit/block/data/BlockData.java | 20 +++++++++++++++++++ 1 file changed, 20 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 12a7ca1808..96dbcc34c8 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 @@ -8,6 +8,8 @@ import org.bukkit.block.Block; import org.bukkit.block.BlockFace; import org.bukkit.block.BlockSupport; import org.bukkit.block.PistonMoveReaction; +import org.bukkit.block.structure.Mirror; +import org.bukkit.block.structure.StructureRotation; import org.bukkit.inventory.ItemStack; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; @@ -215,4 +217,22 @@ public interface BlockData extends Cloneable { */ @NotNull Material getPlacementMaterial(); + + /** + * Rotates this blockdata by the specified {@link StructureRotation}. + *

+ * This has no effect on blocks that do not have any rotatable states. + * + * @param rotation the rotation + */ + void rotate(@NotNull StructureRotation rotation); + + /** + * Mirrors this blockdata using the specified {@link Mirror}. + *

+ * This has no effect on blocks that do not have any mirrorable states. + * + * @param mirror the mirror + */ + void mirror(@NotNull Mirror mirror); }