Prerequisites
Before you begin, ensure you have the following installed:Required Software
- Java Development Kit (JDK) 21
-
Gradle
- The project uses Gradle for build automation
- Check installation guide at gradle.org/install
- Alternatively, use the included Gradle wrapper (
./gradlew)
-
Node.js
- Required for building the theme system
- Download from nodejs.org
- Latest LTS or stable release recommended
-
Git
- For cloning the repository with submodules
- Download from git-scm.com
Cloning the Repository
Clone the repository with all submodules:The
--recurse-submodules flag is important as LiquidBounce uses git submodules for certain components.Setting Up the Workspace
Generate Sources (Optional)
For a better development experience, generate decompiled Minecraft sources:Open in IDE
Open the project folder as a Gradle project in your preferred IDE:- IntelliJ IDEA: File → Open → Select the LiquidBounce folder
- Eclipse: File → Import → Gradle → Existing Gradle Project
- VS Code: Open folder and install Gradle extensions
Building the Project
Standard Build
Build the mod JAR file:build/libs/.
Build Tasks
LiquidBounce uses several Gradle tasks for building:| Task | Description |
|---|---|
./gradlew build | Complete build including tests and theme |
./gradlew jar | Build the mod JAR only |
./gradlew sourcesJar | Generate sources JAR |
./gradlew assemble | Assemble all outputs without running tests |
Theme Building
The theme is built automatically as part of the build process:processResources but can be executed individually if needed.
Running the Client
Development Run
Run the client directly from Gradle:Debug Mode
For debugging in your IDE:- Open Run Configurations
- Add a new Gradle configuration
- Set task to
runClient - Enable debug mode
Build Configuration
Project Properties
The build is configured viagradle.properties:
Version Information
Version dependencies are managed ingradle/libs.versions.toml:
- Minecraft: 1.21.11
- Fabric Loader: 0.18.4+
- Fabric API: 0.140.0+
- Kotlin: 2.3.10
- JDK: 21
Gradle Performance
The project is optimized for faster builds:Common Build Tasks
Clean Build
Remove all build artifacts:Rebuild Everything
Clean and build from scratch:Run Tests
Execute all tests:Code Quality Checks
Run Detekt for Kotlin code analysis:Verify Translations
Check i18n JSON key consistency:Troubleshooting
Build Fails Due to Memory
Increase Gradle memory ingradle.properties:
Theme Build Issues
Ensure Node.js is installed and accessible:Gradle Wrapper Issues
If./gradlew fails, ensure it’s executable:
Submodules Not Loaded
If you forgot--recurse-submodules when cloning:
Next Steps
- Learn about Contributing Guidelines
- Explore the Project Architecture
- Read Debugging Tips