Port to 1.6.4

Liteloader used. I used some of the changes made for 1.7.2 that made sense.