Crafting Dead Modpack

Crafting Dead Modpack

111k Downloads

Config is not available on a dedicated server

rikka0w0 opened this issue ยท 4 comments

commented

As the title says, the config file is not created on a dedicated server, and I cannot disable the bleeding, even if I manually create the craftingdead-server.toml file with the following content:

[server]
bleedingEnabled = false

I'm also a developer, I would suggest that the following should be changed to CommonConfig:
https://github.com/nexusnode/crafting-dead/blob/1.16.x/crafting-dead-core/src/main/java/com/craftingdead/core/ServerConfig.java

Even if I run a single-player game, I cannot disable bleeding.

Solution:
ServerConfig.java --->CommonConfig.java
In CraftingDeadImmerse.java: ModLoadingContext.get().registerConfig(ModConfig.Type.SERVER, serverConfigSpec); --> ModLoadingContext.get().registerConfig(ModConfig.Type.COMMON, serverConfigSpec);

commented

ModConfig.Type.SERVER is for dedicated servers and integrated servers. Therefore, it's found in the world folder on dedicated servers and under .minecraft/saves/save name for clients. The reason you use it compared to using ModConfig.Type.COMMON is because settings are synced to the client from the server. That means that a server can have specific settings for a world and these will be replicated on the client which is necessary for features that have logic on the server and client.

commented

I can't reproduce this. I've just tested it and the config is correctly generated at server dir\world\serverconfig\craftingdead-server.toml

commented

I can't reproduce this. I've just tested it and the config is correctly generated at server dir\world\serverconfig\craftingdead-server.toml

Whats your Forge version? Mine is 36.1.6 on Minecraft 1.16.5.

commented

Solved, on the server, the config was found in the world folder......

Btw,
Is ModConfig.Type.SERVER supposed to contain only dedicated server only settings?
I thought these settings are also read by the integrated server, so why wouldnt we place them into ModConfig.Type.COMMON?

Maybe my knowledge is out dated....