Only scan world if Villager profession has secondary POI - #14144
Conversation
|
This doesn't need to run the memory erasal logic? |
|
I'm unsure if I understand your question correctly. The memory erasure logic is still run (as the |
|
I blame my lack of sleep |
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
Was already done in Lithium: Not sure if taken from it, but just mentioning the credit. |
TIL. Good to know I'm not the only one coming to this conclusion but this was discovered independently while writing up this blog post. |
In Vanilla all Villagers query (and potentially even load) all blocks in a 9x5x9 area around them via the
SecondaryPoiSensorto search for valid secondary POIs even though most Villagers don't actually search for any. Only the profession "farmer" searches for a secondary POI (the farmland) in Vanilla making these.As not the full logic can be seen in the patch, here is the unnecessary loop which is disabled unless the Villager's profession has secondary POI set:
In order to keep the rest of the logic with the memory intact only this loop is disabled, not the whole sensor.