Updated to correctly use the java enum's ordinality, which starts at 0, not 1(I'm an idiot)