SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Missing Village/City API

Open ST-DDT opened this issue 10 years ago • 8 comments

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 the Village
      • Even doors that otherwise does not meet the requirements of the Village?
    • Remove doors from the Village
    • Add Villagers to the Village
    • Remove Villagers from a Village
    • Change Village population ratio (0.35?)
      • Global, Per World or per Village
    • Is the Village Stored inside the Chunks or inside the World?
    • Is it a plain property/DataSerializable or is it something special like WorldBorder.
    • Change Golem ratios
      • Global, Per World or per Village
    • Change Village range (16 blocks?)
      • Global, Per World or per Village
    • Change relation between Village and Player
  • Villager
    • ~~Assign a home a Villager (Do they know their home at all? or just their village?)~~

ST-DDT avatar Apr 13 '15 18:04 ST-DDT

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.

Xemiru avatar Apr 13 '15 18:04 Xemiru

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.

maxov avatar Apr 13 '15 18:04 maxov

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 avatar Apr 13 '15 18:04 Xemiru

@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.

ST-DDT avatar Apr 13 '15 18:04 ST-DDT

@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.

Lunaphied avatar Apr 13 '15 19:04 Lunaphied

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.

Deamon5550 avatar Apr 13 '15 22:04 Deamon5550

Well this is really an issue since the lack of village api affects the api of some ais.

liach avatar Jan 06 '16 05:01 liach

the lack of village api affects the api of some ais.

That's why this is an open issue and not a closed issue.

gabizou avatar Jan 06 '16 05:01 gabizou