Structurize

Structurize

40M Downloads

Scan filename overwrites DecorationController schematicName

TechyShishy opened this issue ยท 3 comments

commented

When taking a scan of a structure containing a DecorationController (or really any block implementing IBlueprintDataProvider), the filename of the scan blindly overwrites the schematicName. This presents a situation where it's nearly impossible to build upgradable schematics without manually editing the DecorationController nbt in the blueprint file after the fact.

Tracing the code, it's because of this line here:

((IBlueprintDataProvider) te).setSchematicName(fileName);

Any solution for this problem should handle both the situation of a DecorationController with an empty schematicName as well as the situation of a DecorationController with an existing schematicName.

For context, the specific problem I have is as follows: I'm trying to scan an upgradable schematic named techyshishy/blackstone/paths/intersection5. The file needs to live at schematics/ts/blackstone/paths/intersectiont5.blueprint, the DecorationController needs to have a schematicName of schematics/techyshishy/blackstone/paths/intersection, and when I actually make the scan, the scan tool has a character limit, so I need to scan it to just intersection5, and then move it into place manually.

commented

Correct. The wiki recommends that I set the DecorationController's schematicName to schematics/techyshishy/blackstone/paths/intersection in this case, then scan it with a scan name of intersection5. This results in the broken behavior described above.

commented

The pull request I sent will fix the problem, but doesn't solve certain edge cases related to users who don't touch the DecorationController at all. I don't know if you want to solve that problem before fixing this one as well, since it would otherwise be a breaking change for what I believe are a small number of users.

commented

You're following the tutorial on the wiki?