Discussion in 'Plugin Development' started by Niv-Mizzet, Jul 14, 2020.
Hi, does anyone know how to check if a block is within a village?
Thanks in advance
@Niv-Mizzet What do you count as within a village?
In a block that made the village?
In a radius of the village?
@timtower A block that is part of the village; Like the grass path blocks or the wood to make the houses or the crops and the dirt beneath them and the wood around them.
This is the best I could fine, but it does not say a lot, don't think that Bukkit tracks it.
@timtower yeah I saw that. Is the radius of every village 32 blocks?
Saw villages that spanned ~150 blocks in height
@timtower so would there be a way to algoritmically determine all the blocks of a village; for example searching every chunk around chunks that you know are village chunks; however not searching the entire chunk?? or maybe finding all the bells and the wheat in range? or would it be possible to find all the blocks within a certain radius of villagers/iron golems?
@Niv-Mizzet Villagers and iron golems can be moved (so a normal base can become a village with that)
Knowing village chunks requires you to know those chunks.
Not sure if the base game tracks villages like the way you want it.
@timtower could you find their locations from the world seed?
I don't know about that.
Far possibility is using a worldgenerator, check which blocks change when a village is made.
Someone here uses NMS to get the Village, I'm not sure what good getting the village is but maybe there's a few things you can do with that.
Separate names with a comma.