Skip to content

Conversation

@IndigoPolecat
Copy link
Contributor

Fix a desync between the event slot number and the gui slot number.

@NopoTheGamer
Copy link
Member

Does this fix #519 ?

# Conflicts:
#	src/main/java/io/github/moulberry/notenoughupdates/miscfeatures/SlotLocking.java
@IndigoPolecat
Copy link
Contributor Author

Does this fix #519 ?

I didn't realise there was an issue open but yes it does.
I also just added a commit to remove a very dumb assumption I had made which means it will now work in any situation, regardless of if the total inventory has less than 45 slots (like a furnace).

@NopoTheGamer NopoTheGamer linked an issue May 29, 2024 that may be closed by this pull request
Copy link
Member

@NopoTheGamer NopoTheGamer left a comment

Choose a reason for hiding this comment

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

If you shift click from hotbar it will just go into the chest and then the link will be broken once you exit the chest. Slot binding just full doesn't work either side in the furnace, did notice it works perfectly in the dropper

@IndigoPolecat
Copy link
Contributor Author

If you shift click from hotbar it will just go into the chest and then the link will be broken once you exit the chest. Slot binding just full doesn't work either side in the furnace, did notice it works perfectly in the dropper

That's odd, I tested in a furnace but I'll double check, I think the other issue was pre existing but I'll look into it as well

@IndigoPolecat
Copy link
Contributor Author

IndigoPolecat commented May 30, 2024

If you shift click from hotbar it will just go into the chest and then the link will be broken once you exit the chest. Slot binding just full doesn't work either side in the furnace, did notice it works perfectly in the dropper

That's odd, I tested in a furnace but I'll double check, I think the other issue was pre existing but I'll look into it as well

I can confirm that shift clicking the hotbar was an issue prior to my changes, I have looked into it more and just don't know how to fix it as stated below.

As far as I can tell the only issue with furnace (and it also applies to other guis like chests) is spam clicking which I think causes the shift click to be processed by minecraft once the item is moved to the hotbar (aka the same issue as before).
I have no idea how to affect this with how the current code works though since the event is different from minecraft's and can't be easily cancelled (plus I'd be worried about potentially cancelling packets w/ watchdog)

The issue isn't my doing and it wasn't my original intention to fix because it is a much more niche issue (seeing as how the intended behavior is achieved with inventory -> hotbar, not hotbar -> inventory which is what causes the bug), however I did try and fail to fix it.
https://github.com/NotEnoughUpdates/NotEnoughUpdates/assets/115671621/cf9457bb-b286-400f-99cd-e6f3ea7d7725

@lineargraph lineargraph merged commit 30fea5f into NotEnoughUpdates:master Aug 4, 2024
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.

Slot Binding: moves the wrong slots in a double chest gui

3 participants