feat: add Minecraft 26.2 (Fabric) support - #92
Open
Shirakawa-Kotone wants to merge 2 commits into
Open
Conversation
Port FlightAssistant to Minecraft 26.2, which replaced the immediate-mode GuiGraphics rendering with a CPU-side render-state (extraction) model. - Update the toolchain: Kotlin 2.4.10, modstitch 0.8.5, fabric-loom 1.15.5 - Target the correct Java version per MC version (25 for 26.x, 21 for 1.20.6+, 17 for older versions) - Wire modstitch-generated (preprocessed) sources into the compile source set - Add a 26.2-fabric version directory - Port the HUD to GuiGraphicsExtractor / extractRenderState on 26.x (GuiGraphicsCompat26 shims, GuiMixinHud26, Screen/Gui/Hud extraction hooks) - Adapt the LevelRenderer / Camera mixins for the new render() signature and CameraRenderState - Fix ScreenSpace world-to-screen projection under the 26.x reversed-Z depth buffer by rejecting points at or behind the camera plane (clip.w <= 0)
The 26.x port added unconditional imports of compatibility extensions (setScreen, screen, overlay, color, render) that only exist on 26+ (defined in GuiGraphicsCompat26.kt). On older versions these resolve to vanilla members, so the imports must only be present on 26+. Also make GuiMixinHud26 (which targets net.minecraft.client.gui.Hud, renamed from Gui in 26.x) a @pseudo mixin with a string target so it compiles and is safely skipped on older versions where Hud does not exist.
Shirakawa-Kotone
force-pushed
the
mc-26.2-support
branch
from
August 8, 2026 01:16
02ab620 to
83ac298
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for Minecraft 26.2 (Fabric), which replaced the immediate-mode
GuiGraphicsrendering with a CPU-side render-state (extraction) model.All changes are guarded with stonecutter version conditionals (
//? if >=26), so the existing 1.20.1–1.21.11 versions are preserved and 26.2 is added as an additional supported version.What changed
versions/26.2-fabricversion directoryGuiGraphicsExtractorshims inGuiGraphicsCompat26.kt, newGuiMixinHud26hook onHud.extractRenderState,extractContents/extractContent/extractRenderStateadaptations for screens, buttons and widgetsLevelRenderer.render(renamed fromrenderLevel) withCameraRenderState,Cameraaccessor viagameRenderer.mainCamera()pos.zrange) — points behind the camera were mirrored back into view.ScreenSpace.fromWorldSpacenow rejects points at/behind the camera plane (clip.w <= 0)Validation
:26.2-fabric:buildsucceeds; the mod runs in-game on 26.2 (HUD, arrows, projection all verified).:1.21.11-fabric:buildverified — the 26.x-only compat imports are version-gated andGuiMixinHud26is a@Pseudomixin so older versions still compile.