๐ Quickstart#
This page gives a quick overview of how to get started with the Bookshelf library, and how to use it.
๐ฅ Installation#
The Bookshelf Manager is still in its development phase, and there is no straightforward installation process at the moment. If youโre not familiar with datapacks, feel free to join our Discord, weโll be delighted to assist you with the installation and usage of the library!
๐ค Help us improve the installation process
We are actively searching for web developers to create the new version of the Bookshelf Manager, a website that helps users download modules and their respective dependencies. Weโve already finalized the mockup for the website, you can check it here. If you are interested in helping us, please contact us on Discord!
Bookshelf releases are available on both Github and Modrinth. In each release, you will find zipped datapacks. You have multiple options for installation:
๐ Whole Datapacks: You can download entire datapacks which includes all modules and dependencies. This is a good option if you want to explore everything Bookshelf has to offer.
๐งฉ Module by Module (only on Github): Alternatively, you can download individual modules as datapacks. Each module zip file contains all the dependencies needed for that module to work. This is a great option if you only need specific functionalities and want to keep your installation lightweight.
After downloading, move the zip file to the datapacks directory of your Minecraft world.
Please note that while the datapacks from releases are stable, they might not include the very latest features or fixes that are available in the source code. If you want the most up-to-date version of Bookshelf, consider installing from source.
If you like the project, donโt hesitate to star it on Github and/or follow it on Modrinth ๐.
If you know how datapacks work, and want to handle the installation process on your own ๐ช๐, first familiarize yourself with the structure of the project below. Then rendez-vous on github to download the repository, and extract only what you need!
Once Bookshelf is installed on your map with specific modules (rather than the entire library), the initial step is to ensure that each module can be properly loaded with all its dependencies. Verify this by calling the #bs.<module>:load
function for each module or check your game console for any errors.
Upon exploring the main datapack, you may notice files within the minecraft namespace. These files facilitate the autoloading of modules and the ticking of specific functions. While they are not strictly needed for Bookshelf to work, without them, you have the responsibility to manually call tick functions or reload modules.
๐๏ธ Structural overview
The Github repository includes a demo map (still a work in progress) and four datapacks:
๐ datapacks / Bookshelf
This is the main datapack of the library, containing all the useful tools for your project. Itโs the only one to keep in the end. The datapack is divided into modules, so install only the ones you need.
๐ datapacks / Bookshelf Dev
This datapack includes utilities for developers, such as logs and more. Its purpose is to provide essential tools to assist you during the development phase of your project.
๐ datapacks / Bookshelf Examples (WIP)
This datapack contains easily-readable examples showcasing systems that can be created with Bookshelf. Its main purpose is to be read. Install it only if you wish to gain familiarity with the library by examining practical examples.
๐ datapacks / Bookshelf World (WIP)
This datapack contains code utilized by the world itself. It is not intended for direct use.
๐ถ First steps#
Important
Bookshelf relies on persistent entities to enhance performances. Therefore, itโs important not to kill all entities. Instead, you can use the command kill @e[tag=!bs.persistent]
. Learn more here
๐ Good practices#
Bookshelf is designed to minimize unintended side effects. However, complications can arise when multiple datapacks utilize the same one. To prevent potential issues, itโs always recommended to set inputs prior to executing a function. This holds true even though Bookshelf adheres to a strict policy of preserving inputs. By following this practice, you can ensure smoother operation and prevent unexpected behaviors.
Note
This section is in progress. If you have some ideas about how to improve the first steps with Bookshelf, please share it on our Discord server.
๐ฌ Did it help you?
Feel free to leave your questions and feedbacks below!