Thank you for your interest in contributing to PerformTracker!
- Bug Reports: Report issues on GitHub with steps to reproduce (or logs)
- Feature Requests: Suggest new features or improvements
- Pull Requests: Submit code changes (see guidelines below)
- Documentation: Improve docs or translate into other languages
Note
AI-assisted contributions are welcome, but must undergo human review before merging. PRs generated solely by AI without human review will not be accepted.
Warning
AI Code Licensing: Be aware that AI-generated code may have unclear or incompatible licenses. Many AI models output code with restrictions that conflict with Apache 2.0. You are responsible for ensuring AI-generated contributions are properly licensed.
When using AI tools to assist with code:
- Check AI model licensing
- Review all AI-generated changes thoroughly
- Ensure code follows project patterns and style
- Test changes before submitting
- Be prepared to explain and justify AI-generated code
- Java 21 or higher
- Git
- Recommended IDE: IntelliJ IDEA
If you wish to port the mod to another version of Minecraft, please note the mapping.
| Minecraft Version | Mappings |
|---|---|
| 1.21.11 and older | Yarn |
| 26.1 and above | Mojang Mappings |
References:
git clone https://github.com/WhatDamon/PerformTracker.git
cd PerformTracker
./gradlew buildThe JAR will be in build/libs/.
- Follow existing code patterns in the project
- Use meaningful variable and method names
- Avoid unnecessary comments or docstrings
- Prefer code reuse - leverage existing utilities and patterns before adding new code
- Run the following commands before submitting PR
./gradlew check./gradlew test./gradlew checkstyleMain./gradlew checkstyleClient./gradlew checkstyleTest
- Fork the repository and create a feature branch
- Test your changes locally
- Write tests when necessary - new features or bug fixes should have appropriate test coverage
- Keep changes focused - one feature or fix per PR
- Update documentation if needed
Please use clear, concise PR titles:
type: short description
Types:
feat: New featurefix: Bug fixrefactor: Code restructuring (no behavior change)docs: Documentation changestest: Test additions/changesstyle: Code style changeschore: Maintenance tasksworkflow: Workflow changes (including CI/CD changes)
This project uses a hybrid TCP/UDP network architecture:
- HTTP (TCP) -
/api/deviceinfoendpoint for device queries - UDP - Fire-and-forget metrics transmission
When modifying network code, be aware of:
HttpServerManager.java- HTTP server for device infoUdpMetricsClient.java- UDP client for metrics- Config validation in
ConfigAccess.java
./gradlew testUse the test scripts in tools/:
# Test UDP metrics
python tools/test_udp_server.py --port 31416For /api/deviceinfo, simply access it through web browser to test, or using curl.
Check out more details at Network API
The project supports following languages:
- English (
en_us.json) - Simplified Chinese (
zh_cn.json) - Traditional Chinese (
zh_tw.json) - Classical Chinese (
lzh.json)
You're welcome to add new languages which are supported by Minecraft!
This project is licensed under Apache License 2.0.
When contributing code, you must ensure:
- Include License Header: All new source files must include the Apache 2.0 license header:
/*
* Copyright [YEAR] Damon Lu and open-source contributors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/-
Third-Party Code: Only submit code that you have the right to contribute. If using third-party libraries or code snippets:
- Ensure they are compatible with Apache 2.0
- Provide appropriate attribution if required
- Do not introduce incompatible licenses
-
No Additional Restrictions: Do not submit code that imposes additional restrictions beyond Apache 2.0.
The Apache 2.0 license allows you to:
- Use the code commercially
- Modify and distribute
- Patent grants
While requiring:
- Attribution
- Clear indication of changes
- Inclusion of license notice
Feel free to open an issue for questions or discussions.