Skip to content

Upgrade ShaderAPI to Minecraft 26.3 - #10

Merged
CoasterFreakDE merged 1 commit into
mainfrom
codex/upgrade-minecraft-26.3
Nov 4, 2026
Merged

CoasterFreakDE merged 1 commit into
mainfrom
codex/upgrade-minecraft-26.3

Conversation

@CoasterFreakDE

@CoasterFreakDE CoasterFreakDE commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Target Minecraft 26.3 with Fabric API 0.165.2, Loader 0.20.1, and Fabric Language Kotlin 1.14.2 / Kotlin 2.4.21.
  • Upgrade Loom to 1.17.21 and the checksummed Gradle wrapper to 9.6.0; align Java and Kotlin bytecode at Java 25 and fix both CI jobs to use JDK 25.
  • Port the shader approval dialog and close paths from removed Minecraft.setScreen to Minecraft.gui.setScreen.
  • Add four packet codec tests preserving the server wire format and refresh README build/runtime instructions.

Verification

  • Full repository CI passed for head d78359d: build and dependency-submission both succeeded. The build executed main/client compilation, JAR assembly, and the test task on JDK 25.
  • Separate local compilation against Mojang's official Minecraft 26.3 JAR passed; all four packet tests passed with zero failures/skips. Every compiled Java/Kotlin class targets Java 25. A deliberate field-order mutation in an isolated copy was caught by the protocol test.
  • The original screen calls failed compilation against 26.3 before the GUI API fix. Actual 26.3 bytecode also confirms Gui.setScreen handles the normal screen lifecycle and is used by vanilla Screen.onClose.
  • Dependency versions verified against Fabric Maven metadata and Minecraft's manifest. Iris 1.11.7 for Fabric 26.3 inspected from the published JAR: existing reflective method signatures and downloaded-pack paths remain supported; Sodium 0.9.2 is the matching dependency.
  • Local full Loom execution is blocked by the workspace's Unix-domain-socket restriction before compilation, including an elevated retry. CI supplies the full project verification; no sandbox-specific workaround is included in the project.

Still requires a real client before release

  • Approval/denial, downloading and applying a valid pack, cached/duplicate requests, failed downloads, invalid shader packs, and shader reload/rendering with Iris/Sodium.
  • Compatibility of the separate Paper server plugin is not established by this client port.
  • Existing Iris behavior around full-path versus basename comparison and silent fallback after reload was not redesigned in this version port. Include those cases in the runtime checks.

CI has non-blocking warnings from existing deprecated Gradle/run configuration APIs and older GitHub Actions versions. Kept as a draft. No merge, deployment, or release.

@diffy-bot

diffy-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

Diff Summary

Overview

This change upgrades the project to target newer Minecraft/Java/tooling versions, updates build/test configuration, adjusts client API calls, adds protocol tests, and updates documentation and CI setup accordingly.


Files changed

.github/workflows/gradle.yml

  • Updated GitHub Actions JDK setup from JDK 21 -> JDK 25 in two job steps:
    • Name changed to "Set up JDK 25"
    • actions/setup-java@v4 configured with java-version: '25'

README.MD

  • Rewritten to reflect new targets and usage:
    • Clarifies this is a client-side Fabric mod that integrates with Iris.
    • New "Requirements" section:
      • Targets Minecraft 26.3 and Java 25.
      • Lists required Fabric Loader (>= 0.20.1), Fabric API for 26.3, Fabric Language Kotlin 1.14.2+kotlin.2.4.21 or newer, Iris Shaders 1.11.7 and Sodium 0.9.2 for 26.3.
      • Notes client integration disables when Iris is missing.
    • Usage updated to explain server-driven shader packs, approval prompt, and acceptance remembered by server group.
    • Adds build and run instructions:
      • Requires JDK 25, use included Gradle wrapper (./gradlew clean build), notes Windows gradlew.bat.
      • ./gradlew runClient instructions and where to place Iris/Sodium for dev.
      • Notes removal of chiseledBuild task and that build artifacts are in build/libs/.
    • Testing checklist before release added (behavioral checks, not GPU/server compatibility).

build.gradle.kts

  • Plugin versions bumped:
    • Kotlin plugin: 2.3.20 -> 2.4.21
    • Fabric Loom: 1.15.5 -> 1.17.21
  • Added JUnit dependencies for testing:
    • testImplementation platform org.junit:junit-bom:5.13.4
    • testImplementation org.junit.jupiter:junit-jupiter
    • testRuntimeOnly org.junit.platform:junit-platform-launcher
  • processResources: added inputs.property("kotlin_loader_version", project.property("kotlin_loader_version"))
  • Kotlin compilation config:
    • Previously downgraded Kotlin target; now sets compilerOptions.jvmTarget.set(JvmTarget.JVM_25)
    • Removed use of JvmTargetValidationMode import/usage
  • Added tasks.test { useJUnitPlatform() }

gradle.properties

  • Updated target versions:
    • minecraft_version=26.1.2 -> 26.3
    • loader_version=0.19.2 -> 0.20.1
    • kotlin_loader_version=1.13.10+kotlin.2.3.20 -> 1.14.2+kotlin.2.4.21
    • fabric_version=0.146.1+26.1.2 -> 0.165.2+26.3
  • No other property changes.

gradle/wrapper/gradle-wrapper.properties

  • Gradle distribution updated:
    • gradle-9.5.0-bin.zip -> gradle-9.6.0-bin.zip
  • Added distributionSha256Sum for the wrapper zip.

src/client/kotlin/com/liamxsage/shaderapi/client/ShaderReceivePayloadHandler.kt

  • Updated client screen API usage:
    • client.setScreen(...) -> client.gui.setScreen(...)
    • context.client().setScreen(null) -> context.client().gui.setScreen(null)
  • These changes reflect client GUI API differences (likely upstream Minecraft/Fabric API change).

src/main/resources/fabric.mod.json

  • Added Java requirement field:
    • "java": ">=25"
  • Minor formatting adjustment (comma).

src/test/java/com/liamxsage/shaderapi/PayloadCodecTest.java (new)

  • Added JUnit 5 tests verifying protocol codecs:
    • Tests for ShaderRequestPayload wire format (single boolean).
    • Tests for ShaderReceivePayload order (URL, hash, serverGroup) and decoding of empty group.
    • Tests for ShaderStatusResponsePayload UTF-8 format.
  • Uses net.minecraft's RegistryFriendlyByteBuf and JUnit assertions.

TL;DR

Project upgraded to Minecraft 26.3 / Java 25. Build tooling bumped (Kotlin 2.4.21, Fabric Loom 1.17.21, Gradle 9.6), GitHub Actions moved to JDK 25, Kotlin/JVM target set to 25, added JUnit tests and updated README/build instructions. Client GUI API calls and mod metadata updated to require Java 25.


Suggestions / Potential Issues

  • CI compatibility:
    • Confirm GitHub Actions runners and actions/setup-java support JDK 25 images; some hosted runners may not provide JDK 25 by default.
    • Ensure the workflow runs Gradle tasks that execute tests (tests were added, but CI job must invoke them).
  • Kotlin/JVM target:
    • Verify Kotlin 2.4.21 and Kotlin compiler support JvmTarget.JVM_25 (ensure the enum/value is valid for this Kotlin version).
  • Fabric/tooling compatibility:
    • Confirm fabric-loom 1.17.21 and the specified Fabric/Fabric Language Kotlin versions align with Minecraft 26.3 and Gradle 9.6.
  • Java requirement:
    • Adding "java": ">=25" in fabric.mod.json is appropriate, but ensure all users and CI environments are prepared to use Java 25.
  • Gradle wrapper checksum:
    • distributionSha256Sum added — ensure it matches the actual distribution to avoid CI download failures.
  • API changes:
    • The client GUI API usage change (client.gui.setScreen) should be validated across supported Minecraft client versions; update other code if similar API locations exist.

You can generate a new summary by commenting @diffy-bot.

@CoasterFreakDE
CoasterFreakDE marked this pull request as ready for review November 4, 2026 12:19
@CoasterFreakDE
CoasterFreakDE merged commit ca83595 into main Nov 4, 2026
4 checks passed
@CoasterFreakDE
CoasterFreakDE deleted the codex/upgrade-minecraft-26.3 branch November 4, 2026 12:19
@diffy-bot

diffy-bot Bot commented Nov 4, 2026

Copy link
Copy Markdown

Summary of changes

TL;DR: Project upgraded to Minecraft 26.3 / Java 25, Kotlin and Loom upgraded, Gradle wrapper bumped, CI updated to use JDK 25, README rewritten, a set of unit tests added, and some API call sites adjusted.

Key changes

  • Platform & toolchain

    • Target Minecraft bumped 26.1.2 → 26.3.
    • Java requirement raised 21 → 25.
    • Fabric Loader bumped 0.19.2 → 0.20.1.
    • Fabric API bumped to 0.165.2+26.3.
    • Kotlin loader bumped to 1.14.2+kotlin.2.4.21.
    • Kotlin Gradle plugin bumped 2.3.20 → 2.4.21.
    • Fabric Loom plugin bumped 1.15.5 → 1.17.21.
    • Gradle wrapper updated 9.5.0 → 9.6.0 and a distributionSha256Sum was added.
    • GitHub Actions workflow updated to Set up JDK 25 (actions/setup-java@v4).
  • Build and test

    • build.gradle.kts:
      • Added JUnit 5 test dependencies and configured tasks.test to use JUnit Platform.
      • Removed JvmTargetValidationMode import and switched Kotlin compiler target from JVM_24 → JVM_25.
      • Added processResources input property for kotlin_loader_version.
    • gradle.properties: updated minecraft_version, loader_version, kotlin_loader_version, fabric_version.
    • README.MD rewritten: new Requirements section (explicitly states Minecraft 26.3 and Java 25), new build/run instructions, developer checklist and compatibility notes.
  • Runtime / mod metadata

    • fabric.mod.json: added "java": ">=25" and ensured minecraft property remains set to ${minecraft_version}.
  • Code changes

    • ShaderReceivePayloadHandler.kt: replaced usages of client.setScreen(...) with client.gui.setScreen(...) (adjusted calls to set/clear screens).
    • New unit tests: src/test/java/com/liamxsage/shaderapi/PayloadCodecTest.java added with tests for wire formats and codec round-trips for ShaderRequestPayload, ShaderReceivePayload, ShaderStatusResponsePayload.

Files changed (high level)

  • .github/workflows/gradle.yml

    • Update Set up JDK 21 → Set up JDK 25 (java-version: '21' → '25').
  • README.MD

    • Major rewrite: clarified project purpose, added Requirements for MC 26.3 & Java 25, updated build/run instructions, removed old multi-version build notes and replaced with current guidance.
  • build.gradle.kts

    • Kotlin and Loom plugins upgraded, JUnit test support added, Kotlin JVM target bumped, removed JVM target validation config.
  • gradle.properties

    • Updated versions for minecraft_version, loader_version, kotlin_loader_version, fabric_version.
  • gradle/wrapper/gradle-wrapper.properties

    • distributionUrl -> gradle-9.6.0-bin.zip
    • added distributionSha256Sum
  • src/client/kotlin/.../ShaderReceivePayloadHandler.kt

    • Replaced client.setScreen(...) calls with client.gui.setScreen(...).
    • Minor refactor to use client variable's gui property.
  • src/main/resources/fabric.mod.json

    • Added "java": ">=25" to the "depends" section.
  • src/test/java/com/liamxsage/shaderapi/PayloadCodecTest.java

    • New test file with multiple unit tests validating codec wire formats.

Suggestions / Notes

  • CI and developer environments must provide Java 25 (Temurin or other) — ensure GitHub Actions runners have JDK 25 available and that any local dev machines are updated.
  • Verify that Fabric Loom 1.17.21 and Kotlin 2.4.21 work together and that Kotlin targeting JVM_25 is fully supported by the upgraded Kotlin plugin and toolchain.
  • Confirm the Gradle wrapper SHA is correct for your distribution; mismatched SHA will break the wrapper validation.
  • The change client.setScreen → client.gui.setScreen assumes the client API mapping exposes gui.setScreen. Confirm the mapping/MC version used by the project uses that property; otherwise this may cause runtime errors.
  • Adding "java": ">=25" in fabric.mod.json will prevent older Java runtimes from launching the mod — ensure this is intended for all target users.
  • Run the new JUnit tests locally and in CI (tests added) and verify test classpath is correctly set with the chosen Minecraft/test environment.

You can generate a new summary by commenting @diffy-bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant