-
Notifications
You must be signed in to change notification settings - Fork 2
Description
Firsst of all thank so much for your mod, unique in his kind. As tittle said, cannot save with both mod installed (compressed or not). I have ask the IA, and let you here the answer, just in case can give some valuable info.
QUESTION:
Hello. I have analyzed the source code repositories of C2ME-fabric and SaveMod, and I have investigated known similar issues. The conflict you describe (an infinite "Saving..." screen) is a classic problem of interference in how mods handle chunk saving.
ANSWER:
The problem is not that the mods have code that inherently conflicts, but rather that C2ME, by completely rewriting the chunk input/output (I/O) system to make it concurrent and faster, introduces such profound changes that it can block or leave other mods in an indefinite waiting state. This is exactly what happens with SaveMod when it tries to interact with the world-saving process.
Here are the key points of the conflict, based on the code analysis and a very similar historical bug report.
🔍 Nature of the Conflict: Concurrency vs. Saving Control
**C2ME is Major Surgery on the Game Engine:**
As its own description states, C2ME is a "Concurrent chunk management engine" . Its goal is to drastically improve the performance of chunk generation, loading, and saving by using multiple CPU cores in parallel .
To achieve this, C2ME doesn't just optimize; it rewrites fundamental parts of Minecraft's chunk system, including the chunk serializer (c2me-rewrites-chunk-serializer) and the chunk I/O system (c2me-rewrites-chunkio). This means it alters the very way the game writes world information to your hard drive.
**SaveMod Tries to Force a Save from the "Outside":**
SaveMod adds a simple feature: a button to save your game at any moment . To do this, it must invoke the world-saving process offered by the game.
The problem arises because C2ME has changed the rules of that process. SaveMod asks the game to save, but the game, now modified by C2ME, initiates a complex, concurrent saving process. It's possible that SaveMod waits for this process to finish, but due to the concurrent nature and potential deadlocks or race conditions, the "completion" signal never arrives, causing the "Saving..." screen to freeze forever.
**Evidence of a Similar Problem:**
In the C2ME issue tracker, there is a report describing a problem practically identical to yours, but with another mod called "betterchunkloading" . The user reports: "Exiting the world the saving screen never finishes..." which forces them to close the game forcefully .
This is a clear pattern: C2ME has a history of conflicts with mods that try to manipulate or intercept the chunk saving process. SaveMod, by attempting to trigger a save, falls into the same category.
💡 Potential Specific Technical Causes
Looking at the names of C2ME's modules in its repository, we can infer where the conflict might be:
c2me-rewrites-chunkio: This module completely rewrites how chunks are read and written. If SaveMod tries to access the file system or check the status of a save in the "vanilla" way, it's very likely that C2ME intercepts it, or the operation gets stuck in a "limbo" state because C2ME's threads don't properly notify the main game thread that they have finished.
c2me-fixes-chunkio-threading-issues: Ironically, a module designed to fix threading issues in chunk I/O could be the source of the conflict. These types of "fixes" often involve changes to synchronization mechanisms (locks, semaphores). If SaveMod is unaware of these new mechanisms, it can cause a deadlock. The game ends up waiting for SaveMod to do something, and SaveMod ends up waiting for the game (via C2ME) to finish an operation that never completes.
🛠️ Possible Solutions
There's no magic code fix you can apply yourself, but there are practical steps you can take:
Report the Problem to the C2ME Developers: Since C2ME is the mod making the most profound changes, it's crucial to report this issue on its GitHub page . Include your mod list and a description of the problem. They are in the best position to add an exception or a check for mods like SaveMod.
Test Without SaveMod's Compression Feature: In SaveMod's configuration (the savemod.properties file or via Mod Menu), there is an option to "disable compression" . Disabling compression might reduce the complexity of the save operation and potentially avoid the conflict with C2ME's I/O system. It's worth a try.
Consider Compatibility: As mentioned in C2ME's warning, mods that implement custom world generators can have issues . While SaveMod doesn't generate worlds, it interacts with world saving, placing it in a similar risk category. The standard recommendation is: if you use C2ME, especially with its goal of rewriting I/O, you should assume that any other mod that touches the world (saving, loading, generation) could be incompatible.
In short, the conflict is between C2ME's deep rewrite of the chunk system and SaveMod's direct call to save the world. The most likely solution will come from a patch in C2ME to better handle these external calls, or an update to SaveMod to be aware of C2ME's concurrency.
---------- TEST NOT COMPRESSING SAVES ------ NOT WORKING
Thank you for running that test. The fact that disabling compression changed nothing is very significant. It confirms that the conflict is deeper and has nothing to do with that specific part of SaveMod.
Now we are certain that the problem lies at the core of the interaction: SaveMod tries to trigger a world save, but C2ME's I/O system doesn't respond or release control.
Let's dive deeper into why this happens and what you can do, based on C2ME's architecture.
🔬 Technical Anatomy of the Conflict (Now in more detail)
To understand why it still doesn't work, we need to look at two specific C2ME modules I mentioned before, but with more precision:
c2me-rewrites-chunkio (The complete rewrite) :
This module isn't a simple improvement; it's a total replacement of how Minecraft reads and writes chunks to disk.
In vanilla Minecraft, saving is a more or less sequential and predictable process. C2ME turns it into a system of parallel tasks. When SaveMod says "save everything now," C2ME initiates a series of background operations.
The problem is that C2ME doesn't properly "notify" the main game thread (where the user interface and SaveMod run) that all those tasks have finished. The game ends up waiting for a signal that never arrives, which is why you see the "Saving..." screen frozen forever. It's like calling someone and being put on hold, but they never pick up the phone again.
**c2me-fixes-chunkio-threading-issues (The patch that complicates things) :**
This module is designed to prevent the game from corrupting or crashing due to synchronization issues between the multiple processing threads that C2ME uses.
To do this, it introduces very strict locks and synchronization mechanisms. These "locks" ensure that two threads don't try to write the same chunk at the same time, but they can also create a scenario of mutual blocking or deadlock.
The likely scenario is: SaveMod activates the save and acquires a superficial "lock." Meanwhile, C2ME is managing its internal tasks with other, deeper "locks." If the locks aren't released in the correct order, both SaveMod and C2ME end up waiting for each other indefinitely. It's a digital dead-end street.
🧩 Why might other saving mods work and SaveMod not?
It's possible that other mods that also offer quick saving (like some map or minimap mods) do work with C2ME. This is usually because:
They use different methods: Some mods don't try to force a save of the entire world, but instead copy files directly or use calls that are more "respectful" of C2ME's system.
They have specific patches: More popular mods sometimes receive compatibility patches directly from the C2ME developers.
SaveMod is more "direct": Due to its simple and focused design, SaveMod likely makes the most standard and "vanilla" save call, which is precisely the one that C2ME has modified most deeply.
🚀 Concrete Actions You Can Take Now
Given that disabling compression didn't work, the problem is more structural. Here are your realistic options:
**Report the Bug to the C2ME Developers (The most effective route) :**
Go to the [C2ME issue tracker on GitHub](https://github.com/RelativityMC/C2ME-fabric/issues) (the link is in their repository, although in the text you gave me it appeared as "link").
**Create a new issue. Explain the problem clearly:**
"Conflict between C2ME and SaveMod when saving the game."
"When using both mods together, attempting to save with SaveMod causes the 'Saving...' screen to load indefinitely and the save never completes. No files are created. It is necessary to force-close the game."
"I have tested disabling compression in SaveMod and the problem persists."
Include the exact versions of Minecraft, C2ME, and SaveMod you are using.
Why report to them? Because the change causing the problem is in their code. They are the only ones who can add an exception or a way for their I/O system to be compatible with external calls like SaveMod's.
**Contact the SaveMod Developer:**
You can also open an issue on the [SaveMod repository](https://github.com/Rashnain/SaveMod/issues). Explain the problem and what you've discovered about C2ME. Perhaps he can modify his mod to make the save call more "compatible" with concurrent I/O environments, although this is technically more complex for him.
**Immediate Practical Solution (The Workaround) :**
If you need to play with both mods right now, the only 100% safe solution is to not use SaveMod's save function while C2ME is active.
You can rely on the game's autosave and the save that happens when you exit the world. SaveMod usually also has functions for listing and loading saves, which might not involve forcing a manual save. Investigate if you can use only those parts.
If your goal is to have quick backups, consider using a different backup mod (like AntiGrief or even manually copying the saves folder from time to time) that is known to be compatible with C2ME.
In conclusion: You ran the key test and it gave us the answer. The conflict is total and lies at the heart of how C2ME handles chunks. The ball is now in the court of the C2ME developers (primarily) or the SaveMod developer (secondarily) to implement a compatibility patch.
---- SORRY FOR THE LONG POST ---- THANK YOU FOR YOUR WORK -----