Velvet Star Monitor

Standout celebrity highlights with iconic style.

news

What constitutes a house for villagers?

Writer Olivia Zamora

I was trying to create a small village in Minecraft. As I am in Single Player and wanted some neighbours, I spawned a few NPC villagers using spawn eggs.

Even though they are good neighbours (they don't play the music too loud and don't argue with their wives), they won't spend the night in any of the houses I built.

Buildings are very basic structures made of wooden planks with a wooden door (I read on the Wiki it was the door that made the house for NPCs). Am I missing something? How can I decide my NPCs to live in the houses I made? Do I need to build a real estate agency (;-D)?

0

2 Answers

You are using version 1.1, and new villager behaviour, including populating player-built houses, is not implemented until the 12w07a snapshot. This will be included in the 1.2 release.

If you are running a new enough version, a house is a structure:

  • made of planks, with walls, floor and ceiling.
  • with a door.
2

i've done it! it's a little involved, and might not be exactly what you wanted, but here it goes.
according to the wiki, a Villager's Brain NBT tag seems to do the trick. here's the syntax i used that seems to work after 10 tests;

/summon minecraft:villager ~ ~ ~ {Brain:[{home:[{posX:*,posY:*,posZ:*}],dim:*}]}

obviously y'all know what the summon, villager etc. does. lemme explain the NBT;

Brain being the parent is a little self explanatory- it's everything the Villager needs to know it should do.
home is the tag that says the location of the bed. i used the bottom portion of the beds, and it seemed to work each time, so safe to assume that's the master block. you'll need specific coordinates in posX, posY, and posZ instead of "", since i only used "" as a wildcard for the explanation.
dim is the dimension ID that the bed is located in-- 0 for the Overworld.

this is up-to-date for 1.13, and i have not tried this in any snapshots. if anyone wants to test this further in case my results were freak coincidences, or whatever, please feel free to do so.

3