Li Zhixuan gave him a Spiritual Medicine called the Millet Dream Fruit, which, although only a second-grade Spiritual Medicine, had a powerful function: it could construct a 'real' dream world.
For example, if Li Zhirui consumed this fruit, after falling asleep, he would be able to create any Spiritual Medicine he desired in the dream world, and even try his hand at refining Spirit Pills.
Of course, due to its grade limitation, the higher the cultivation of the cultivator who consumed the fruit, the weaker the effect would be. If a Foundation Establishment cultivator took it, they might be able to maintain the dream for an hour, but for Golden Core Realm cultivators, it would likely only last for two or three-quarters of an hour.
Moreover, if the cultivator's will was not firm enough, it was very possible that they would be unable to distinguish between reality and the dream world.