What constitutes a house for villagers?
Solution 1:
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.
Solution 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.