Skip to content

Improve interaction between locked drawers and dynamic item responder chip#75

Merged
Dream-Master merged 2 commits intoGTNewHorizons:masterfrom
Dragovorn:dynamic-item-responder
Apr 10, 2026
Merged

Improve interaction between locked drawers and dynamic item responder chip#75
Dream-Master merged 2 commits intoGTNewHorizons:masterfrom
Dragovorn:dynamic-item-responder

Conversation

@Dragovorn
Copy link
Copy Markdown

When a locked drawer has an item type assigned to it but is otherwise empty (e.g. locked to cobblestone, but storing 0 cobblestone) the dynamic item responder chip will not route items into it. This PR fixes that and will allow the dynamic item responder to accept any item that it detects is within the inventory.

Reproduction Steps:

  • Create drawer/drawer controller, connect with interface pipe + dynamic item responder chip
  • lock drawer to an item type, and make sure that it's storing 0 items of that type
  • attempt to import an item of that type into the drawer

Copy link
Copy Markdown

@spacebuilder2020 spacebuilder2020 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine to me. Make sure this is tested and approved by a tester though since I can't review on the interaction portion but at a glance, this seems like a good change that will fix a specific bug.

@spacebuilder2020
Copy link
Copy Markdown

@Dragovorn is there a reason you are doing an inline method instead of overriding the hasItem method?
Is there logic that needs to use the base method and other logic that needs to use the inline filter?

I was looking into the source of the code and notice this other class extending InvWrapper that is overriding the hasItem method.

@Dragovorn
Copy link
Copy Markdown
Author

I was avoiding making a change that was too sweeping because I was afraid of unintended side-effects.

@spacebuilder2020
Copy link
Copy Markdown

Alright, that was what I figured, thanks for confirming

@spacebuilder2020
Copy link
Copy Markdown

Having trouble replicating issue, tested with new build and an older build (4.12.27) and both builds route cobblestone to the drawer with 0 items in it. Might be possible that this merged PR has an effect.
9e2c506#diff-3a4f2d412d921c7d48af15d1a4e237aee6a7265db678921c9012f27254800758R75

@Dragovorn
Copy link
Copy Markdown
Author

Dragovorn commented Apr 9, 2026

Oh thanks for digging that up; that makes sense, I built this patch a little bit ago against v4.11.12. I was getting ready to update my singleplayer so I was making sure to submit all the patches I was playing with at the time.

Sorry for taking your time!

@spacebuilder2020
Copy link
Copy Markdown

No worries, it probably still is a good patch for other elements like jabba barrels, not just this specific bug, so I will test with it more

@Dream-Master Dream-Master merged commit 0241472 into GTNewHorizons:master Apr 10, 2026
1 check passed
@spacebuilder2020
Copy link
Copy Markdown

Going to keep an eye on this. This change is probably benign but I am slightly concerned about bypassing the hasItem method since it is implemented and can be overridden by mod drivers.

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.

3 participants