⚠️ You are reading a doc of an undergoing development version. Information can be out of date and/or change at any time. ⚠️

🌳 Tree structure#

Bookshelf respects a certain tree structure which can be similar to the Java packages, called β€œmodules” in this project. The added features must therefore be positioned in these various modules according to their usefulness.

  • Each module should be responsible for loading and unloading itself. This means that each module must redefine objectives, constants, and everything else that is needed.

  • Each feature function should have its own function tag.

  • Each module should have a help function tag and load function tag (responsible for loading the module and its dependencies).

  • A feature is equal to a unique utility, so we should not hesitate to decompose its features in order to make it more readable and to promote reusability.

In addition to these few constraints, the contributor is free to organise their files as they wishes as long as it remains coherent, understandable and it respects the global structure detailed below:

πŸ“data
 β”œβ”€ πŸ“ <module>
 β”‚   β”œβ”€ πŸ“ functions
 β”‚   β”‚   β”œβ”€ πŸ“ <feature1>
 β”‚   β”‚   β”‚   β”œβ”€ πŸ“„ <feature1>.mcfunction
 β”‚   β”‚   β”‚   └─ πŸ“„ ...
 β”‚   β”‚   β”œβ”€ πŸ“„ <feature2>.mcfunction
 β”‚   β”‚   β”œβ”€ πŸ“„ __load__.mcfunction
 β”‚   β”‚   β”œβ”€ πŸ“„ __unload__.mcfunction
 β”‚   β”œβ”€ πŸ“ <predicates|loot_tables|...>
 β”‚   β”‚   β”œβ”€ πŸ“ <feature1>
 β”‚   β”‚   β”‚   β”œβ”€ πŸ“„ <feature1>.json
 β”‚   β”‚   β”‚   └─ πŸ“„ ...
 β”‚   β”‚   β”œβ”€ πŸ“„ <feature2>.json
 β”‚   └─ πŸ“ tags
 β”‚       └─ πŸ“ functions
 β”‚           β”œβ”€ πŸ“„ <feature1>.json
 β”‚           └─ πŸ“„ ...
 └─ πŸ“ ...

Note

Functions, predicates, structures, loot tables etc. must respect the same structure.