#839: Add BlockData#rotate and BlockData#mirror

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
Bukkit/Spigot 2023-04-02 13:32:01 +10:00
parent d432386d58
commit 7b5c280187

View File

@ -8,6 +8,8 @@ import org.bukkit.block.Block;
import org.bukkit.block.BlockFace; import org.bukkit.block.BlockFace;
import org.bukkit.block.BlockSupport; import org.bukkit.block.BlockSupport;
import org.bukkit.block.PistonMoveReaction; import org.bukkit.block.PistonMoveReaction;
import org.bukkit.block.structure.Mirror;
import org.bukkit.block.structure.StructureRotation;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
@ -215,4 +217,22 @@ public interface BlockData extends Cloneable {
*/ */
@NotNull @NotNull
Material getPlacementMaterial(); Material getPlacementMaterial();
/**
* Rotates this blockdata by the specified {@link StructureRotation}.
* <p>
* 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}.
* <p>
* This has no effect on blocks that do not have any mirrorable states.
*
* @param mirror the mirror
*/
void mirror(@NotNull Mirror mirror);
} }