Ported TileMachine (except BC stuff).

Added tag type constants to NBTHelper.