Bukkit/Bukkit — pull request #734 by bergerkiller (2012-12-15 12:28:01+00:00)
Title: Fixed sub-cardinal BlockFaces having invalid data values in MaterialData classes, Fixes Bukit-3160

Signed-off-by: Irmo van den Berge

These BlockFace transformations were done to go from the old to the official Minecraft format:
- north -> west
- east -> north
- south -> east
- west -> south
- north_east -> north_west
- south_east -> north_east
- south_west -> south_east
- north_west -> south_west
- west_north_west -> south_south_west
- north_north_west -> west_south_west
- north_north_east -> west_north_west
- east_north_east -> north_north_west
- east_south_east -> north_north_east
- south_south_east -> east_north_east
- south_south_west -> east_south_east
- west_south_west -> south_south_east

The above transformations are based on the fact that the BlockFace 'rotated' horizontally.
It rotated 90 degrees to the left.
For example:
- north_east -> 45 -> -45 -> north_west
- north_north_east -> 22.5 -> -67.5 -> west_north_west
Luckily, an easier method could be used to come up with the above:

was: NORTH_NORTH_WEST
old: NORTH, NORTH_WEST
new: WEST, SOUTH_WEST
becomes: WEST_SOUTH_WEST

I have double-checked that this was indeed the case.

Only the top four were updates in the org.bukkit.material.* classes.
This commit properly translates those blockfaces as well.

Part of commit:
https://github.com/Bukkit/Bukkit/commit/49690f9620b7ed1ed9769cec35d095a3cac33ab0