Altering Structure Generation

Started by TheBlueishTrashCan on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Altering Structure Generation

(Cross-posted on Reddit)

I have no idea where to even start with this one.

I'm looking for a way to alter vanilla structures using MCreator and I just can't figure out if that's possible, or where to start. Specifically, what I'm hoping to do is add a particular structure onto the existing stronghold. Not completely overhaul it, just... add a few things that will spawn in each one every single time. I've looked within the program itself to try and see if I can cause the structure to spawn under certain conditions, or on certain blocks, but so far have not been able to understand if that's possible either. I've tried to do some googling on this topic and haven't really had much luck, so here I am.

Bottom line, is it possible to change or add onto a vanilla structure using MCreator? If so, what part of the program do I use to do that?

I see there is a post on here asking something very similar a couple years ago, but the only reply on it is not helpful; It simply states that custom code is needed, but fails to explain what kind of custom code, or if this is something that can be done through MCreator.

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I've been working on a…
Sun, 11/19/2023 - 16:50

I've been working on a structure overhaul mod for quite awhile now, and ultimately decided it was easier to just replace the vanilla structures entirely- but yes, I ran into this problem back when I was starting.

The issue is that different minecraft structures generate in different ways. The Woodland Mansion, for example, has a series of NBT files that contain the data for the different possible rooms, and since these are in the game's data files, you could probably alter them with datapacks by overriding the default NBT files, no mod required. (In this case replacing existing structure components. It may be possible to add new components without replacing old ones, but that would require some deeper digging.) If you're curious, here the MCAsset link for the available structure data. (You can  also use MCAsset to get vanilla loot tables, textures, etc.) 

But older structures, (like the stronghold), aren't generated as real 'structures.' Dungeons, for example, are generated as world features for some god forsaken reason, meaning they can still be overridden, but you need a completely different file setup to do so. Weirdly, I couldn't find the data files for the stronghold in structures, or world features, so I'm not entirely sure where you'd look for this. They have to be somewhere, obviously, but believe me, I've looked.

...It might be possible to get the positions of a stronghold, (since you can do this with commands), and then somehow run commands at those positions to add rooms, but that doesn't seem like a great workaround.