Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Robot Arm Keep Exact functionality with item pipes #2897

Merged

Conversation

BryanSer
Copy link
Contributor

@BryanSer BryanSer commented Feb 22, 2025

What

Fixes #2799
This PR fixes an item count calculation issue in RobotArmCover's KEEP_EXACT transfer mode. The previous implementation didn't properly verify if the items being moved matched the target slot's contents, leading to incorrect item quantity returns.

Implementation Details

  • Removed the redundant isStackSpecific parameter from countStack method
  • Revised item matching logic to require both:
    • ItemStack matching (using ItemStackHashStrategy.comparingAllButCount)
    • Filter test from RobotArmCover
  • Simplified conditional checks in item counting logic

Outcome

  • Correctly verifies item type matches before counting items in destination container
  • Ensures RobotArmCover's KEEP_EXACT mode only counts matching items that pass its filter

@BryanSer BryanSer requested a review from a team as a code owner February 22, 2025 02:01
@BryanSer BryanSer force-pushed the bryan33/fix_robot_arm_keep_exact branch from a00e154 to 39e28e4 Compare February 23, 2025 13:04
Copy link
Contributor

@omergunr100 omergunr100 left a comment

Choose a reason for hiding this comment

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

logic looks good but run spotlessApply

@omergunr100 omergunr100 changed the title Fix item pipe with robot arm keep exact not work, https://github.com/… Fix item pipe with robot arm keep exact not work Feb 23, 2025
@BryanSer BryanSer requested a review from omergunr100 February 24, 2025 00:42
@BryanSer
Copy link
Contributor Author

I'll fix it tonight, thanks for feedback.

@umajho
Copy link

umajho commented Feb 25, 2025

I can confirm that KEEP_EXACT works with multiple filtered items now. Thank you.
I believe that this fix will benefit processing line design a lot. I'm gonna replace the jar included in the modpack I'm playing with the one built from this PR immediately, so that I don't need to wait for the next release.

@BryanSer BryanSer force-pushed the bryan33/fix_robot_arm_keep_exact branch from 78431ae to 49e398f Compare February 27, 2025 06:56
@BryanSer BryanSer requested a review from omergunr100 February 28, 2025 03:48
@krossgg krossgg added the type: bugfix general bug fixes label Feb 28, 2025
@krossgg krossgg changed the title Fix item pipe with robot arm keep exact not work Fix Robot Arm Keep Exact functionality with item pipes Mar 2, 2025
@YoungOnionMC YoungOnionMC merged commit 287c92b into GregTechCEu:1.20.1 Mar 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bugfix general bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Robot Arms filtering on keep exact still not working
5 participants