Conversation
Owner
|
Hello @SpaceSyt , Thank you for taking the time to put this together. Since it was made using AI, I may take some extra time to verify the changes, but at a quick glance it looks good to go. |
SpaceSyt
marked this pull request as ready for review
July 24, 2026 09:00
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.
Fixes #83.
Problem
Item Scroller replaces
MerchantMenu#getOffers()with a custom trade list using a cancellableHEADinjection. Visible Traders previously used@ModifyReturnValueatRETURN, so its combined unlocked + locked offer list was bypassed whenever Item Scroller returned early.This also interacts with TweakerMore's
villagerOfferUsesDisplayfeature. TweakerMore reads the offer list from an injected tooltip path. Once Visible Traders rendered a button for a locked offer, TweakerMore could use that button index against Item Scroller's shorter list and crash with anIndexOutOfBoundsException.Fix
MerchantMenu#getOffers()method with MixinExtras@WrapMethod, so the combined list can be returned even when another injection cancels the original method.TradeOfferButton#extractToolTipcall in that scope and release it infinally. This ensures vanilla and injected tooltip code, including TweakerMore, see the same list for the full tooltip call.Validation
villagerOfferUsesDisplayenabledfabricbranch checks passed locally:compileJavacompileFabricJavafabricJarThe change has not been game-tested on Minecraft 26.2 or NeoForge.
AI disclosure
The investigation and implementation were written with OpenAI Codex using GPT-5.6 Sol with high reasoning effort, followed by in-game validation on Minecraft 26.1.2 Fabric.