-
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
Server does not send repair cost to client on some versions #353
Comments
I assume you might be using a Minecraft version between 1.7 and 1.10? From a quick look at the code, it seems like the enchantment cost is not properly sent from the server to the client on Minecraft versions between 1.7 and 1.10, so on those versions, the client will set the enchantment cost according to vanilla mechanics. However, on Minecraft versions 1.11 and above, you should see that the enchantment cost gets sent (AnvilGUI always sets a cost of 0, so basically the cost should not be shown in the client). Side note: Even on 1.11+, you can sometimes see a "flicker" of an enchantment cost for a split second when typing in the text box. This is because the client always sets a repair cost first, even if the server sends a repair cost of 0 as an override. This is, as far as I can tell, an unavoidable limitation of the game, it's impossible to always send the 0 repair cost from the server fast enough so that the client value never gets shown. But again, at least it only shows for a split second. It's just a limitation we'll have to live with, I think. I can fix the AnvilGUI code for 1.7 - 1.10 so that it properly sends the repair cost to the client though. But it'll have to wait a few days, I'm pretty busy right now. |
I just checked on 1.20.2 and everything works fine there, sometimes it flickers. And at 1.16.5 the inscription does not even disappear |
You're right, it also doesn't send the repair cost to the client on 1.16.5. I had another look at the code, and it turns out that it was messier than I initially thought:
Anyways, I'm pretty confident that this can be fixed by AnvilGUI, will have a look at it in a few days. Update: Those few days turned into weeks, but I've made some progress and will hopefully push a PR in a few days. |
Thanks! |
@Askarionn You are right, the bug is not fixed yet (which is why this issue is still open). I am about 90% done but life got in the way of things and I had to deprioritize work on this issue. But the good news is that I think I will have some time in a few days, so hopefully we can get this bug fixed "soon". |
Thank you @0dinD! |
Hmm, upon further inspection it seems like this is a lot more work than I have time for right now. Not impossible, but a lot of work, due to the way AnvilGUI works. Unfortunately I don't have that much time to spend right now, so this will have to wait a bit longer. |
How do I remove the inscription "Enchantment cost"? Is it even possible. If so, how?
The text was updated successfully, but these errors were encountered: