Skip to content
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

Prevents opening Shopkeepers signs when installed #50

Open
lerokko opened this issue Jul 3, 2024 · 2 comments
Open

Prevents opening Shopkeepers signs when installed #50

lerokko opened this issue Jul 3, 2024 · 2 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@lerokko
Copy link

lerokko commented Jul 3, 2024

The plugin Shopkeepers allow to make custom entities (including signs) that when clicked open a villager trading GUI. With this mod installed clicking such a sign no longer does anything. I do not expect the mod to support "signs" as they are not villagers but it should not prevent me from clicking the sign.

https://dev.bukkit.org/projects/shopkeepers

@FaultyFunctions
Copy link

I am also having this issue.

@naari3
Copy link
Owner

naari3 commented Dec 27, 2024

Sorry for the delayed response!
I think this is because this mod modifies the behavior of opening the GUI when receiving a TradeOfferPacket, so that it only opens the GUI if you interact with a villager.

This one is to make it consistent with the implementation that encourages packets to be sent from the server side when the cursor is placed on a villager.
However, as you said, it doesn't seem to work well with entities other than villagers.

At the moment, I haven't come up with a very good solution.
I think it might work if you combine the above condition with a condition like "cancel only if the cursor is on a villager," but I'm a bit worried about race conditions. If a packet from the server arrives late after you move the cursor, I think the GUI will open when that packet arrives.

@naari3 naari3 added bug Something isn't working help wanted Extra attention is needed labels Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants