Jump to content

command to clean /fml/registry/... entries of deinstalled mods?


DanNetwalker

Recommended Posts

There's this problem that people doesn't run into normally, that when you install a mod its blocks, objects, potions, etc are stored in the map registry, some data structure that links block name with the block ID used in the map.

 

This thing is great for a player that gets a modpack, goes to start a new map and boom! there it works, or migrating a map from a previous modpack version to the next (or players that join a server with blocks disabled? I may have not understood that use case). However, if a player (or modpack maker) has been adding and removing mods to test them for the modpack in a single map, or the mods have been changing over time while you keep playing the same map, the block registry will get filled with entries that are spending block IDs that could be used for real, working mods.

 

Could we please get a command that allows to remove the registry entries related to a mod, so that we can not only deinstall but "purge" it from a map?

Link to comment
Share on other sites

While I hate having junk data anywhere - locked IDs are actually not one.

 

If you remove mod that took up some IDs, those IDs must stay locked to point at "null" block (read: AIR).

Whenever chunk is loaded and it can't find block with matching ID in registry, it will replace it to null (AIR).

Not holding those locked IDs would result in chunks that are loaded after adding 2nd mod (so not "purged" between transition from 1st to 2nd), to start loading different blocks - and you really don't want that.

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Oh, snap. So the problem it's not only cleaning the /FML registry, but also taking all the generated chunks, hunt for the blocks and change the block id for the air id. And with items it would be worse, it can be burrowed in the NBT data of other blocks... Then it may not be the kind of job for a forge command, but for an external tool or something that does the job during a server boot.

 

Any chance of something like this coming from the Forge team, anyway? If we had a nice command line nbt editor/manipulator I could mix that with mcedit and do it manually, but with the current tools I don't see how we can do that kind of "map repair", more like "map refresh".

Link to comment
Share on other sites

You do understand that there is literally no point in making such tool?

The moment ID becomes "nullified" game automatically assumes that given blocks are now AIR, they just stay in world data until you load it.

It's cleaning itself. The only viable approach to such things.

 

Only valid argument here would be lack of free IDs for new mods - which is ridiculous, I can't imagine any map having that much stuff.

 

351bi45.jpg

 

Sure you can remove IDs, load tons of world data files (which is IO that takes time), then iterate over chunks and then blocks and then check agains every removed ID and then change data and save it back. Oh and did I mentiont TileEntities and Entities saved in world? How about Any other mechanism that every saved anything block-related? How about other mods? You can't even be sure you removed everything - and then BAM! Other mod suddenly loads different blocks from it's modded backpack items.

 

Not only pointless, but close to impossible.

 

Why bother? 8)

1.7.10 is no longer supported by forge, you are on your own.

Link to comment
Share on other sites

Only valid argument here would be lack of free IDs for new mods - which is ridiculous, I can't imagine any map having that much stuff.

 

Ejem...

 

v3Nh2XY.jpg

 

Not a normal use case, but possible when you install a mod that it's really badly made (a single block id per block in a "huge library of blocks". Missing pieces for example. A frozen world, as another example. Do this mistake too many times and you are forced to abandon your map. Or manually fix it by removing block id by block id with nbtexplorer, which it works fairly well if you clean the map from those blocks  with mcedit, which is a pita because you have to note down block ID by block ID what was added by the removed mod.

 

A mod is removed? Fine. Put it's blocks/items/etc in a black list registry. Then an external tool can turn all that blacklisted blocks into id 0 and clean the blacklist entries after looking at all the chunks. Am I missing something here? As I see it, it's a registry entry and an external tool that loops it, not rocket science... items would be harded, I know, except that most of block containers are fairly standard (chests and such). Only mod blocks would be a problem, and not an uncontrollable problem.

 

And the point of letting players keep using a map that they played in for months? Well... do I really have to explain that?

Link to comment
Share on other sites

Then just delete that entry. There are no plans to write a garbage collector program for this literally one in several million chance that you run through several screwed up mod packs.

 

Someone else can but its so low priority that I doubt I'll ever get to it

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

  • 3 years later...

FWIW, my family has a world we've been playing on for several years.  As we've moved through versions of Forge and various mods it has filled up with a ton of legacy blocks, finally crossing the 4096 explosion point when adding a new mod.  After reading this thread I found World Utils for 1.12.2 which successfully removed 600+ unused blocks from the world.  The command you're looking for is:

 

/worldutils registry remove-missing-blocks 

 

Step by step, here's how I fixed my issues:

  1. Back up the old map.  Make sure you don't /fml confirm when it it warns that you've exceeded 4096 blocks!
  2. Load up MC running the mods I was interested in keeping
  3. Started a clean flat world where I could execute the command
  4. Copy the afflicted level.dat into the instances config/worldutils folder
  5. Run: /worldutils registry remove-missing-blocks
  6. Copy the fixed level.dat back into my old world directory

YMMV and you definitely need to work with a version of level.dat that hasn't been saved after the exceeded max blocks warning.

- B

Link to comment
Share on other sites

3rd party utilities that mess with the world are not supported/endorsed as they have non-insignficant chances of breaking the world.

Beyond that update to 1.13+ to remove the 4096 limitation directly.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Link to comment
Share on other sites

  • 1 year later...
On 9/24/2016 at 2:58 PM, DanNetwalker said:

 

Ejem...

 

v3Nh2XY.jpg

 

Not a normal use case, but possible when you install a mod that it's really badly made (a single block id per block in a "huge library of blocks". Missing pieces for example. A frozen world, as another example. Do this mistake too many times and you are forced to abandon your map. Or manually fix it by removing block id by block id with nbtexplorer, which it works fairly well if you clean the map from those blocks  with mcedit, which is a pita because you have to note down block ID by block ID what was added by the removed mod.

 

A mod is removed? Fine. Put it's blocks/items/etc in a black list registry. Then an external tool can turn all that blacklisted blocks into id 0 and clean the blacklist entries after looking at all the chunks. Am I missing something here? As I see it, it's a registry entry and an external tool that loops it, not rocket science... items would be harded, I know, except that most of block containers are fairly standard (chests and such). Only mod blocks would be a problem, and not an uncontrollable problem.

 

And the point of letting players keep using a map that they played in for months? Well... do I really have to explain that?

Man you saved my world :) thank you from 2021.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Slot depo 5k merupakan situs slot depo 5k yang menyediakan slot minimal deposit 5rb atau 5k via dana yang super gacor, dimana para pemain hanya butuh modal depo sebesar 5k untuk bisa bermain di link slot gacor thailand terbaru tahun 2024 yang gampang menang ini.   DAFTAR & LOGIN AKUN PRO SLOT DEPO 5K ⭐⭐⭐ KLIK DISINI ⭐⭐⭐  
    • Slot deposit 3000 adalah situs slot deposit 3000 via dana yang super gacor dimana para pemain dijamin garansi wd hari ini juga hanya dengan modal receh berupa deposit sebesar 3000 baik via dana, ovo, gopay maupun linkaja untuk para pemain pengguna e-wallet di seluruh Indonesia.   DAFTAR & LOGIN AKUN PRO SLOT DEPOSIT 3000 ⭐⭐⭐ KLIK DISINI ⭐⭐⭐  
    • OLXTOTO: Menikmati Sensasi Bermain Togel dan Slot dengan Aman dan Mengasyikkan Dunia perjudian daring terus berkembang dengan cepat, dan salah satu situs yang telah menonjol dalam pasar adalah OLXTOTO. Sebagai platform resmi untuk permainan togel dan slot, OLXTOTO telah memenangkan kepercayaan banyak pemain dengan menyediakan pengalaman bermain yang aman, adil, dan mengasyikkan. DAFTAR OLXTOTO DISINI Keamanan Sebagai Prioritas Utama Salah satu aspek utama yang membuat OLXTOTO begitu menonjol adalah komitmennya terhadap keamanan pemain. Dengan menggunakan teknologi enkripsi terkini, situs ini memastikan bahwa semua informasi pribadi dan keuangan para pemain tetap aman dan terlindungi dari akses yang tidak sah. Beragam Permainan yang Menarik Di OLXTOTO, pemain dapat menemukan beragam permainan yang menarik untuk dinikmati. Mulai dari permainan klasik seperti togel hingga slot modern dengan fitur-fitur inovatif, ada sesuatu untuk setiap selera dan preferensi. Grafik yang memukau dan efek suara yang mengagumkan menambah keseruan setiap putaran. Peluang Menang yang Tinggi Salah satu hal yang paling menarik bagi para pemain adalah peluang menang yang tinggi yang ditawarkan oleh OLXTOTO. Dengan pembayaran yang adil dan peluang yang setara bagi semua pemain, setiap taruhan memberikan kesempatan nyata untuk memenangkan hadiah besar. Layanan Pelanggan yang Responsif Tim layanan pelanggan OLXTOTO siap membantu para pemain dengan setiap pertanyaan atau masalah yang mereka hadapi. Dengan layanan yang ramah dan responsif, pemain dapat yakin bahwa mereka akan mendapatkan bantuan yang mereka butuhkan dengan cepat dan efisien. Kesimpulan OLXTOTO telah membuktikan dirinya sebagai salah satu situs terbaik untuk penggemar togel dan slot online. Dengan fokus pada keamanan, beragam permainan yang menarik, peluang menang yang tinggi, dan layanan pelanggan yang luar biasa, tidak mengherankan bahwa situs ini telah menjadi pilihan utama bagi banyak pemain. Jadi, jika Anda mencari pengalaman bermain yang aman, adil, dan mengasyikkan, jangan ragu untuk bergabung dengan OLXTOTO hari ini dan rasakan sensasi kemenangan!
    • Slot deposit dana adalah situs slot deposit dana yang juga menerima dari e-wallet lain seperti deposit via dana, ovo, gopay & linkaja terlengkap saat ini, sehingga para pemain yang tidak memiliki rekening bank lokal bisa tetap bermain slot dan terbantu dengan adanya fitur tersebut.   DAFTAR & LOGIN AKUN PRO SLOT DEPOSIT DANA ⭐⭐⭐ KLIK DISINI ⭐⭐⭐  
    • Slot deposit dana adalah situs slot deposit dana minimal 5000 yang dijamin garansi super gacor dan gampang menang, dimana para pemain yang tidak memiliki rekening bank lokal tetap dalam bermain slot dengan melakukan deposit dana serta e-wallet lainnya seperti ovo, gopay maupun linkaja lengkap. Agar para pecinta slot di seluruh Indonesia tetap dapat menikmati permainan tanpa halangan apapun khususnya metode deposit, dimana ketersediaan cara deposit saat ini yang lebih beragam tentunya sangat membantu para pecinta slot.   DAFTAR & LOGIN AKUN PRO SLOT DEPOSIT DANA ⭐⭐⭐ KLIK DISINI ⭐⭐⭐  
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.