How I can add render custom stuff on the map?
slava110 opened this issue ยท 4 comments
Hi! I'm developing a mod with claiming system. I'd like to render claims on the map, but I'm not sure what's the best way to do it:
- Mixin into vanilla code and create custom decorations
- Use Moonlight library to add custom decorations (not preferrable, additional dependency)
- Find a way in your mod to render custom stuff directly
Would be cool to have some sort of API to render custom stuff on the map (with the ability to add toggleable buttons on the side).
Hi. So map atlases functions very different from other map mods as it's not client sided and it's driven by the existing map system the game has. This means that adding and drawing stuff there is not as easy as it seems. I have a system that allows to easily add custom map markers. Moonligjt is a hard dependency of map atlases as it uses a bunch of it's map related features and all it's custom markers and pins are done this way. I'll go into more detail once you give me more info on what exactly you want to do, for instance do you want to add stuff to a Map or just the map atlases screen?
I want to add overlays to the map rendered on the screen and I want to add additional overlay toggle button (see image below). I don't want to add extra item data if possible.
I have 2 concepts for claiming system.
- Simple claiming system. Allow players to claim areas of the world freely (similar to WorldGuard):
- Divide world into regions at generation and allow players to claim these regions (something similar to TownyProvinces)
Right so those boxes would not be map decorations at all as for one they would not belong to any map in particular and because even if they did they would span across multiple maps. It would be a sort of overlay applied to the screen. This requires some new code as nothing in the mod works like that. I'll see if I can come up with something but feel free to looking into making a pull request.