HellFirePvP / AstralSorcery

Some magic mod
Other
260 stars 155 forks source link

Prism Whitelist not respected on second world load #1946

Closed StygianNights closed 2 years ago

StygianNights commented 2 years ago

The Resplendant Prism will only respect the whitelist of the first world loaded after a fresh launch of minecraft. From that point on, the prism, if crafted or given by commands, will have enchantments that match the whitelist of that first loaded world, even if a second world is loaded with a completely different whitelist. This is easy to replicate:

Versions used for this particular discovery Minecraft Forge 1.16.5-36.2.20 Astral Sorcery 1.13.12 ObserverLib 1.5.3 Patchouli 53.2 Curios API 4.0.8.0

Reason for Discovery: Testing a weird mod interaction in the mod Enigmatic Legacy.

Doomgull commented 2 years ago

You edited that world's config, not the default config directory's config. Changes made to the config of a world in 1.16 will not persist into other created worlds unless that world's config file is fixed copied to the "defaultconfig" directory of the pack.

StygianNights commented 2 years ago

I made no edits to the default config or the config that exists outside the world save. What I am attempting to convey is that a whitelist set in a world save will persist to other world saves with completely different whitelists, with the whitelist being used being the one of the first loaded world. I am sorry if I was confusing before.

Aizistral commented 2 years ago

You edited that world's config, not the default config directory's config. Changes made to the config of a world in 1.16 will not persist into other created worlds unless that world's config file is fixed copied to the "defaultconfig" directory of the pack.

That has nothing to do with the bug described. The problem is not that the change made in one world does not persist into another, the problem is that two worlds have two different configs, and after loading into one of them, leaving, and entering the other config of the first world will have effect. Same is true regardless of how many worlds with different configs you enter after that first one.

From my own tests, it seems like the whitelist of enchantments gets frozen as soon as EnchantmentHelper is classloaded.

Doomgull commented 2 years ago

Single player or dedicated server?

StygianNights commented 2 years ago

Singleplayer.

I'm not exactly sure a dedicated server can load a second world without shutting down fully first.

Doomgull commented 2 years ago

That was the intent behind my question. Ssp does janky things with server threads and not unloading some things.

Will try to replicate later.