Skip to content

Port to Minecraft 26.2 - #3

Open
colserra1 wants to merge 1 commit into
Nordes314:mainfrom
colserra1:26.2-port
Open

Port to Minecraft 26.2#3
colserra1 wants to merge 1 commit into
Nordes314:mainfrom
colserra1:26.2-port

Conversation

@colserra1

@colserra1 colserra1 commented Aug 11, 2026

Copy link
Copy Markdown

Minecraft ships unobfuscated from 26.1 on, so there is no yarn or intermediary for 26.2 and mods now compile directly against Mojang names. This ports the 1.21.11 source across that boundary.

Build:

  • net.fabricmc.fabric-loom 1.17.+ (the legacy fabric-loom plugin id keeps a compatibility path that still demands a mappings dependency and fails)
  • no mappings dependency; mod deps use the plain configurations, since the mod* ones invoke Loom's remapper
  • Java 25, Gradle 9.6.1, and gradle/gradle-daemon-jvm.properties because Loom requires the Gradle daemon itself to run on Java 25
  • remapJar/remapSourcesJar no longer exist, so the plain jar tasks are published
  • fabric.mod.json depends on fabric-api rather than the dropped fabric alias

Notable API changes handled:

  • InGameHud split into Gui (screens: screen()/setScreen) and Hud (getChat(), getGuiTicks()); Minecraft.screen is gone
  • GuiGraphics -> GuiGraphicsExtractor; Renderable.render -> extractRenderState; AbstractWidget.renderWidget -> extractWidgetRenderState; drawString -> text, drawCenteredString -> centeredText
  • EditBox: getText/setText -> getValue/setValue, write -> insertText, getCursor -> getCursorPosition, setSelectionEnd -> setHighlightPos
  • GuiMessage/GuiMessageTag moved to client.multiplayer.chat; GuiMessage gained a GuiMessageSource component
  • ChatHud$Interactable replaced by ChatComponent$DrawingFocusedGraphicsAccess, a Consumer<Style>, which is now where the hovered style is captured
  • ChatFormatting no longer carries a colour; use TextColor.fromLegacyFormat
  • Screen.handleClickEvent -> defaultHandleClickEvent; Screen's inherited Minecraft field is minecraft
  • GuiGraphics.renderComponentHoverEffect is gone; SHOW_TEXT hovers are drawn with setTooltipForNextFrame instead

Verified by launching a 26.2 client: all mods load, no mixin failures, reaches the main menu. Possible z-fighting with other HUD mods; not verified. Unclear if setTooltipForNextFrame behaves the same way as the old hover effects. Free-movement chat hotkey could cause issues as well, untested with Gui.setScreen.

Minecraft ships unobfuscated from 26.1 on, so there is no yarn or intermediary
for 26.2 and mods now compile directly against Mojang names. This ports the
1.21.11 source across that boundary.

Build:
 - net.fabricmc.fabric-loom 1.17.+ (the legacy `fabric-loom` plugin id keeps a
   compatibility path that still demands a `mappings` dependency and fails)
 - no `mappings` dependency; mod deps use the plain configurations, since the
   `mod*` ones invoke Loom's remapper
 - Java 25, Gradle 9.6.1, and gradle/gradle-daemon-jvm.properties because Loom
   requires the Gradle daemon itself to run on Java 25
 - remapJar/remapSourcesJar no longer exist, so the plain jar tasks are published
 - fabric.mod.json depends on `fabric-api` rather than the dropped `fabric` alias

Notable API changes handled:
 - InGameHud split into Gui (screens: screen()/setScreen) and Hud (getChat(),
   getGuiTicks()); Minecraft.screen is gone
 - GuiGraphics -> GuiGraphicsExtractor; Renderable.render ->
   extractRenderState; AbstractWidget.renderWidget -> extractWidgetRenderState;
   drawString -> text, drawCenteredString -> centeredText
 - EditBox: getText/setText -> getValue/setValue, write -> insertText,
   getCursor -> getCursorPosition, setSelectionEnd -> setHighlightPos
 - GuiMessage/GuiMessageTag moved to client.multiplayer.chat; GuiMessage gained
   a GuiMessageSource component
 - ChatHud$Interactable replaced by ChatComponent$DrawingFocusedGraphicsAccess,
   a Consumer<Style>, which is now where the hovered style is captured
 - ChatFormatting no longer carries a colour; use TextColor.fromLegacyFormat
 - Screen.handleClickEvent -> defaultHandleClickEvent; Screen's inherited
   Minecraft field is `minecraft`
 - GuiGraphics.renderComponentHoverEffect is gone; SHOW_TEXT hovers are drawn
   with setTooltipForNextFrame instead

Verified by launching a 26.2 client: all mods load, no mixin failures, reaches
the main menu. Possible z-fighting with oder HUD mods; not verified.
Unclear if setTooltipForNextFrame behave the same was the old hover effects.
Free-movement chat hotkey could cause issues as well, untested with Gui.setScreen.
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