# Weed Mod Template Generator

The generator in this folder is a static GitHub Pages site. It runs fully in the browser and creates a starter Weed mod zip without a backend.

## Publish on GitHub Pages

1. Push the repository to GitHub.
2. Open the repository settings.
3. Go to **Pages**.
4. Select the `26.1.2` branch.
5. Select the `/docs` folder.
6. Save and open the Pages URL GitHub gives you.

## Generate a Mod

1. Open the generator page.
2. Enter the mod name, id, package, class name, author, and versions.
3. Choose optional examples:
   - Tick event
   - Block break event
   - Experimental mixin config
   - README
4. Click **Download Zip**.
5. Extract the zip.

## Version Registry

Open the **Versions** section on the page to see selectable values loaded from GitHub branches.
Each branch can expose a `versions.web.weed` file in the repository root:

```ini
[MINECRAFT]
version=26.1.2

[WEED]
api_version=1.0.0 Beta
loader_version=1.0.0
```

The generator scans repository branches, reads every available `versions.web.weed`, and fills the Minecraft, Weed API, and loader version dropdowns automatically.

## Build the Generated Mod

Build Weed first:

```bat
.\gradlew.bat --no-daemon buildAll
```

Then build the generated mod:

```bat
.\gradlew.bat build packageWeedMod
```

If the generated mod is not next to the Weed repo, pass the local Weed repo path:

```bat
.\gradlew.bat build packageWeedMod -PweedHome=C:\Users\amesa\Desktop\Weed
```

## Install the Mod

Copy the generated jar into:

```text
%APPDATA%\.minecraft\mods\weed
```

Launch Weed and check:

```text
%APPDATA%\.minecraft\logs\weed-*.txt
```

You should see your mod id, lifecycle logs, and any event logs enabled in the template.

## Notes

- The template targets Minecraft Java `26.1.2`.
- It compiles with Java toolchain `26` and `options.release = 25`.
- Mixin generation is included as an experimental starter shape. Treat it as a config/class scaffold until Weed's mixin runtime is promoted from experimental.
- Full searchable API docs are available at `api.html` in the GitHub Pages site.
