Fix Quantum Chest voiding items near maximum capacity#1724
Open
ALongStringOfNumbers wants to merge 1 commit intoGregTechCE:masterfrom
Open
Fix Quantum Chest voiding items near maximum capacity#1724ALongStringOfNumbers wants to merge 1 commit intoGregTechCE:masterfrom
ALongStringOfNumbers wants to merge 1 commit intoGregTechCE:masterfrom
Conversation
serenibyss
approved these changes
Oct 31, 2021
serenibyss
added a commit
to GregTechCEu/GregTech
that referenced
this pull request
Oct 31, 2021
https: //github.com/GregTechCE/GregTech/pull/1724 Co-Authored-By: ALongStringOfNumbers <31759736+ALongStringOfNumbers@users.noreply.github.com>
eutro
approved these changes
Nov 2, 2021
Exaxxion
added a commit
to Nomifactory/Nomifactory
that referenced
this pull request
Jan 28, 2022
Pending GTCE PRs: GregTechCE/GregTech#1623 GregTechCE/GregTech#1724 GregTechCE/GregTech#1733 Lang file adjustment: Fixes #852 by overriding the electrolyzer name in lang files All changes source code is here: Nomifactory/GregTech@master...bansoukou
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.
What:
This PR fixes an issue where the quantum chest would void items when near maximum capacity in certain situations.
This fix is done by preventing returning early when trying to insert more items than the available remaining space, resulting in the item merge actually proceeding.
This bug was produced using the following conditions:
Give yourself a quantum chest full of iron ingots using the command
/give @p gregtech:machine 1 1010 {ItemAmount: 4096064L, ItemStack: {id: "minecraft:iron_ingot", Count: 1, Damage: 0}}Place the chest and place a fluid solidifier (best at EV for the speed) next to the chest and set its auto output into the chest and enable the auto output.
Build up a backstock of iron in output slot of the solidifier, and fluid iron in the tank of the solidifier.
Remove half a stack of iron from the quantum chest by right clicking on the stack of iron in the output slot.
See the chest refill itself from its internal inventory and from the fluid solidifier, however see that it never reaches its maximum stored amount and continuously drains iron from the fluid solidifier output, voiding the excess iron and newly created iron.
How solved:
Not returning early allows the merge to actually succeed and properly update the inventory, which prevent this issue. And also returns the correct remaining itemstack from the partial merge from the output slot of the fluid solidifier.
Outcome:
Fixes the Quantum Chest voiding items inserted into it in some cases when near/at maximum capacity.
Possible compatibility issue:
None expected.