You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anyone is free to commit and make pull requests. Just make sure that you are well documenting your code and making necessary changes.
4
-
Also please review your changes for any bugs that may occur.
3
+
Thank you for your interest in contributing to DynamicHUD! We welcome all contributions, including bug fixes, feature suggestions, documentation updates, and new widget types or context menu skins.
4
+
Please follow the following guidelines.
5
+
---
6
+
7
+
## **1. Getting Started**
8
+
9
+
### **Setting Up the Workspace**
10
+
DynamicHUD is built on the **Fabric Loader** toolchain using **Fabric Loom**.
- For IntelliJ IDEA, import the folder as a Gradle project.
18
+
- Run the task to generate Minecraft source mappings:
19
+
```bash
20
+
gradlew genSources
21
+
```
22
+
3. **Run Minecraft**:
23
+
- Run the client using the run configuration generated by Loom:
24
+
```bash
25
+
gradlew runClient
26
+
```
27
+
28
+
---
29
+
30
+
## **2. Coding Standards & Guidelines**
31
+
32
+
### **Java Standards**
33
+
- Use standard Java camelCase naming conventions.
34
+
- Maintain visibility access levels. Use package-private or `protected` fields appropriately for widget extensions.
35
+
- Do not check in raw absolute coordinates in widgets or hardcoded resolution values. Use the snap-alignment and ratio-anchored dynamic coordinate updates from `Widget.java`.
36
+
37
+
### **Official Mappings**
38
+
- DynamicHUD uses **Official Mojang Mappings** since 1.21.11 (`v4.0.0`) onwards.
39
+
40
+
### **Core Components Reference**
41
+
> More to be listed later. TODO
42
+
- **Text & Truncation**: To prevent option names from overflowing card limits, use `Util.getTruncatedName(Component, int)` and render with `Util.drawTruncatedScaledText(...)` or `Util.drawScaledText(...)`.
43
+
44
+
---
45
+
46
+
## **3. Creating a Pull Request**
47
+
48
+
1. **Create a Feature Branch**:
49
+
```bash
50
+
git checkout -b feature/my-new-feature
51
+
```
52
+
2. **Write Clean Commits**:
53
+
- Write clear, concise commit messages.
54
+
- Separate refactoring from new features.
55
+
3. **Test Your Changes**:
56
+
- Run a clean build to make sure java compilation passes without warnings:
57
+
```bash
58
+
gradlew clean build
59
+
```
60
+
- Verify that your layout strategy matches visual guides and screen resize snapping works.
61
+
4. **Submit your PR**:
62
+
- Provide a clear description of the problem solved and links to relevant issues.
63
+
- Add screenshots or recordings if your changes affect the GUI.
64
+
65
+
---
66
+
67
+
## **4. Code of Conduct**
68
+
We expect all contributors to adhere to our [Code of Conduct](CODE_OF_CONDUCT.md) in all community interactions.
0 commit comments