Dump button, dumps the grid to linked inventory#228
Open
ChromaPIE wants to merge 2 commits intoGTNewHorizons:masterfrom
Open
Dump button, dumps the grid to linked inventory#228ChromaPIE wants to merge 2 commits intoGTNewHorizons:masterfrom
ChromaPIE wants to merge 2 commits intoGTNewHorizons:masterfrom
Conversation
Closed
3 tasks
Ruling-0
reviewed
Feb 6, 2026
Ruling-0
left a comment
There was a problem hiding this comment.
Sorry for the long review delay! Just a couple code quality things I think should be addressed.
Comment on lines
+442
to
+448
| for (int i = 1; i < 10; i++) { | ||
| ItemStack stack = craftMatrix.getStackInSlot(i - 1); | ||
| if (stack != null && stack.stackSize > 0) { | ||
| if (mergeItemStack(stack, 46, 46 + logic.slotCount, false)) { | ||
| craftMatrix.setInventorySlotContents(i - 1, stack.stackSize > 0 ? stack : null); | ||
| } | ||
| } |
There was a problem hiding this comment.
Ranging i from 1 to 9 to then only ever reference it as i - 1 is silly. It should iterate 0 to 8 and just be referenced as i.
| for (int i = 1; i < 10; i++) { | ||
| ItemStack stack = craftMatrix.getStackInSlot(i - 1); | ||
| if (stack != null && stack.stackSize > 0) { | ||
| if (mergeItemStack(stack, 46, 46 + logic.slotCount, false)) { |
There was a problem hiding this comment.
I get it's done a bit in this file, but this use of 46 as a magic number is hard to follow. I don't think this file warrants a refactor, but you should comment here that 46 is the index corresponding to the first slot in an attached inventory.
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.
A button on Crafting Station's UI, sweeps stuff in the grid into the adjacent inventory
WARNING
100% vibe coded & verified. See it as an issue if the impletation is shit.