tryashtar / nbt-studio

An up-to-date NBT viewer and editor with lots of new features
521 stars 42 forks source link

Find/Replace function? #46

Closed shimajima closed 3 weeks ago

shimajima commented 2 years ago

Hello @tryashtar and TYSM for carrying on the work of jaquadro! I am trying to do a global find/replace in my world region files. I want to replace every instance of "minecraft:deep_lukewarm_ocean" with "minecraft:ocean" -- is this possible in the current version of NBT Studio?

image

tryashtar commented 2 years ago

Hello friend. I'm happy to say that this is possible, but sad to say that it might be very slow :(

  1. Open your region folder, or as many chunk files as you want image
  2. Ctrl+F and search for the biome name in "value," click Find All image This might take way longer than it reasonably should
  3. Once it's done, click Edit image
  4. Type the value again in the "find" and the new value in the "replace" box image
  5. Press OK and save

Let me know if this works for you

shimajima commented 2 years ago

It worked fantastic! It took around 5 minutes to replace 23,432 instances of the string, which seems pretty fast to me! :)

shimajima commented 2 years ago

@tryashtar, I kind of spoke too soon. It was ok using this method to find/replace a string in 1 (one) region file. But we have to do it in 600 region files, which NBT Studio just can’t handle. We get crashes even on monster hardware. Is there any way to make the find/replace much more efficient and faster? I sent you an email with a idea which maybe could incorporate LINQ?