๐Ÿš€ 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!