Added negative id check to Material.getMaterial(int). Fixes BUKKIT-3414
Negative id values would try to access the array out of bounds and throw an java.lang.ArrayIndexOutOfBoundsException.
Support inverted TrapDoor. Fixes BUKKIT-3390

Trap door inversion was added in MC 1.4.2

Added logic pulled from Step.java and Stairs.java