Skip to main content

Welcome Contributors

We appreciate contributions to LiquidBounce! If you want to support us, feel free to make changes to LiquidBounce’s source code and submit a pull request. This guide will help you get started.
LiquidBounce is licensed under GPL-3.0. Make sure you understand the license requirements before contributing.

Setting Up Your Development Environment

LiquidBounce uses Gradle and requires Node.js for the theme development.

Prerequisites

Clone and Setup

  1. Clone the repository with submodules:
    git clone --recurse-submodules https://github.com/CCBlueX/LiquidBounce
    
  2. Navigate to the directory:
    cd LiquidBounce
    
  3. Generate sources (optional but recommended):
    ./gradlew genSources
    
  4. Open the folder as a Gradle project in your preferred IDE (IntelliJ IDEA recommended)
  5. Run the client to verify your setup:
    ./gradlew runClient
    

Code Style Guidelines

LiquidBounce uses detekt for static code analysis to maintain code quality and consistency.

Code Standards

Indentation

  • Use 4 spaces for Kotlin and Java files
  • No tabs allowed

Line Endings

  • Use LF (Unix-style) line endings
  • UTF-8 character encoding

Imports

  • No wildcard imports
  • Star imports threshold: 9999 (effectively disabled)

Braces

  • Single line: never use braces
  • Multi-line: always use braces

Detekt Configuration

The project includes a detekt configuration at config/detekt/detekt.yml with the following key rules:
  • Complexity limits: Maximum 16 cognitive complexity, 4 return statements
  • Parameter limits: Maximum 7 function/constructor parameters
  • Forbidden methods: No direct println(), use proper logging instead
  • Performance checks: Array primitive usage, unnecessary instantiation

EditorConfig

The .editorconfig file ensures consistent formatting across different editors:
[*.{kt,kts}]
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
ij_kotlin_name_count_to_use_star_import = 9999

Understanding Mixins

LiquidBounce uses Mixins to modify Minecraft classes at runtime before they are loaded. This allows us to inject code into the Minecraft client without shipping Mojang’s copyrighted code.
Learn more about Mixins in the Sponge Documentation

Pull Request Process

Before Submitting

  1. Test your changes thoroughly
  2. Run detekt to ensure code quality:
    ./gradlew detekt
    
  3. Follow the code style guidelines above
  4. Write clear commit messages describing what and why

Submitting a Pull Request

  1. Fork the repository
  2. Create a feature branch:
    git checkout -b feature/your-feature-name
    
  3. Make your changes and commit them
  4. Push to your fork:
    git push origin feature/your-feature-name
    
  5. Open a pull request on GitHub
  6. Describe your changes clearly in the PR description

What Makes a Good PR?

Clear Purpose

Explain what problem you’re solving or what feature you’re adding

Small & Focused

Keep changes focused on a single feature or fix

Well Tested

Test your changes in different scenarios

Documented

Update documentation if you’re adding new features

License Requirements (GPL-3.0)

This project is licensed under the GNU General Public License v3.0. Understanding the license is crucial.

What You Can Do

  • Use the code freely
  • Share the code with others
  • Modify the code for your needs

What You Must Do

If you use ANY code from LiquidBounce:
1

Disclose Source Code

You must disclose the source code of your modified work and the source code you took from this project.
2

No Closed Source

You are not allowed to use code from this project (even partially) in a closed-source or obfuscated application.
3

GPL License

Your modified application must also be licensed under the GPL.
This applies only to source code located directly in the clean repository. Additional dependencies may have different licenses.

Reporting Issues

Found a bug or have a feature request?
  1. Check if the issue already exists on GitHub Issues
  2. If not, create a new issue with:
    • Clear title and description
    • Steps to reproduce (for bugs)
    • Expected vs actual behavior
    • Your environment (Minecraft version, OS, etc.)

Additional Resources

GitHub Repository

View the source code and contribute

Discord Community

Get help from the community

Forum

Discuss features and get support

Stats

View project analytics

Questions?

If you have questions about contributing, feel free to ask on our Discord server or Forum.

Build docs developers (and LLMs) love