Port to Minecraft 26.2 - #1
Open
colserra1 wants to merge 1 commit into
Open
Conversation
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.
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.
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:
fabric-loomplugin id keeps a compatibility path that still demands amappingsdependency and fails)mappingsdependency; mod deps use the plain configurations, since themod*ones invoke Loom's remapperfabric-apirather than the droppedfabricaliasNotable API changes handled:
minecraftVerified 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.