The bookshelves in our builds hold real books now. GhibliCraft has 30 libraries, spread over Market Chipping, the University of Ingary, Kingsbury, Porthaven and two towns in the Japanese World. Together they hold over 110,000 books in more than 50 languages, and you can freely take any of them off the shelf and read it.
Every book is public domain or openly licensed and most come from Project Gutenberg, Wikisource and Aozora Bunko. We also have old magazines, science articles, law texts and scriptures.
Taking a book off the shelf

Right-click a bookshelf to take out the book that stands in that spot; you will see that a gap will stay behind until the book comes back. When you're done, put the book back on its shelf or in the library's return shelf. The librarian NPC collects it later and sorts all the books back. While the librarian isn't busy with returns, you might see them go back and forth and do things like sorting and reading books.
To find a specific book, ask the librarian. They tell you if it's in their library and give you a book finder, a compass that points to the shelf it stands on. Alternatively, the card catalog will give you a list of every section, and if you're feeling lucky, each library also puts out a book of the day on a lectern.


Each library has its own name and focus, such as the Law Library with law books and the Medical Library with medicine and biology books. The bookshops have novels and fairy tales and some even have a language corner, like French books at La Plume or Russian at The Brass Lantern. There are only a few titles that are in multiple libraries, so if you're looking for a specific book, you might have to go search!
Books you finish go into "My collection", which also lists the libraries you've found. You can even write a book of your own in-game and submit it. Once staff have read it, it could go in a library in the world.
How we built it
Most of the work happened before we even touched Minecraft. We downloaded the collections, repaired text that was scrambled and then split every book into pages using the game's own font measurements, so lines break where Minecraft would break them.
The next challenge was showing a gap when a book is taken. The shelves are still ordinary bookshelf blocks and our resource pack paints them in five repeating patterns, so one idea was to just make a texture for every state a shelf can be in. However, each pattern holds 11 or 12 books, and each book is either there or gone, so a single pattern has up to 2¹² = 4,096 combinations. Across all five that adds up to 16,384 textures. We then thought of using an item display with one model per pattern, which holds a patch for every book, which meant we only needed five models in total that cover every combination.

The plugin then works out which pattern a shelf uses from its position so when you right-click, it finds the pixel of the texture you hit and with it the book you were aiming at. The book then leaves the shelf and a flat display appears a thousandth of a block in front of that face. The display's model holds a patch for every book on the pattern so we only switch on the patches for books that are taken out. And the cool part is that only one display covers the whole face, no matter how many books are gone.
Technical details
How is this done exactly?
Each gap is an item display (from version 1.19.4) in front of the shelf face and that item has an item_model component that points to one of five item models in our resource pack, one per shelf pattern. And since 1.21.4 (with our server update), an item model can be built from parts, so each of these five is a composite of 11 or 12 condition entries, one per book. Each condition then reads one true/false value from the item's custom_model_data flags list so, for example, if the flag for book 3 is true, the game draws book 3's patch and if it's false, it draws minecraft:empty.
The patch itself is a tiny model with a single flat face, which we've sized and placed to match one book's rectangle on the 32 by 32 shelf texture exactly where the texture is just the back wall of the shelf. So taking a book changes its flag to true and putting it back flips it to false, which makes the plugin swap in the item with the new flags. We wanted to reduce the amount of entities displayed so one display per shelf face covers every combination.
You might wonder how the server doesn't explode handling 110,000 books. If you've ever tried to put a long book into Minecraft, you know a book is capped at 100 pages, and lots of full books can even crash your game or the server. The answer to that is that most of the books are actually asleep as its own small compressed file on the disk, of which we take only 9.4GB in total.

A book you take off the shelf doesn't actually contain any pages, it's just an empty written book that has a title, a description and an ID. So when you open it, the plugin looks up that ID and sends your client the pages to show on screen, which means that every copy of a book points to the same file on the disk. To tackle the 100 pages limit, we open long books on their contents page which then links to each chapter and each chapter only loads in when you click on it. So a novel like War and Peace by Leo Tolstoy, which has about 1,300 pages in real life and 12,000 pages on the server, is basically just a blank book in your inventory. The only thing the server keeps in memory is the catalog, which is the list of every title with its author, language and section, which is what the librarians, the card catalog and the book finder use.
So now, to stock a library, the plugin gives each wall a section and keeps related sections on neighboring walls. Finally, once we upload the data to the server and everything is in game, we create a library with a few commands and every book is automatically populated, including the small brass plaques to name the sections. If you've got any questions, feel free to reach out to us on our Discord!
Where to start
Go to /warp library and talk to the librarian, or take a book finder and look for a title you like. See if you can find all 30 libraries!