-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
shift click does not work in 1.8 and item gets lost on close #355
Comments
This is either a bug or a missing feature depending on ones perspective, but either way I agree that it should be possible to allow shift-clicks. The reason it does not currently work is that AnvilGUI can't tell what will happen when you shift-click (unless AnvilGUI reimplements the entire vanilla inventory logic, which is not going to happen), so AnvilGUI doesn't know which slot(s) the shift-clicked item stack will end up in. Because of that, AnvilGUI can't tell whether the shift-click should be allowed or not based on the But either way, I think we can make a band-aid fix in AnvilGUI by allowing shift-clicks only if both the left and the right input slot is interactable, because then AnvilGUI does not need to know where the items would end up. And if for some reason someone wants only one of the input slots to be interactable, they can just reimplement the inventory logic themselves. I'll add this fix after updating AnvilGUI to work on Minecraft 1.21.3.
For historical reasons, that's kind of how AnvilGUI works (AnvilGUI was created as a text input library, not a general-purpose Anvil library), but I can see why you're confused (I'll try to improve the documentation later). You can implement the item drop logic yourself via |
I see this in your comment. Can this be changed? I really would like to use this and the shift click. The main reason why I stopped using anvils at the moment. Much appreciated! |
Sorry it took so long, I got kind of busy and it turns out that allowing setting a non-zero levelCost is a bit more complicated than it first seems due to the way AnvilGUI works (see #359). If you're still interested in the "allow shift-clicking" part of this issue I could probably break that part out into it's own PR and get it merged. It's just that it would take a bit of time, so I won't do it if you're no longer interested. |
I lost interest in minecraft unfortunate. Thanks for reaching out! |
2024-10-15.18-13-05.mp4
I am using 1.10.2-SNAPSHOT and item gets lost on close and shift clicking does not work.
code I used:
The text was updated successfully, but these errors were encountered: