Add explicit check if we are swapping from and to the same slot - #160
Merged
Conversation
We had unexpected behavior when swapping to the same hot bar slot. As this shouldn't ever swap anyhow as they are the same slot. An explicit check has been added for it. This also seems to lead to the items not being deleted from your inventory.
3 tasks
Angry3vilbot
approved these changes
Aug 23, 2026
Member
You not org member. The approve not count. This pr is draft and can't be merged any way. If you want to become org member just send me a pm . |
Author
|
@Dream-Master I should propably publish it by now, in this case I did specifically ask other people to take a look at it as I was worried about potential fall-out. Mainly as I have strong suspiciouns this is the core of the issue, however I had yet to be able to see the part where the bugs happen. So wanteted some additional looks / eyes on the problem. But I will publish for now as it's technically ready. |
mcmlevi
marked this pull request as ready for review
August 24, 2026 06:42
brachy84
approved these changes
Aug 24, 2026
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.
Closes GTNewHorizons/GT-New-Horizons-Modpack#26398
Summary
We had unexpected behavior when swapping to the same hot bar slot leading to items being deleted. This PR adds an explicit check stopping you from being able to swap if the to and from slots are the same. As this shouldn't ever swap anyhow as they are the same slot.
This also seems to lead to the items not being deleted from your inventory.
Checklist