The GenCreator Mod is an incredibly easy way to create randomly spawning structures in your world. Essentially it allows you to create a structure, fill it with loot and mobs, and then export that so it will randomly spawn in a newly created world. It’s great for multiplayer servers and very customizable.
The first thing you’re going to do is create your structure. This can be a castle, a dungeon, a village, a house, you name it. Create anything you want. It might help to note that you can set which biome this creation spawns in so plan around making it look like it fits the environment. Then you’ll want to add what will spawn in it in terms of loot and mobs.
You will want to place chests in the spots you want things to spawn. If you want to have a loot chest spawn you have three options for what you’ll find. Craft a piece of paper and write ‘[RANDOM]’ on it. Place that in the chest and a random selection of items will spawn in it. You can also just place whatever items you want in the chest and that will be what spawns. Or you can do a combination of both.
You can then set what mobs will spawn in your creation. It’s the same process but this will allow you to set what mob it is, how strong the it is, what sort of armor it wears and whether it will drop the items it’s carrying/wearing; that happens whether you add an emerald or not.
And then finally you can set the structure to have a trading villager. This works similar to the mob chest but now you can set what type of villager spawns and what he’ll trade for. The top row contains a villager egg. Wool next to the egg determines what type he’ll be. Pink gives you a priest, brown gives you a farmer, white a librarian and black gives you a blacksmith. Place a select number of potatoes next to that to determine how much health he has. Then below that place how much something will cost with what he’ll trade for below that. So for example place 1 emerald on the second line and below that place a music disc and that’s what the villager will trade for 1 emerald.
When you’re finished select the top and bottom diagonal corners of the structure by aiming at a block and pressing f10 so that you’ve made a complete selection of your structure. Then press f10 again to create the structure.
Here you’ll select the biome it spawns in and the rarity. Then select create and it automatically exports to the Minecraft config folder. All you have to do then is start a new world and find your structure.