mojira.dev
MC-272347

Upgrading from before 24w21a doesn't update structures saved by structure blocks

When upgrading a world from before 24w21a, structures saved by structure blocks are not accessible anymore.

How to reproduce

  1. Open a world in 1.20.6 or 23w20a (or any other version)

  2. Use a structure block to save a structure

  3. ✔ Verify that you can load the structure using a structure block or the /place template command

  4. Update to 24w21b

  5. Try to load the structure using a structure block or the /place template command

  6. ❌ The structure doesn't exist

Cause

24w21a changes the folder of structures from structures to structure. This change also affects the generated folder in a world. (The changelog only mentions this change for data pack content, not for the generated folder.) When upgrading a world, the saved structures do not get moved to the new folder.

Linked issues

Comments 2

I can confirm this issue.

Code analysis (Yarn mappings)

The StructureTemplateManager class contains a STRUCTURES_DIRECTORY constant, which was changed from structures to structure in Minecraft snapshot 24w21a. This affected loading from both resources (data packs) and files, as presumably this constant is used in all usages of structure in the rest of the class.

The fix for this issue seems to have been to change the generated structures directory back to structures. The structures created in Minecraft snapshots 24w21a and 24w21b will stay in the structure directory, so while less impactful, the lack of upgrade path has essentially been flipped.

jacobsjo

boq

Community Consensus

Platform

Very Important

Datafixer

24w21b

1.21 Pre-Release 1

Retrieved