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

[1.20.1] Updated config on the server does not show the appropriate cost on clients side #70

Closed
ACE1337x opened this issue Nov 3, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ACE1337x
Copy link

ACE1337x commented Nov 3, 2024

I'm seeing a few posts here about the configs not working... In my case the configs do seem to work but the displayed information seems to just be the default. Even if the client and server have the same settings, the server appears to display the default costs to the client instead of the ones in the config, and it doesnt seem like the client config is loaded unless making/joining a singleplayer world first?

@mschae23
Copy link
Owner

mschae23 commented Nov 4, 2024

the server appears to display the default costs to the client instead of the ones in the config

Configs aren't synced from the server to clients, so this is expected. The displayed cost will only be correct if the client config matches the server config.

it doesnt seem like the client config is loaded unless making/joining a singleplayer world first

Oh, I think I know why this would be happening. It's an oversight that should be relatively simple to fix.

@mschae23 mschae23 added the bug Something isn't working label Nov 4, 2024
@mschae23
Copy link
Owner

Actually, the config allows referring to registry entries (items and enchantments), which are defined on the server-side and can differ between worlds, making it a lot harder to just read the config when the client starts. This is what I get for pretty much only testing in singleplayer, I guess...

The "clean" solution for this is most likely to separate the client- and server-side parts of the config into different files so they can be independently read, and implement some sort of syncing of the server-side part to the client for the level cost display. I'll have to look into that.

@mschae23
Copy link
Owner

The "clean" solution for this is most likely to separate the client- and server-side parts of the config into different files so they can be independently read, and implement some sort of syncing of the server-side part to the client for the level cost display. I'll have to look into that.

I actually implemented this for 1.21.4 (and later) now! In version 4.0.0, currently available as a beta on CurseForge and Modrinth, there are now two config files for the server and client, respectively, and the server config is synced to the client when joining worlds. This should solve the issue you're having.

Unfortunately, the underlying networking features that make this feasible were only introduced in 1.20.2 and 1.20.5. I generally don't support old Minecraft versions, but since you explicitly mentioned using 1.20.1, I would've backported this overhaul if it wasn't for that, sorry.

it doesnt seem like the client config is loaded unless making/joining a singleplayer world first

I think I can push a fix for this on 1.20.1, though.

@mschae23
Copy link
Owner

mschae23 commented Dec 1, 2024

I have uploaded a fixed version for 1.20.1 now. It doesn't come with the syncing feature, but if the configs on the server and client match, it should now work correctly even without joining a singleplayer world first.

@mschae23 mschae23 closed this as completed Dec 1, 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
Projects
None yet
Development

No branches or pull requests

2 participants