4

I'm making a village and I don't want the villagers to go around entering my home or other people's, so how can I make them know where they live?

3 Answers 3

9

The easiest way would be to put them all in mine carts, that way they simply can't wander at all. But you'd lose the feel of having a village.

As Keith M said, The villager AI isn't smart, they will wander around and open/shut wooden doors constantly, and at dusk they will try to find any nearby house to stay in. There's no way to assign specific houses to specific villagers, it's a free-for-all. That said, you can put barriers in place, say cobblestone walls for example, that make just one house available to a villager inside his area.

As for your house, there are many possibilities:

  • Use an iron door with a button to get in. A fence gate would also work, anything the villagers don't understand how to use and won't randomly trigger, like a pressure plate.
  • Wall off your entrance with walls or fences in the same way I mentioned above. Placing carpet on a wall or fence will allow you to jump over it, but no mobs or villagers will be able to.
  • Build your house just outside the village instead of in it. This is what I typically do when I live by one since it also gives you room to grow without running into parts of the village.
  • Make a fun way into your house that villagers can't use, like a slime block + piston launcher. Or a drop onto a slime block that lets you jump over some obstacle. This is a great problem to have fun with and be creative!
5

Easy answer, you can't. The game doesn't provide anything like that, the villagers are just random AI.

2

You can, by using the command:

/summon minecraft:villager ~ ~ ~ {NoAI:1}

This prevents the villager from walking and looking around. Maybe this is not what you want but I use it in maps very often

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.