Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public enum Rotation {
- /**
- * No rotation
- */
- NONE,
- /**
- * Rotated clockwise
- */
- CLOCKWISE,
- /**
- * Flipped upside-down
- */
- FLIPPED,
- /**
- * Rotated counter-clockwise
- */
- COUNTER_CLOCKWISE;
- private static Rotation [] rotations = new Rotation [4];
- static {
- rotations = values();
- }
- /**
- * Rotate clockwise one value, as if the frame was right-clicked by a player.
- *
- * @return The new rotation
- */
- public Rotation rotateClockwise() {
- return rotations[this.ordinal() + 1 % 4];
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment