Skip to content

Fix multiple duplication bugs and NPE#209

Open
jackodsteel wants to merge 3 commits intoMalorolam:masterfrom
jackodsteel:master
Open

Fix multiple duplication bugs and NPE#209
jackodsteel wants to merge 3 commits intoMalorolam:masterfrom
jackodsteel:master

Conversation

@jackodsteel
Copy link
Copy Markdown

@jackodsteel jackodsteel commented Apr 29, 2020

Fix #185 where it removes 2 but only gives one lootbag when shift clicking

Fix #188 fix #178 where using the number keys gives a stack when it should only give 1.

Pretty sure it fixes #191, although their description seems the opposite of the bug I'm seeing.

Also fixed two bugs I found myself. One where using pipes (tested with EnderIO), it will extract a larger number of bags than it removes, thus duping bags.
Second, a null pointer when interacting with the bags GUI sometimes.

Reworked the slotClick and transferStackInSlot logic.
I'm not 100% sure what was causing the errors, but these refactors have fixed
- Bug where shift clicking items out used 2 items but only gave 1
- Bug where using the number keys to remove items duped huge amounts
Tested with EnderIO. Previously when using EnderIO item conduits, it would attempt to take multiple items (and add that many to the input inventory), but only decrement storage by 1.
Now correctly handle the case where item cables try to extract more than one item at a time.
Sometimes this method gets called with slotPos -999, not sure why, but just put a check to ignore any events that have a slotPos outside the expected bounds and this fixes it.
@jackodsteel
Copy link
Copy Markdown
Author

Hey @Malorolam, any chance of you taking a look at this PR? Happy to help with general maintainance too if you'd like, for example replying to/closing issues.

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.

duplication Dupe Bug using number keys still not fixed Losing bags with shift click (Bag Storage Block) Dupe bug

1 participant