Is it a good idea to make your own library to write less code in the future?

For the first time ever I got a 3D system working in LibGDX and decided to turn it into a library for me to write less code in the future.

Was that even a good idea?