Affects Version/s: Minecraft 18w48a
Fix Version/s: None
When a villager is outside the valid housing detection range, it will refuse to open its GUI, even if it used to.
This "I am not in a village" state resets/corrects itself when the villager detects a newly placed door which creates valid housing. It doesn't work if a different block is pushed into/out of place to make an already placed door a valid house.
How to reproduce:
1) Place a door with a roof block adjacent & above it to make it a house
2) Spawn a villager in the area and wait a few seconds for him to detect the door
3) Open its GUI (notice this works as expected)
4) Place or push another block on the other side of the door to make it invalid again
5) Open the villager's GUI after a few seconds (still works)
6) Replace the door
7) Open the villager's GUI after a few seconds (nothing happens)