Skip to content

Latest commit

 

History

History
68 lines (55 loc) · 2.42 KB

File metadata and controls

68 lines (55 loc) · 2.42 KB

Contributing to DynamicHUD

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. Please follow the following guidelines.

1. Getting Started

Setting Up the Workspace

DynamicHUD is built on the Fabric Loader toolchain using Fabric Loom.

  1. Clone the repository:
    git clone https://github.com/tanishisherewith/DynamicHUD.git
    cd DynamicHUD
  2. Setup the Gradle environment:
    • For IntelliJ IDEA, import the folder as a Gradle project.
    • Run the task to generate Minecraft source mappings:
      gradlew genSources
  3. Run Minecraft:
    • Run the client using the run configuration generated by Loom:
      gradlew runClient

2. Coding Standards & Guidelines

Java Standards

  • Use standard Java camelCase naming conventions.
  • Maintain visibility access levels. Use package-private or protected fields appropriately for widget extensions.
  • 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.

Official Mappings

  • DynamicHUD uses Official Mojang Mappings since 1.21.11 (v4.0.0) onwards.

Core Components Reference

More to be listed later. TODO

  • Text & Truncation: To prevent option names from overflowing card limits, use Util.getTruncatedName(Component, int) and render with Util.drawTruncatedScaledText(...) or Util.drawScaledText(...).

3. Creating a Pull Request

  1. Create a Feature Branch:
    git checkout -b feature/my-new-feature
  2. Write Clean Commits:
    • Write clear, concise commit messages.
    • Separate refactoring from new features.
  3. Test Your Changes:
    • Run a clean build to make sure java compilation passes without warnings:
      gradlew clean build
    • Verify that your layout strategy matches visual guides and screen resize snapping works.
  4. Submit your PR:
    • Provide a clear description of the problem solved and links to relevant issues.
    • Add screenshots or recordings if your changes affect the GUI.

4. Code of Conduct

We expect all contributors to adhere to our Code of Conduct in all community interactions.