Prefab

Prefab

12M Downloads

Figure out how to get configs to load correctly for new worlds

Brian-Wuest opened this issue ยท 8 comments

commented

There were multiple issues surrounding the configuration file loading and where it loads from.

For new worlds it appears that the configuration file is generated using default values instead of what was updated in the general area for the configuration file. This is problematic since the housing item can only be provided the first time the player joins the world. This basically makes this functionality useless on single player worlds. Players cannot determine if they want the Moderate House, Structure Part, or Nothing in the current environment.

commented

Just thought I'd add that the config settings for a single player world work for the versions prefab-1.6.4.3 & prefab-1.6.5.0.

prefab-1.6.5.1 had a fix:
#3. Fixed an issue where the default configuration functionality was not re-loading the mod configuration file appropriately.

where the config no longer loaded properly. I'm referring to:

"Add Chest Contents" = true/false
"Starting Item" = "Starting House"/"Nothing"

and the individual items under:

[general."chest contents"]

commented

Thank you! That gives me some targets to verify against.

commented

.. a bit more detail: the 3 settings that I tested 'A' vs 'B' were only under prefab-1.6.4.3. For all the other versions [prefab-1.6.5.0 to prefab-1.6.5.3] I only tested the settings under:

[general."chest contents"]

... where I disabled all items other than the 'hoe', 'shovel' & 'torches' - all versions from prefab-1.6.5.1 to prefab-1.6.5.3 gave me everything but only prefab-1.6.4.3 & prefab-1.6.5.0 had the proper/working settings.

.. & my comment of "#3. Fixed an issue where the default configuration functionality was not re-loading the mod configuration file appropriately" refers to the Changelog for prefab-1.6.5.1

EDIT: I downloaded all versions for 1.16.5 [ie. including prefab 1.6.2.x to 1.6.4.x as they all should have the license & version requirements for mc1.16.5] but I started testing from prefab-1.6.4.3 & felt there was no need to test older versions.

commented

@markygnlg - So I have been able to work on this stuff quite a bit over the past few days.

I figured out what the problem was. Mostly it was me not understanding how Forge expects registered configurations to work and my implementation of it. So simply put...I don't register this mod's configuration with forge. This means no more "-server" and "-client" configuration files!

There will only be one configuration (obligatory 'to rule them all!') going forward which is the one most people are familiar with (in the config folder).

As for syncing between Server and Client; I have my own configuration syncing process for syncing configuration data from Server to Client and it's been in there for many years so I know it works well.

On top of all of this I also ended up creating a configuration screen so it is easier for single-player folks to set up and modify their configurations. This is being tracked here: #172.

I have a bit more testing to do with the configurations before I release and I have a bunch of release notes to push out too.

commented

Not sure if this is worth mentioning but since you stated "I also ended up creating a configuration screen" I thought I'd mention that I've been using "[MrCrayfish] Configured" mod to make config settings easier.

I can't remember if it 'reloads' the settings without a restart but if you're testing your own config screen then maybe this other mod/author might give you some examples (& I hear MrCrayfish is an Aussie - & we're a real friendly bunch, so he might help you out)

commented

Thanks, I can reach out to him.

For what it's worth, my configuration page saves all changes as they are made and the in-memory settings are updated at the same time.

I also verified that when in multi-player, the server settings take precedence over any local settings. With an exception for the preview functionality since that is pure client side.

commented

The fix for this issue has been uploaded to CurseForge with version 1.6.5.4. Once it has been approved it will be available for download.

Thank you!

commented

My pleasure. This mod makes me feel like a minecraft 'player' rather than a 'cavehome maker'.