mojira.dev
MCPE-186845

Nested structures deform when loaded with rotation

Structure Block Error

This bug occurs when a structure with more structure blocks in it is rotated twice or more without breaking the block generating this multiple structure block structure. Keep in mind the reason for more structure blocks to be present in a structure is often due to storing, moving, or protecting large builds.

Reproduce:
1. Open up a dedicated server on Bedrock Edition or a world.
2. Make a structure with a structure block but put more structure blocks in it, these extra structure blocks will generate the rest of what I will call a Multistructure for now.
3. Rotate the structure block that contains the other structure blocks in it 3 times, first to 90 degrees, then 180, then 270. Make sure that you rotate the structure block each time in a different plane to avoid confusion.

If that doesn’t somehow deform the Multistructure:

1. Try to make one rectangular structure with air around it in the structure’s hitbox. The structure block saving this structure should not be in the hitbox.
2. Add a structure block on your iron 4 block long, 3 block wide rectangle. The rectangle should be facing x positive and the structure block should be somewhere close to the front.
3; Add a lever to trigger it, then since there is air around the structure block, put in the coordinates and the same structure name you used to save the rectangle and make it sort of be able to move forward.
4. Now move it forward for a bit, it should move one block at a time with the lever, if the structure should be 2 blocks tall, and if you count the air that I told you to add around the structure, its hitbox is 5 blocks wide, 6 blocks long.
5. If you did it correctly your structure should move forward each time the lever is clicked, however here is the error, manually rotate the structure block that moves your rectangle from 0 to 90 degrees. It should work somewhat fine, but then rotate it to 270 manually again, and your rectangle will deform.

What should happen when you go from 90 to 270 is that it will work the same as it did when it was facing 0 degrees, but just in a different direction.

This bug can affect more than mentioned here and could extend to Java Edition. So far the best solution would be to take the structure block mechanics from 1.18 or 1.19 and any sub version of either of those and use that to replace the current structure block mechanics.

Note: When using the older mechanics you MIGHT have to edit some other files because stuff like dependencies in code and stuff in other files that structure blocks need to run may have to be edited for that. Also the error might not be fully in structure blocks, but the other files connected to it.

Also if you thought a non redstone moving rectangle was somewhat cool, there are much larger actual ships that shoot moving missiles that remove millions of blocks on impact. That’s another topic.

HOW THE BUG AFFECTS PEOPLE:

People who often construct larger scales of those moving rectangles that look like actual ships and can turn with levers and hidden structure blocks may be disappointed that their builds no longer function as it used to.
People who construct large builds might also be disappointed because their builds break after some rotations, and that would likely be a huge mess to clean up a deformed large build.
Some people heavily use structure blocks and it might annoy them that something is wrong, which is a large case for most of my friends, and I suggested that I'd make a bug report on it.

Linked issues

Comments 6

To spare people from leading the long bug report, I decided to instead create a summary and instructions here.

Summary of the Summary: Take any files and pieces of code related to and part of structure block mechanics along with dependencies, then use them for the current version. Adapt as needed try not to cause the error again.

Basically some files connected to the structure block may have some errors in calculations, the problem could also be related to the files that make the structure block work as well. Keep in mind this may affect the /structure command in command blocks.

The main part of the issue is that when a structure block is in another structure and that structure encapsulating the structure block is rotated enough times it deforms the coordinates and how rotations should happen for the structure block inside the structure.

Keep in mind that versions 1.19 and before did not have this issue and rotated structure blocks in structures along with adapting their coordinates and rotations correctly as well. The safest version to go back to is 1.18, but I recommend something in between 1.18 and 1.19 to be the fixed versions.

I had multiple people/friends test this bug across multiple platforms and conditions to make sure this was not platform related issue, or an issue limited to worlds, realms or servers, it affects all.

More info is in the main bug report.

To spare people from leading the long bug report, I decided to instead create a summary and instructions here.

Summary of the Summary: Take any files and pieces of code related to and part of structure block mechanics along with dependencies, then use them for the current version. Adapt as needed try not to cause the error again.

Basically some files connected to the structure block may have some errors in calculations, the problem could also be related to the files that make the structure block work as well. Keep in mind this may affect the /structure command in command blocks.

The main part of the issue is that when a structure block is in another structure and that structure encapsulating the structure block is rotated enough times it deforms the coordinates and how rotations should happen for the structure block inside the structure.

Keep in mind that versions 1.19 and before did not have this issue and rotated structure blocks in structures along with adapting their coordinates and rotations correctly as well. The safest version to go back to is 1.18, but I recommend something in between 1.18 and 1.19 to be the fixed versions.

I had multiple people/friends test this bug across multiple platforms and conditions to make sure this was not platform related issue, or an issue limited to worlds, realms or servers, it affects all.

More info is in the main bug report.

Please link to a video that shows the problem in as simple a way as possible, or attach a test world that can be used to reproduce the issue following simple steps.

Apparently this broke in 1.20 in both Java and Bedrock: see MC-265257. I have requested that the Java report resolution be reviewed.

thanks for fixing it

thanks for fixing it

Knexyce

(Unassigned)

Unconfirmed

Multiple

Xbox, however this occured on BDSs, friends' worlds, realms, etc.

1.21.30

Retrieved