Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/modrinth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,19 @@ jobs:
fabric-api
modmenu
yacl

- name: Publish 26.3
uses: BreadMoirai/mc-publish@master
with:
modrinth-token: ${{ secrets.M_TOKEN }}
files: build/libs/${{ env.MOD_VERSION }}/one-click-anvil-${{ env.MOD_VERSION }}+26.3*.jar
name: "${{ env.MOD_VERSION }}+26.3"
version: "${{ env.MOD_VERSION }}+26.3"
version-type: release
loaders: fabric
game-versions: "26.3"
java: 25
dependencies: |
fabric-api
modmenu
yacl
238 changes: 119 additions & 119 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,120 +1,120 @@
# User-specific stuff
.idea/

*.iml
*.ipr
*.iws

# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db

# Dump file
*.stackdump

# Folder config file
[Dd]esktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp

# Windows shortcuts
*.lnk

.gradle
build/

# Ignore Gradle GUI config
gradle-app.setting

# Cache of project
.gradletasknamecache

**/build/

# Common working directory
run/

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
/remappedSrc/
# User-specific stuff
.idea/
*.iml
*.ipr
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Compiled class file
*.class
# Log file
*.log
# BlueJ files
*.ctxt
# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
.gradle
build/
# Ignore Gradle GUI config
gradle-app.setting
# Cache of project
.gradletasknamecache
**/build/
# Common working directory
run/
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
/remappedSrc/
/net/
24 changes: 23 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,23 @@ Fabric mod that auto-applies the anvil rename (one-click anvil). Multi-version v
## Versions

- **1.21.x line** (1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11): normal `fabric-loom-remap` + Mojang-mappings path, Java 21, `build.gradle.kts`, `transformUnnamedVars` on switch.
- **26.x line** (26.1, 26.1.1, 26.1.2, 26.2 — `26.2` is the `vcsVersion`; shared `src/` holds its code): un-obfuscated / JDK-25 toolchain. Registered in `settings.gradle.kts` via `versions("26.2", "26.1.2", "26.1.1", "26.1").buildscript("build.unobf.gradle.kts")` (plain `fabric-loom`, no Mojang mappings, `restoreUnnamedVars` on switch, `jar` not `remapJar`). The 26.1.x patches are API-identical to 26.1, so there is no source divergence between them — the `26.1` swap entry covers them all since `sc.current.parsed >= "26.1"`.
- **26.x line** (26.1, 26.1.1, 26.1.2, 26.2, 26.3 — `26.3` is the `vcsVersion`; shared `src/` holds its code): un-obfuscated / JDK-25 toolchain. Registered in `settings.gradle.kts` via `versions("26.3", "26.2", "26.1.2", "26.1.1", "26.1").buildscript("build.unobf.gradle.kts")` (plain `fabric-loom`, no Mojang mappings, `restoreUnnamedVars` on switch, `jar` not `remapJar`). The 26.1.x patches are API-identical to 26.1, so there is no source divergence between them — the `26.1` swap entry covers them all since `sc.current.parsed >= "26.1"`.
- **26.2 API divergences** (handled inline because they are not single-token renames, so they can't be swaps):
- `Minecraft.setScreen(Screen)` → `Minecraft.setScreenAndShow(Screen)` — inline `//? if >=26.2` block in `config/OneClickAnvilConfigScreen.java`.
- The public `Minecraft.screen` field was removed; the current screen is now read via `Minecraft.gui.screen()` (`net.minecraft.client.gui.Gui`, with the public `Minecraft.gui` field). Routed through the version-conditional `ConfigHelper.currentScreen(Minecraft)` test helper (a bare `setScreen`/`screen` swap would collide with `ClientGameTestContext.setScreen` and local `screen` vars).
- **26.3 API divergences:**
- **GLFW is gone — MC 26.3 windows through SDL** (`org.lwjgl:lwjgl-sdl` replaces `lwjgl-glfw` in the
version manifest), so `org.lwjgl.glfw.GLFW` no longer resolves. The test code's key/mouse
constants now come from `com.mojang.blaze3d.platform.InputConstants`
(`KEY_ESCAPE`, `MOUSE_BUTTON_LEFT`), which exists unchanged on every supported version — plain
shared code, no condition or swap.
- **Fabric client-gametest API 6.x** (26.3's fabric-api pulls `fabric-client-gametest-api-v1 6.0.7`)
dropped `TestClientLevelContext`: `TestSingleplayerContext.getClientLevel()` became
`getConnection()` (`TestServerConnection`, which is what now carries `waitForChunksDownload()`,
`getClientLevel()`, `getServerLevel()`, ...). Handled by a `"26.3"` swap entry.
- The swap map is ordered **newest first** so the reverse chain unwinds correctly: `getClientWorld`
-> `getClientLevel` (26.1) -> `getConnection` (26.3) has to be undone newest-rename-first when
switching down to 1.21.x.
- **Flat, non-versioned layout still holds:** no `vXX_Y` packages. The 26.1 API divergence is handled entirely by **simple identifier swaps** in `stonecutter-swaps.gradle.kts` (shared `src/` keeps the 1.21.x name; the swap promotes it when `current >= 26.1`):
- `ClickType` → `ContainerInput` (`net.minecraft.world.inventory`)
- `handleInventoryMouseClick` → `handleContainerInput` (`MultiPlayerGameMode`)
Expand All @@ -46,6 +59,15 @@ cmd.exe /c gradlew.bat "Set active project to 26.1"

- `:build` always FAILS (game tests use `runTestClient`, not JUnit) — expected.
- Tests run via `:<version>:runTestClient` (client gametest API, MC >= 1.21.4). 26.1 runs on JDK 25, 1.21.x on JDK 21.
- Running **all** versions: `cmd.exe /c gradlew.bat runTestClient --max-workers=4`. **Cap at 4** —
each task launches a real Minecraft client, and beyond about four in parallel they contend for
GPU/window resources and some clients hang permanently (the build never finishes; the stuck JVMs
have to be killed with `taskkill /F /IM java.exe /T`, which also takes out the Gradle daemons).
- **26.x Windows JVM stack crash (fixed):** `build.unobf.gradle.kts` passes
`-XX:+UnlockDiagnosticVMOptions -XX:+AlwaysPreTouchStacks` to every loom run. Without it, 10–50% of
26.x client launches die in the first resource reload (`NTSTATUS 0xC0000005`, no `hs_err`) from a
HotSpot-on-Windows stack-growth bug — not mod code. Do not remove the flag. Full write-up: `update`
skill → `references/api-divergences.md` → "26.x client startup crash on Windows".
- A "Set active project" or compile occasionally dies with a transient WSL2 I/O error / quick `BUILD FAILED` — just retry (run `./gradlew --stop` first if it persists).

## Adding versions
Expand Down
Loading
Loading