A while ago I had presented Structurize which is an extraction + some additional features of the structure handling of Minecolonies.
But, I actually never removed the code of Minecolonies itself and use Structurize as a dependency.
This is important because this way we have less code in Minecolonies and only very Minecolonies specific code there and when we want to fix something we don't have to fix it in both repositories.
Now, the code for that won't tell you very much about what I actually did and it is also difficult to explain
We removed over 24k lines of structure handling and had to add over 320 lines only on the side of minecolonies for the compatibility.
In the Gradle dependencies, we added structurize.
And added a configuration to include it in the jar.
In the jar code, we would not include the structure source-set anymore (doesn't exist anymore) and would now include the configuration details we included.
One of the compatibility changes I had to make was overriding the right click event of the build tool (which is now a structurize item) to still open the minecolonies build tool window (which extends the structure window) which is necessary since we don't have building handling of minecolonies building in structurize.
On the side of Structurize, I added the IAnchorBlock interface.
Which minecolonies blocks can implement so that structures are centered around them.
This is important because minecolonies structures rotate around the hut chest, the hut chest is considered the center of the building and it will be placed where the player clicked.
Finally, I also added a way to port the minecolonies blocks to structurize blocks.
This way minecolonies decorative blocks which would else disappear from the world (since excluded from minecolonies) will be remapped to the structurize blocks.
Pull Requests on Minecolonies: