Add support for Quilt Loader and QSL/QFAPI#988
Closed
XXMA16 wants to merge 2 commits intoChocohead:llamafrom
Closed
Add support for Quilt Loader and QSL/QFAPI#988XXMA16 wants to merge 2 commits intoChocohead:llamafrom
XXMA16 wants to merge 2 commits intoChocohead:llamafrom
Conversation
XavierHale
approved these changes
Mar 12, 2023
|
After some testing, everything appears to work correctly except for HandItemRendering, which initiates a crash when eating food and drawing an arrow (for instance) on 1.19.4. I’m assuming it all works accordingly on 1.19.3 and below, when testing was conducted. Just thought I should throw this out there, in case you wanted to make any modifications to this PR. Other than this issue, I haven’t been able to identify any other conflicts that this PR poses. |
|
#1116 will also be closed by this PR when ready / if merged. |
a4d4cc3 to
b6e4f7c
Compare
Author
|
Note to self: rebase is evil |
Author
|
Quilt is dead |
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.
Might not be ready for merge
The goal of this PR is to allow players to use Quilt Loader + QSL alongside Optifabric without causing any additional issues compared to using Fabric Loader + Fabric API.
closes #751 and #899
Note: I will be calling Quilt Standard Libraries/Quilted Fabric API the same since, although they are different repos, there exists a single mod implementation.
I tested the following versions with Quilt Loader 0.17.11 and 0.18.3 and I haven't encountered any issues:
The versions in italics seem to start extremely slowly when using Quilt Loader 0.17.* or 0.16.1. I have not tested all of the loader versions, however it seems the startup is painfully slow on anything <0.18.
QSL exists only for versions >=1.18.2
Overcoming issues
Getting the game to start
The main problem with running Optifabric on Quilt Loader was its reliance on deprecated internal Fabric Loader APIs. By checking if Quilt is present and, if so, not using those internal APIs, this issue can be easily circumvented, allowing the game to start normally.
Getting Quilt Standard Libraries to work
QSL makes use mostly of Fabric API mixins, so there aren't many issues to fix (in theory at least).
GameRendererMixinrequires its ownInterceptingMixindue to slightly differentonBeforeRenderScreenandonAfterRenderScreencallback injectors.ItemStack.isOf(Items.CROSSBOW)toinstanceof CrossbowIteminside therenderFirstPersonItemmethod.HeldItemRendererFixreplaces the Optifine method with the vanilla one and re-adds Optifine's checkShaders.isSkipRenderHandat the head of the method. As far as I noticed, Optifine doesn't add any other behavioural changes.HeldItemRendererFixwill run whether or not QSL is present at runtime.fabric-xthe version ofquilted_fabric_xwill be returned instead. As such,OptifabricSetupwill explicitly check if the quilted version of the mod is present, without checking the version, because even the lowest QSL mod version is based on a Fabric API version whose modules satisfy every version check inOptifabricSetup