r/MinecraftMod • • 4d ago

Random lightbulb

Minecraft uses a "garbage collector" for clearing unneccesary things from memory to keep things running smoothly. Could a garbage collector for say idk blocks removed in a mod update due to changes or some other reason that could run when the world loads and do checks for those kinds of blocks, items, or otherwise with a precheck to see if you ran an update to avoid having to constantly worry about stopping it and then when it runs if it finds mismatched items or removed blocks it just auto junks those things so the world doesn't bug out?

2 Upvotes

4 comments sorted by

3

u/Dadamalda 4d ago

Garbage collection is a memory management process, not a save data fixing process. It mostly just makes sure your RAM doesn't fill up.

A mod that checks whether the registries have changed and warns you is possible tho. I'm not sure if it exists yet.

Vanilla already turns missing blocks/items into air, but there is a bug sometimes preventing worlds from loading if a dimension was removed. ModernFix fixes that one.

I usually just copy my instance before doing mod updates so that I can go back if something goes wrong. It's even better on Linux with btrfs, because it costs you almost no extra disk space if you use "clone instead of copy"

1

u/Jinxsyns 4d ago

Valid i was using garbage collector as just an in place term but basically yeah that! Could that be done? Free idea to anyone who sants to build it cuz i cant haha

2

u/Dadamalda 4d ago

It's probably not too hard since world save data already contains all the registries and a list of their entries which you can compare to the currently loaded registries, but I already have other projects I'm working on.

If I were to guess, designing a user friendly UI would be harder than getting the data for the basic functionality.

1

u/Jinxsyns 4d ago

I can barely code a calculator and that makes sense to me haha since its just a does one match another which already happens with mod lists well if anyone else wants the idea that comes across this there ya go haha