nbt-studio icon indicating copy to clipboard operation
nbt-studio copied to clipboard

Find/Replace function?

Open shimajima opened this issue 3 years ago • 3 comments
trafficstars

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

shimajima avatar Aug 21 '22 04:08 shimajima

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

tryashtar avatar Aug 21 '22 05:08 tryashtar

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

shimajima avatar Aug 21 '22 05:08 shimajima

@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?

shimajima avatar Aug 24 '22 00:08 shimajima