mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-22 05:44:03 +00:00
Added support for rotation block orientation with the rotate and flip commands.
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
package com.sk89q.worldedit.blocks;
|
||||
|
||||
import com.sk89q.worldedit.data.BlockData;
|
||||
|
||||
/**
|
||||
* Represents a block.
|
||||
*
|
||||
@@ -89,4 +91,25 @@ public class BaseBlock {
|
||||
public boolean isAir() {
|
||||
return type == 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate this block 90 degrees.
|
||||
*/
|
||||
public void rotate90() {
|
||||
data = (char)BlockData.rotate90(type, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate this block -90 degrees.
|
||||
*/
|
||||
public void rotate90Reverse() {
|
||||
data = (char)BlockData.rotate90Reverse(type, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Flip this block.
|
||||
*/
|
||||
public void flip() {
|
||||
data = (char)BlockData.flip(type, data);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user