Page 1 of 1

Villager Command Clock?

PostPosted: Sun Aug 20, 2017 9:38 pm
by EliasRipley
Heyo.
The other week I made a thread in 'bug forum' about a vanishing villagers. Turns out that all villagers are probably slowly dying out in the server.
It's because we use mob grief off, that means that villagers can't farm or pick up food they're given. This means that if the village is loaded, they will be getting munched by zombies, yet can't breed.
I found a dude who has fixed this problem on his server, which also uses mob grief off. He is using a clock command to set all villagers 'willingness to breed' to maximum every 5 to 10 mins.
http://www.minecraftforum.net/forums/minecraft-discussion/redstone-discussion-and/commands-command-blocks-and/2785852-automatically-making-all-villagers-willing-to
I'm about to log on and try to get them going with trading. Let me know what you all think of this solution though.

Re: Villager Command Clock?

PostPosted: Mon Aug 21, 2017 8:34 am
by Forseth
I'm not sure I see your point. You can breed villagers just fine by trading with them and villagers don't disappear. Protect them properly and make sure you have enough "houses". Then just trade with them to keep them going.

As for dying out, mobs (hostile and passive) can't act unless the chunk they are in is loaded. Which means that they won't breed nor be killed, unless someone is in or close to that chunk.

As for the clock command, I'll leave that for the more informed.

Re: Villager Command Clock?

PostPosted: Mon Aug 21, 2017 2:33 pm
by EliasRipley
Indeed they won't die unless as player is near, although in highly populated areas, that could be quite an issue. Also zombie sieges are a way villagers could die quite fast. Think they are able to spawn even in lit areas, though they only occur on hard mode. Not sure if we are on hard or normal here.

Re: Villager Command Clock?

PostPosted: Tue Aug 22, 2017 1:36 pm
by Forseth
Okidoki. So I talked to AB, who was kind enough to inform me that there actually is a way for villagers to disappear.

One way is using a bug/glitch where the villager is placed on the chunk border (between two or more chunks) and thus duplicates or disappears when the chunks unload
Link to that problem:
https://bugs.mojang.com/browse/MC-108469

Another way for them to disappear is by causing the village to get a bad reputation. Bad reputation goes down when you kill a villager or naturally spawned golem. Then, when the server restarts, the save function for the reputation could fail to load causing them to disappear
Link to a youtube video explaining the problem (by Tango Tek):
https://www.youtube.com/watch?v=pOV-08RHLlM

Either way, that's something to look out for.

Re: Villager Command Clock?

PostPosted: Tue Aug 22, 2017 1:53 pm
by Dax23333
Another thing that can happen is them getting struck by lightning, which causes them to turn into witches.

This is not reverseable and they despawn if not near a player anyway, so would look like the villager simply despawned.

Re: Villager Command Clock?

PostPosted: Thu Aug 24, 2017 6:11 am
by EliasRipley
Dax23333 wrote:Another thing that can happen is them getting struck by lightning, which causes them to turn into witches.

This is not reverseable and they despawn if not near a player anyway, so would look like the villager simply despawned.


Interesting, didn't know about that one. The villagers seem to prefer being inside during a thunderstorm, but if it's during the day they might wander out and get struck I suppose.

Re: Villager Command Clock?

PostPosted: Thu Aug 24, 2017 12:14 pm
by SwayLight
If you have them in a custom built place, remember that lightning will strike through non-solid blocks, also given how old the server is and other mojang factors it can still happen through solid blocks on ocassion.

Re: Villager Command Clock?

PostPosted: Thu Aug 24, 2017 1:24 pm
by Dax23333
Even if working correctly it can hit them in houses, the AoE of the strike goes down about 3 blocks from where it hit. So even in a house, if it has a low roof they can be hit.

Re: Villager Command Clock?

PostPosted: Thu Aug 24, 2017 5:28 pm
by Mellorian
Thought this would be a fairly obvious point, but if you have a command block making villagers willing,
wouldn't that affect players' villagers too?

Re: Villager Command Clock?

PostPosted: Sat Aug 26, 2017 1:08 pm
by EliasRipley
Mellori wrote:Thought this would be a fairly obvious point, but if you have a command block making villagers willing,
wouldn't that affect players' villagers too?


Yeah, but if there isn't enough doors in the 'village' no breeding would occur. So if the player only wanted a specific villager, they just could avoid placing doors nearby. On the flip side, if players created breeding areas / door filled caverns we might end up quite laggy.