Mojira Archive
MCM-1368

The "load queuing" functionality of /structure has become unreliable

Partner Rank: 

1

Partner Team Reporting:

Gamemode One

Verification builds:

Minecraft.Windows_1.17.2.0_x64_Test

Regression Builds:

Minecraft.Windows_1.16.22002.0_x64_Test

Summary:

When a structure command is run with coordinates in unloaded chunks, it will queue that structure to be loaded once the chunks are loaded. This behavior has become unreliable and will often fail to place the structure when the chunks are loaded. 

I had a conversation with Alex Troyer from the developer team and he speculated that this issue could be related to a similar /schedule bug due to the commands sharing some technology. Here is a bug report regarding that https://bugs.mojang.com/browse/MCPE-129878

Impact:

This has very scary implications for any content using the structure command. It can easily render maps impossible to progress in. The 'How To Train Your Dragon' and 'Bloom' pieces of content heavily rely on this command working as it did when it was introduced.

In 'How To Train Your Dragon', if trapper ships are not created correctly it will block progress on that quest and eventually prevent the completion of the map. I will attached some images of trapper ships being incorrectly structured in. In the specific context of the HTTYD map, I believe the issue is caused due to the function call originating from an animation controller on an entity which becomes unloaded. Here is a summary of the function call stack that calls the structure command in question.
An animation controller (from an entity that does not always exist) calls a function containing 

execute @e[name=main,type=armor_stand,...] ~ ~ ~ function gen/generate

This line calls a function which contains these lines

structure load mystructure:t_ship_1 912 0 1840
structure load mystructure:t_ship_2 976 0 1853

 
I believe the correct "origin entity" of the structure commands should be the @e[name=main,type=armor_stand,...] entity. It is from this entity that the command is run and any @s selectors in the same function as these structure commands would return this entity. What seems to be happening is that the entity with the animation controller is considered the origin entity. 

Repro Steps:

Here are steps to reproduce the issue on the 'How To Train Your Dragon' piece of content.

  1. Download 'How To Train Your Dragon' from Store
  2. Create a world and turn on cheats.
  3. You can skip the introduction by running `/function sequence/graduation`
  4. Teleport to 961 109 992. Eret will begin his dialogue. Once he is finished a floating boat will appear above the map that is in the center of the room.
  5. Run `/tp 961.38 109.00 992.16` to give yourself a map.
  6. The ship location is randomized. Fly towards the marker that has appeared on the handheld map.
  7. Observe the completeness of the ship build that can be found at the marker.

Observed Results:

Often (but not always) either the front or back section of the ship will be missing.

Expected Results:

Both structure commands should execute without issue, resulting in a complete ship build.

Screenshots/Videos attached: 

 Yes, I will attach two images of incomplete ships and an image of the marker on the handheld map.

Notes:

If you are having trouble reproducing or have questions, I am "Cade Anderson" in the Mojang slack. I could potentially provide a version of the map with the ship location randomizer disabled or other useful debugging measures.

Unresolved

Cade Anderson (Edacth)

2021-06-17, 11:07 PM

2021-06-18, 09:09 PM

1

2

Future Release

-