public enum BlockRotation extends Enum<BlockRotation>
Enum Constant and Description |
---|
CLOCKWISE_180 |
CLOCKWISE_90 |
COUNTERCLOCKWISE_90 |
NONE |
Modifier and Type | Field and Description |
---|---|
private DirectionTransformation |
directionTransformation |
Modifier and Type | Method and Description |
---|---|
DirectionTransformation |
getDirectionTransformation() |
static BlockRotation |
random(Random random) |
static List<BlockRotation> |
randomRotationOrder(Random random) |
BlockRotation |
rotate(BlockRotation rotation) |
Direction |
rotate(Direction direction) |
int |
rotate(int rotation,
int fullTurn) |
static BlockRotation |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static BlockRotation[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final BlockRotation NONE
public static final BlockRotation CLOCKWISE_90
public static final BlockRotation CLOCKWISE_180
public static final BlockRotation COUNTERCLOCKWISE_90
private final DirectionTransformation directionTransformation
public static BlockRotation[] values()
for (BlockRotation c : BlockRotation.values()) System.out.println(c);
public static BlockRotation valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic BlockRotation rotate(BlockRotation rotation)
public DirectionTransformation getDirectionTransformation()
public int rotate(int rotation, int fullTurn)
public static BlockRotation random(Random random)
public static List<BlockRotation> randomRotationOrder(Random random)