Upgradable decorations not upgrading
Moobien opened this issue ยท 2 comments
Prerequisites
- I am running the latest alpha version of MineColonies and Structurize for my Minecraft version.
- I checked the MineColonies/Structurize wiki and made sure my issue is not covered there.
- I made sure that this issue is not a duplicate of any existing issue.
Context
- Minecraft Version: 1.16.5
- MineColonies Version: 336
- Structurize Version: 208
- Related Mods and their Versions:
Expected behavior
Upgradable decoations being upgradable.
Actual behavior
upgradable decorations are currently only showing repair button and no upgrade button and claim that the schematic is already at highest level. older upgradable schematics such as the fortress ones work as intended.
Steps to reproduce the issue
- build or paste any of the included schematics in the zip.
- attempt to upgrade them
Logs
- latest.log: https://gist.github.com/Moobien/0b84942463c65f485e25d845b9e3308d
frontier.zip
extract the schematics to schematics/rail/frontier - crashlog:
Notes
Viewers
- Add a thumbs-up to the bug report if you are also affected. This helps the bug report become more visible to the team and doesn't clutter the comments.
- Add a comment if you have any insights or background information that isn't already part of the conversation.
I've seen some interesting things in com.minecolonies.coremod.client.gui.WindowDecorationController:
In the constructor, it seems like the schematic path of the tile entity of the decoration controller contains the decoration level, based on the initialisation of the decaration path input box:
textFieldName.setText(controller.getSchematicPath().replaceAll("\\d$", ""));
But at the place the upgrade button is initialised, it seems like the schematic path doesn't have the level in it:
structure =
new LoadOnlyStructureHandler(world, b, controller.getSchematicPath().replace("/structurize/", "") + (controller.getTier() + 1), new PlacementSettings(), true);
//...
if (structure == null || !structure.hasBluePrint())
{
findPaneByID(BUTTON_BUILD).hide();
findPaneByID(LABEL_NO_UPGRADE).show();
}
So it seems like something has changed in storing the schematic path. Where previously it didn't have the level in it, it looks like it does have the level stored in the schematicPath
in more recent scanned decorations
The question is whether the schematicPath is stored wrongly and shouldn't contain the decoration level in the first place, or the code that tries to find the blueprint for the next level needs to be adapted for the decoration level
Looks like the trailing level thing changed in #7235. Which I think was primarily intended for Frontier. ๐