Created
June 12, 2013 22:27
-
-
Save ft975/5769682 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public enum MachineSide { | |
FRONT, BACK, LEFT, RIGHT, TOP, BOTTOM; | |
public ForgeDirection toDirection(ForgeDirection facing) { //This method must return a result of type ForgeDirection. Note that a problem regarding missing 'default:' on 'switch' has been suppressed, which is perhaps related to this problem | |
switch (this) { | |
case BACK: | |
return facing.getOpposite(); | |
case BOTTOM: | |
return ForgeDirection.DOWN; | |
case FRONT: | |
return facing; | |
case LEFT: | |
return facing.getRotation(ForgeDirection.WEST); | |
case RIGHT: | |
return facing.getRotation(ForgeDirection.EAST); | |
case TOP: | |
return ForgeDirection.UP; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment