Skip to content

Abandoned colony improvements - #11697

Open
Thodor12 wants to merge 3 commits into
version/mainfrom
feature/abandoned_colony_improvements
Open

Abandoned colony improvements#11697
Thodor12 wants to merge 3 commits into
version/mainfrom
feature/abandoned_colony_improvements

Conversation

@Thodor12

@Thodor12 Thodor12 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

Checklist

  • I have read and accept the Contributing Guidelines
  • I have tested and confirmed my changes are working on the most recent commit of this pull request
  • I have used AI in the creation of this pull request

Related issues

Closes discord issue (other styles cannot be added to worldgen)

Changes proposed in this pull request

  • Makes it possible for addons to register worldgen styles into the primary minecolonies empty_colony structure set, to share the same placement pool.
    • No code needed for addons, besides 1 singular method invocation:
@Mod(MOD_ID)
public class StyleColonies
{
    public static final String MOD_ID = "stylecolonies";

    public StyleColonies()
    {
        ColonyStructureRegistry.register(new ResourceLocation(MOD_ID, "steampunk_colony"));
    }
}
  • For the rest you just define the structure files as normal within the mod, and the generation of the structure will automatically be picked up by Minecolonies
  • Rewrite the empty_colony structure set into a dynamic pack resource, acting almost as an in memory datapack that resolves the structure set, whilst also allowing modification by addons to inject other worldgen styles.
  • With this change it was suddenly also possible to control abandoned colony spawning via a common config (not server config, loaded too late), so I added this too so we no longer have to rely on external datapacks for this.

Review please

@Thodor12 Thodor12 self-assigned this Jun 1, 2026
Comment thread src/main/java/com/minecolonies/core/structures/ColonyStructureRegistry.java Outdated
@Raycoms

Raycoms commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

So I thought long and hard about this. I think the best approach is to minimize the amount of code addons need. It's okay if they need code, but we should just minimize it. (E.g. allow them to extend our classes and call utility methods in our class, etc). So that they just need the Mod.java + a few method calls with a string parameter in it. Yes, it would be a completely new type of structure (not part of our set) but that's okay enough I'd say.

@Thodor12

Copy link
Copy Markdown
Contributor Author

So I thought long and hard about this. I think the best approach is to minimize the amount of code addons need. It's okay if they need code, but we should just minimize it. (E.g. allow them to extend our classes and call utility methods in our class, etc). So that they just need the Mod.java + a few method calls with a string parameter in it. Yes, it would be a completely new type of structure (not part of our set) but that's okay enough I'd say.

So that means this change is ok, given it's only a singular method call?
(Plus it doesn't impede on vanilla datapacks regardless of what)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants