Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-50441

Villagers detecting beds and workstations they can't reach

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • None
    • 1.19.80.21 Preview, 1.18.20.21 Beta, 1.17.30.23 Beta, 1.17.11 Hotfix, 1.17.10, 1.17.10.20 Beta, 1.16.210.59 Beta, 1.16.200.56 Beta, 1.13.2, 1.14.1 Hotfix, 1.11.4, 1.12.0, 1.14.30 Hotfix, 1.14.60 Hotfix, 1.16.0, 1.16.100, 1.16.200, 1.16.201 Hotfix, 1.16.210, 1.16.221 Hotfix, 1.17.2 Hotfix, 1.17.30, 1.17.40, 1.17.41 Hotfix, 1.18.2 Hotfix, 1.18.12 Hotfix, 1.19.0, 1.19.20, 1.19.60, 1.19.62, 1.19.71, 1.19.72, 1.19.83 Hotfix, 1.20.1 Hotfix, 1.20.12 Hotfix, 1.20.15 Hotfix, 1.20.62 Hotfix, 1.20.81 Hotfix, 1.21.2 Hotfix, 1.21.44 Hotfix
    • Confirmed
    • Multiple
    • 318266

      Updated description by GoldenHelmet

      Steps to reproduce

      1. Place a bed and workstation.
      2. Fully enclose the bed and workstation in opaque blocks.
      3. Spawn a villager.

      Expected result

      The villager does not link to the bed and workstation.

      Actual result

      The villager links to the bed and workstation, even though he can neither see them nor pathfind to them.


      Original description

      Very similar to MC-155238 I have a village behind my house, blocked in by fences/gates, the villagers are detecting my workstations through the walls and also my bed, which is a floor up and involves a spiral staircase made of slabs. Seems the villagers are not using a pathfinding algorythm but are instead just going off raw distance

      Workaround by Auldrick

      You can easily work around the specific problem of villagers claiming beds and workstations you don't want them to by placing them where a villager can't detect them.

      First, you need to slightly adjust how you think about villagers detecting POI blocks (beds and workstations for our purposes). Without going down the technical rabbit hole, think of it as follows:

      1. A villager can only discover POI blocks that are within 16 blocks horizontally and 4 blocks vertically of their position.
      2. When a villager discovers a POI block, it immediately communicates the kind and position of the block to all the other dwellers in its village.
      3. If a POI block is broken, all the village dwellers instantly know about it and forget the block.
      4. Any villager can claim any POI blocks that isn't already owned, regardless of which villager discovered it initially.
      5. The block has to be rediscovered by one of the villagers every few minutes (the exact time is unknown or unpredictable) or it will be forgotten.

      Given the above rules, it's easy to see that all you have to do is keep your personal POI blocks at least 16 blocks horizontally and/or 4 blocks vertically away from anywhere a villager might stand. Ways to keep the villagers away might include:

      • Placing your blocks on a hill or in a valley where they can't pathfind to (but make sure there are no hills or caves they can get to that could get them in range).
      • Building a defensive wall or fence around the village, then subdividing it with another fence or wall to make yourself an enclave. Make sure your blocks are at least 16 blocks from the dividing fence.
      • Dig a hole about 7 blocks below the lowest point in the village and build your mini-base in it. Make sure there are no caves around that villagers could get into.

      If an accident happens and your POI blocks are discovered, just fix the problem that let the villagers get too close, get them back where they belong, and then break the POI blocks and replace them.

        1. detecting_through_wall.png
          517 kB
          ricstrr
        2. outside_view.png
          830 kB
          ricstrr
        3. villager.png
          1.15 MB
          Tims
        4. villager 2.png
          864 kB
          Tims
        5. Villagers aren't very smart.mcworld
          61 kB
          [Mod] GoldenHelmet

            ricstrr ricstrr
            Votes:
            123 Vote for this issue
            Watchers:
            55 Start watching this issue

              Created:
              Updated:
              CHK: