SpongeAPI
SpongeAPI copied to clipboard
Missing Village/City API
Recently while playing minecraft survival i stumbled upon a minecraft village. After a short look in the API i noticed that there is no data object/interface that deal with them in the API.
So i would like to discuss this topic here a bit. It probably has low prio, but IMO there is a lot to discuss.
Here a short list of features, that are/could be connected to the VillageAPI.
- Village/City
- Create new
Villages - Merge existing
Villages? - Delete existing
Villages? - Add
VillageDoors to theVillage- Even doors that otherwise does not meet the requirements of the
Village?
- Even doors that otherwise does not meet the requirements of the
- Remove doors from the
Village - Add
Villagers to theVillage - Remove
Villagers from aVillage - Change
Villagepopulation ratio (0.35?)- Global, Per World or per Village
- Is the
VillageStored inside theChunks or inside theWorld? - Is it a plain property/
DataSerializableor is it something special likeWorldBorder. - Change
Golemratios- Global, Per World or per Village
- Change
Villagerange (16 blocks?)- Global, Per World or per Village
- Change relation between
VillageandPlayer
- Create new
- Villager
- ~~Assign a home a
Villager(Do they know their home at all? or just their village?)~~
- ~~Assign a home a
i'm pretty sure the Villager AI doesn't decide on a home and just tries to occupy one they randomly select, if not the closest one.
To be honest, something like this does not seem useful at all. All of these effects would be simulated by competent AI code as well as listening to a few events. While there are use cases, they're so few and so specific to Villages themselves that I can't help but think that implementing this would be a waste of time.
what's probably more useful that can branch off to this is structure generation. one can listen for generated villages and handle it accordingly by assigning data that pertains to the generated area; we don't really need a specific api just for villages. if that was the case, we'd need it for every type of generated structure, and that seems a little unclean.
@Xemiru The homes for villagers is probably is AI code, you are right.
if that was the case, we'd need it for every type of generated structure, and that seems a little unclean.
The dungeon for example does not store any data afaik.
@gratimax The most important part for me is adding a door to a village or detect whether a door belongs to a village. I probably don't want to write an entire Villager AI just to add a door to a village.
@gratimax I disagree on that, I think that the API for supporting Villages is nessicarily specific to villages. Not sure the proposed structure is the best, but if the API matches up with the game itself, this does make sense.
At least part of this would be covered by some world generation API pieces I have planned which would add support for structures (villages, mineshafts, nether fortresses, strongholds, desert temples, and those underwater things) after I'm done with the populators.
Well this is really an issue since the lack of village api affects the api of some ais.
the lack of village api affects the api of some ais.
That's why this is an open issue and not a closed issue.