port/26.3: build against release 26.3 (Blaze3D.openUri, MultiPlayerGameMode.dropItem, FAPI 0.161.0) - #986
Closed
dewmon689 wants to merge 2 commits into
Closed
port/26.3: build against release 26.3 (Blaze3D.openUri, MultiPlayerGameMode.dropItem, FAPI 0.161.0)#986dewmon689 wants to merge 2 commits into
dewmon689 wants to merge 2 commits into
Conversation
The branch was pinned to 26.3-snapshot-7. On release 26.3, Fabric API 0.156.2 fails to load: content-registries' LivingEntityMixin can no longer inject into isInCustomFluid, and the transitive-access-widener targets BlockTransformerMappings / ItemInHandRenderer are gone. 0.161.0 is the first build that loads cleanly, so raise the floor to match. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Two signatures Controlify relies on moved between 26.3-snapshot-7 and
release 26.3:
- Util.getPlatform().openUri(String) is gone; link opening now lives
in com.mojang.blaze3d.Blaze3D.openUri(URI). Five call sites in the
settings screens updated.
- LocalPlayer.drop(boolean) is gone, so the dropresult mixin's @shadow
failed to apply and the client crashed at startup. The equivalent is
MultiPlayerGameMode.dropItem(LocalPlayer, boolean), which drops
inventory.removeFromSelected(all) and swings, as drop() did. It
returns void, so report the result the way the old method did: the
drop happened iff the selected stack was non-empty beforehand.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Hey there, I just posted something in regards to this, (I think), I'm new to git and just a dumb person, so bear with me if this is useless info to you. Anyway #985 |
Owner
|
When porting, for example the Blaze3d.openUri stuff, you need to use preprocessor statements in order to not break older targets. |
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.
port/26.3currently targets26.3-snapshot-7and does not run on release26.3. Three things are needed; this PR is the two that are unambiguously
version-porting work.
Fabric API floor
0.156.2 no longer loads on release 26.3: content-registries'
LivingEntityMixinfails to inject into
isInCustomFluid, and the transitive access widenertargets
BlockTransformerMappings/ItemInHandRendererare gone. 0.161.0 isthe first build that loads cleanly, so
dep.fapiandmeta.fapi-rangeareraised to match, and
dep.minecraftmoves from the snapshot to26.3.Two moved signatures
Util.getPlatform().openUri(String)no longer exists — link opening moved tocom.mojang.blaze3d.Blaze3D.openUri(URI). Five call sites inGlobalSettingsScreenFactory/ControlifySettingsScreen.LocalPlayer.drop(boolean)no longer exists, so thedropresultLocalPlayerMixin@Shadowfails to apply and the client hard-crashes duringmixin application. The equivalent is
MultiPlayerGameMode.dropItem(LocalPlayer, boolean), which dropsinventory.removeFromSelected(all)and swings, asdrop()did. It returnsvoid, so the invoker reports what the old return value meant: the drophappened iff the selected stack was non-empty beforehand. Both callers in
InGameInputHandler(DROP_STACK and the repeating DROP_INGAME bind) rely onthat boolean, and behave the same.
Not included: SDL natives
Worth flagging separately, because it is a design question rather than a port.
With
includeNativesoff for >=26.3,SDLNativesLoader.load()falls throughloadFromControlifyNatives->loadFromLwjgl(still a stub returning empty)->
loadFromNativesInJar(disabled) ->System.loadLibrary("SDL3"), so on anyhost without a system SDL3 the mod fails with
UnsatisfiedLinkError/"Could not load SDL natives". MC 26.3 does ship SDL3 via LWJGL 3.4.3
(
org.lwjgl.sdl.SDL.getLibrary()), but adopting it is not a drop-in:SDLControllerManagerinstalls anSDL_SetEventFilterand runs its ownSDL_PollEventloop, which on a shared instance would sit on top of thewindow's own event queue. I left that alone here and kept in-jar natives
locally in order to test; happy to open a separate issue if useful.
Testing
Linux x86-64, Fabric Loader 0.19.5, release 26.3, Fabric API 0.161.0+26.3,
YACL 3.9.6+26.3-fabric. Both
runClientand a production jar in a reallauncher profile: 0 mixin failures, SDL 3.4.12 initialised, a Logitech F310
(0x046d/0xC21D) enumerated as a controller, in-game binds and the settings
screens working. NeoForge is untested and unbuildable on this branch, since
dep.neoforgeis unset for 26.3 — Fabric only.Patches written with Claude Code; commits carry a
Co-Authored-Bytrailer.