public final class BlockData
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
cycle(int type,
int data,
int increment)
Cycle a block's data value.
|
static int |
flip(int type,
int data)
Flip a block's data value.
|
static int |
flip(int type,
int data,
CuboidClipboard.FlipDirection direction)
Flip a block's data value.
|
static int |
nextClothColor(int data)
Returns the data value for the next color of cloth in the rainbow.
|
static int |
prevClothColor(int data)
Returns the data value for the previous ext color of cloth in the rainbow.
|
static int |
rotate90(int type,
int data)
Rotate a block's data value 90 degrees (north->east->south->west->north);
|
static int |
rotate90Reverse(int type,
int data)
Rotate a block's data value -90 degrees (north<-east<-south<-west<-north);
|
public static int rotate90(int type, int data)
type
- the type ID of the bockdata
- the data ID of the blockpublic static int rotate90Reverse(int type, int data)
type
- the type ID of the bockdata
- the data ID of the blockpublic static int flip(int type, int data)
type
- the type ID of the bockdata
- the data ID of the blockpublic static int flip(int type, int data, CuboidClipboard.FlipDirection direction)
type
- the type ID of the bockdata
- the data ID of the blockdirection
- the direction to flippublic static int cycle(int type, int data, int increment)
type
- block id to be cycleddata
- block data value that it starts atincrement
- whether to go forward (1) or backward (-1) in the cyclepublic static int nextClothColor(int data)
data
- the data valuepublic static int prevClothColor(int data)
data
- the data value