Brettflan / WorldBorder

Bukkit plugin for maintaining borders for your worlds to limit their sizes, as well as generating missing chunks or trimming excess chunks.
https://www.spigotmc.org/resources/worldborder.60905/
BSD 2-Clause "Simplified" License
139 stars 211 forks source link

update POI as well as regions? #169

Open timriker opened 4 years ago

timriker commented 4 years ago

When trimming worlds, the regions/ files are removed for cleaned regions, but the poi/ files remain for regions that used to exist.

My understanding is that this causes POIs to not get recreated correctly if chunks and regions are later regenerated.

What is the impact of leaving the poi/* files? Is there a way to force them to be cleaned?

Brettflan commented 4 years ago

Hmm, I had no idea. I just checked briefly and see that the "poi" folder was added in 1.14. According to the MC wiki, those files are for "villager identified beds, job sites, and bells in the world".

I wouldn't think that leaving them would cause problems later down the line if the generation methods remain the same, but if something changes in world generation (from plugins, MC updates, or whatever), it might have some impact. I could be wrong and it could also cause problems as you describe, though.

Probably best to remove those for trimmed regions even if just to be on the safe side then, yes. I'll try to make some time soon to implement that.

timriker commented 4 years ago

The old .dat files probably had villages and other items in the now-freed regions that should be deleted. I've not looked into the formats and contents for those. The new poi/* items seem to have the same names as the regions they cover. That's convenient. :)

timriker commented 4 years ago

In the past, regenerating a region when the village.dat was there I think is the cause of the partial village bugs. Half houses and such. A lot has changed since then, so no idea if it makes a difference now. It seems cleaner to clean them up and have them get rebuilt if/when the region is rebuilt.