Pipe Config Card to extract blocks from items containing items (such as Banks from Bank Storage) #1022
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.
A few things to comment on:
The camouflage applying is now done entirely server-side, since item handler capabilities shouldn't be messed with on the client side. In the case of Bank Storage, they use a read-only item handler capability on the client side. Because of this, the "No _____ in inventory" actionbar was being displayed and sounds wouldn't always play because the client got a different result when extracting than the server did.
TransferHelper#extractMatching
had to get adjusted to allow for recursive item extracting.It won't go any deeper than one level though, so no backpacks inside backpacks - for example. This might be worth changing? Would be as simple as passing
true
to the recursive calls.ItemStack#matches
checks against item count which is (likely?) not intended here, changed it toItemStack#isSameItemSameComponents
to retain functionality while also fixing this.