Structure loading prioritization (addon vs. leveldb cache)
Partner Rank: 3 - Normal
Verification Builds: Stable 1.20.51 & Preview 1.20.60.23
Regression Builds: Unknown/None
Summary: Structure loading prioritization (addon vs. leveldb cache)
Affects currently Live Content: No
Impact: We are using the /structure load & /structure save commands as a core-mechanic of our redstone-based game. The current prioritisation of addon over leveldb cache means players are unable to dynamically override base structures while playing the game
Repro Steps:
- Create a new world
- Create a simple structure & export it into a behaviour pack structures/bug/test.mcstructure
- Link your new world to the new behaviour pack & load back in
- Load in your structure with /structure load bug:test <dest>
- Make modification too your simple structure
- Save your modified structure with /structure save bug:test <from> <to>
- Before reloading the world, verify your modified structure is in the leveldb cache by loading it again. /structure load bug:test <dest>
- Once verified, reload the world
- Load in your structure again /structure load bug:test <dest>
- Notice that it has been reverted back to the Addon's structure, and your modifications have been deleted
Observed Results: The leveldb cache is deleted upon world reload, and the addon's base version of the structure is used instead
Expected Results: The leveldb cached structure is saved & immutable across world reloads, and should be deleted via `/structure delete` to then use the addon's base version again
Screenshots/Videos attached: Yes, sent to Greg Walls via Compass
Notes:
- We have a default structure for each level saved in our Addon called lvl1:save1, and allow players to save over this slot via /structure save lvl1:save1 (i.e. saving it to the leveldb cache). Upon reloading the world, lvl1:save1 will be reverted to the Addon's version, deleting the leveldb cached version. (and therefore deleting their saved content)
- I think that the leveldb cache should have priority over the addon, as the addon serves as the base experience, and the world then evolves as the player's experience unfolds.