🚀 Getting Started#
This guide will walk you through setting up a local development environment to build, test, and contribute to our modules.
⚙️ Prerequisites#
Before getting started, ensure your system is prepared by following these steps:
Install PDM, the Python Dependency Manager
Open a terminal at the root of the project and run the following command to install all required dependencies:
pdm install
Running this command prepares your environment for building and testing the project.
🔨 Building Modules#
The modules
directory contains the source files for all modules. Use the following commands to manage and build them efficiently:
|
Build all modules |
|
Monitor changes and rebuild modules automatically |
|
Build or watch only the specified modules |
|
Link the generated resource and data packs to a Minecraft world |
Watching Modules
Building modules can take some time. For a smoother experience, it’s recommended to only watch the module you’re currently working on: pdm run modules watch <module>
.
Linking Modules to Minecraft#
The link
command allows you to integrate generated packs directly into a Minecraft world. Below are the options available for this command:
|
The name of the Minecraft world to link |
|
Path to the |
|
Path to the directory where data packs are stored |
|
Path to the directory where resource packs are stored |
This workflow demonstrates how to link and continuously test your modules directly in Minecraft:
# Link modules to a specific world
pdm run modules link <world> --minecraft </path/to/.minecraft>
# Monitor changes and rebuild a module for the linked world
pdm run modules watch <module>
🧪 Testing Modules#
Testing is a fundamental aspect of software development. It helps ensure the correctness of your code and can save you from potential bugs in the future.
To learn how to write and run tests for your modules, refer to the Debug Section.