WorldEdit for Bukkit

WorldEdit for Bukkit

21M Downloads

When //regen-erating part of a structure, respect the structure.

mk-pmb opened this issue ยท 9 comments

commented

WorldEdit Version

Fabric-Official(7.2.15-SNAPSHOT+6460-c518821)

Platform Version

Fabric Loader v0.14.21, Fabric API 0.83.1+1.20.1

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

Sometimes when I remodel a structure, I accidentially remove a part, so I select it and run //regen, but it creates something totally different. This is especially cumbersome in case of a surprise content block like a treasure chest or suspicious sand. It seems to have to do with the structure blue print being in another chunk than the part that I need to repair.

Expected Behavior

//regen restores the original blocks.

Reproduction Steps

  1. Create a 1.20 creative mode world with seed hs230616.
  2. /tp @s 592 73 382 facing 594 71 382
  3. Your targeted block should now be 594 72 382. (Yes, 1 above "facing". ๐Ÿคท )
  4. //hpos1 //hpos2 //distr โ€“ should say "suspicious sand".
  5. Dig that block.
  6. //regen and wait for completion message in chat.
  7. Observe there is no visible change.
  8. //distr โ€“ says air.
  9. Enable chunk borders.
  10. Turn around, walk accross the chunk border.
  11. Dig below your feet cautiously so you can aim at 590 71 382.
  12. //hpos1 //hpos2 //distr โ€“ should say "suspicious sand".
  13. Dig that block.
  14. //regen and wait for completion message in chat.
  15. Observe the suspicious sand was restored.
  16. //distr โ€“ should confirm suspicious sand.

Anything Else?

Sometimes when I regenerate a chunk that contains part of an underwater amethyst geode, that part of the geode is gone. So I try to regenerate the chunk next to it as well, but then parts of a dungeon are gone. What is the proper procedure for repairing accidents?

Also is there a better way to preserve my modifications than my current method? It seems very cumbersome:

  1. Move my modified structure far away, go far away
  2. Use MCA Selector to delete the accident chunk and all other nearby chunks (radius 2-4)
  3. Travel to the accident chunk from the exact direction I originally discovered it (if I can remember it)
  4. Replace all blocks except the ones to restore with a placeholder e.g. bedrock.
  5. //gmask bedrock (or whatever placeholder)
  6. Move my structure back into position.

We should document the best approach at the description of //regen.

commented

I was confused by mod versions. I actually use MC 1.20 not 1.20.1. I hope that still counts as most recent.

commented

It seems to have to do with the structure blue print being in another chunk than the part that I need to repair.

then you additionally have to regen the chunk that starts the structure.
worldedit doesn't touch or even know about structure data whatsoever, it just asks the world gen to generate the chunks and copies blocks from the newly genned chunks to the existing chunks.

if this sort of accuracy is important to you, make a backup and restore from it instead of subjecting yourself to the whims of minecraft's world generation.

commented

Yeah, it's obvious for people who know how it works internally. I had hoped the WE docs are meant for beginners as well.
I wish I could tell WE to regenerate the nearby chunks as well, but still only copy the selection. Shall I open a feature request for that or would it be deemed invalid, too? (Because I can probably go the cumbersome route via schematics files.)

commented

Then we should at least document this risk at the description of //regen, to help people avoid this kind of over-confidence in WorldEdit's capabilities.

commented

that is literally the description.

commented

You can probably just do that with //gmask, since regen will use your selection to choose the chunks but the //gmask will limit the placement.

commented

You're welcome to contribute to the docs.

commented

@octylFractal Thanks for that idea! From cursory testing, that seems to work. Another piece of crucial knowledge that beginners would probably love to discover when they first read about //regen.

commented

In the case described above, however, even with //chunk and then //expand 64 n,s,w,e โ€“ far beyond the desert pyramid, it fails. The pillars are regenerated but not the floor. :-( I guess @wizjany was right that //regen is no replacement for proper backup.