How to Add Cartographer Map Trades for Your Custom Structures
What This Does
Integrated API provides easy-to-use cartographer map trades, letting village cartographers sell explorer maps that point to your own custom structures instead of only vanilla ones. This is the standard way structure mods make their content discoverable in survival.
Setting Up the Trade
1. Make sure your structure is registered and has a valid structure type/tag through Integrated API's data abstractions.
2. Open your structure's JSON configuration file.
3. Add the cartographer trade configuration block. You specify which structure (or structure tag) the map should locate, and the trade details such as price and map level.
4. Save the file and reload your world or datapack.
5. Find a cartographer villager, level them up to the appropriate tier, and check their trades — your structure's explorer map should appear.
Testing Tips
Use creative mode and a fresh villager to test quickly, since cartographer trades unlock at specific profession levels. If the trade doesn't appear, verify the structure's ID matches exactly what you registered and that the structure can actually generate in the world. Maps only work if the target structure is placed in a biome/region the map can search.