When //regen-erating part of a structure, respect the structure.
mk-pmb opened this issue ยท 9 comments
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
- Create a 1.20 creative mode world with seed
hs230616
. /tp @s 592 73 382 facing 594 71 382
- Your targeted block should now be 594 72 382. (Yes, 1 above "facing". ๐คท )
//hpos1 //hpos2 //distr
โ should say "suspicious sand".- Dig that block.
//regen
and wait for completion message in chat.- Observe there is no visible change.
//distr
โ says air.- Enable chunk borders.
- Turn around, walk accross the chunk border.
- Dig below your feet cautiously so you can aim at 590 71 382.
//hpos1 //hpos2 //distr
โ should say "suspicious sand".- Dig that block.
//regen
and wait for completion message in chat.- Observe the suspicious sand was restored.
//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:
- Move my modified structure far away, go far away
- Use MCA Selector to delete the accident chunk and all other nearby chunks (radius 2-4)
- Travel to the accident chunk from the exact direction I originally discovered it (if I can remember it)
- Replace all blocks except the ones to restore with a placeholder e.g. bedrock.
//gmask bedrock
(or whatever placeholder)- Move my structure back into position.
We should document the best approach at the description of //regen.
I was confused by mod versions. I actually use MC 1.20 not 1.20.1. I hope that still counts as most recent.
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.
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.)
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.
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.
@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.
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.