In 1.4.7 (only version I've tested and debugged this), normal zombie spawns can attack a village, as usual, but the real "siege" fails to start.
Tested by adding suitable console messages to VillageSiege class, tracking the midnight-test and when it starts spawning the extra zombies. Without a fix, it never happens.
Reason
While trying to start a siege, the process first looks if it can find a suitable spot to spawn the zombies (slightly cheating here; normal spawn rules seem to not apply). However, the method that looks for an exact spot to spawn at is missing a 'return'. Thus, a found valid spot is never returned and the siege start process just keeps on with a futile attempt at looking for spots...
Here is the bugged method, as seen by MCP:
VillageSiege.func_75527_a(int, int, int)
private Vec3 func_75527_a(int par1, int par2, int par3) {
for (int var4 = 0; var4 < 10; ++var4) {
int var5 = par1 + this.worldObj.rand.nextInt(16) - 8;
int var6 = par2 + this.worldObj.rand.nextInt(6) - 3;
int var7 = par3 + this.worldObj.rand.nextInt(16) - 8;
if (this.theVillage.isInRange(var5, var6, var7) && SpawnerAnimals.canCreatureTypeSpawnAtLocation(EnumCreatureType.monster, this.worldObj, var5, var6, var7)) {
this.worldObj.getWorldVec3Pool().getVecFromPool((double)var5, (double)var6, (double)var7);
}
}
return null;
}
Fix
...
if (this.theVillage.isInRange(var5, var6, var7) && SpawnerAnimals.canCreatureTypeSpawnAtLocation(EnumCreatureType.monster, this.worldObj, var5, var6, var7)) {
return this.worldObj.getWorldVec3Pool().getVecFromPool((double)var5, (double)var6, (double)var7);
}
...
Adding that missing return allows the rest of the process to finally find a suitable spot, start the siege, and spawn each zombie (even inside fully lit buildings, though, but this is known thing, worth of another issue).
EDIT: Important addition
I didn't figure this out at first (since I was fixing it "on the fly"), but once the above fix is done, another problem surfaces. The initial state in the siege engine is -1, but there is no proper handling of that state. In a new world this would not be a problem since the world starts into a day, which resets the state to 0. However, if an existing world that is currently in a night is loaded into a fixed game, the incorrect state slips through...
More fixing
Harder to explain the exact location of this fix, but in the same class, method tick(), right after all the code that checks that state-variable, add:
if (this.siegeState == -1)
return;
Related issues
is duplicated by
Comments


And I think I just found and fixed another bug in the same class/feature. See MC-7488.

Very nice indeed, good job, I was wondering what happened to Zombie sieges...

looks like they did this on purpose because the functionality is buggy.

If they wanted to disable this intentionally, they would have just arranged 'return' in the begin of the relevant "root" method for sieges (or skip the method call completely), instead of doing tons of wasted CPU work between each midnight and morning. Also, as far as I know, the addition of sieges has been published, but there is no word about disabling them.

If they do re-enable them, I hope they would find a way to make them not spawn inside houses. It was a pain in the ass :/

they dont need to FIND a way to fix this they already had one great work! 😃

I wonder why this hasn't been seen by Mojang

While this bug still exist in 1.6.2, the normal zombie spawning and their new range of aggression makes them actually worse than the actual siege (when it worked). Normal spawning can reach quite devastating levels even well before midnight, and they attack even small villages, unlike the siege-mechanism which will not attack villages with less than 10 valid doors.
Needless to say, village-vs-zombie balance does not currently exist; zombies will eliminate any village (even at lesser difficulties, as they can occasionally hit through the door) in night or few. The only positive side is that unlike real sieges, these normal non-siege zombie attacks can be blocked with light and fences.

I do hope the siege isn't fixed before villages are granted a superior defence. Currently, even in the minecraft world it is simply illogical for any villages to exist in the first place (how on earth would they when a single night is fatal?). It would make more sense for fences, walls, better lighting to become part of village generation. On top of this, one iron golem isn't enough for a night of defence, half the village will still be wiped out because the golem can only move so fast.
The new difficulty system could work well here though. Perhaps any village should be able to outlast the first x nights that the player spends there. The difficulty will then increase the longer the player hangs around and he/she will then have to take action to protect the village.

yeah, i think they should make zombies deal only 1 point of dameg (half heart) to villager, and have an way to cure zombie villagers without player intermission. Maybe villager priest can do that job?

Even if current conditions provide a similar state, this is still broken code which continuously attempts to run, failing each time due to the errors. It'd be best if this was either fixed or removed.

Priests curing zombies. Nice idea.
Better still any zombie that hits a priest is either cured or destroyed on the spot (with a special effect), due to the all powerful nature of their God, Notch.
This means any village with a priest will generally have a pocket of safely around the priest of the village, though it would probably cease to be a village on hard mode as all the doors will have been removed, and the villagers all start wandering away.
Perhaps the blacksmith automatically replaces doors when he sees an appropriate doorway frame. And farmers automatically harvests and replants any full grow grown crop they walk over, but keeps the product! That means the farms get cycled, but players can not benefit! Unless they harvest the crop before the farmer walks on it.
What could librarians and butchers do?

This seens a good idea, unhaply i think it will not happen so soon =/

I'm actually happy that this bug is here. Now you can't be afraid that Villagers aren't safe, inside or outside.
Also, I have some Villager suggestions for my own.
-Make Iron Golem spawning requirements halfed (5 Villagers, 15-16 Doors)
-Let Villagers do more (eat, swim, farm, Butcher, Make more sounds)
-Let Librarians make random Written Books

A reminder that this site is for bug reports only. For feature suggestions or changes please use the Minecraft Forums: Suggestions.

ok, we'r just chatting. it's not really a suggestion, it's stuff we think should change, but that will probably not happen.

Confirmed in snapshot 13w39a (as well as the other 1.7 snapshots)

Personally, I'd be way happier if they marked it Works as Intended or Will Not Be Fixed, because if sieges come back with the same behavior, villages are simply unsurvivable.
Specifically, siege zombies can spawn in lit spaces (inside the houses),<i>and</i> near the player. And apparently if there are no open spaces on solid blocks (say the village has been floored with slabs), they can spawn in <i>doors</i> or even solid blocks, then walk out of those toward villagers. That leaves no defense short of unloading the chunks.

Making a village zombie-proof is "easy". We came across the answer by accident.
1. Make sure that there are dark spots in, around, and outside the "village". Zombies will spawn there.
2. Make sure that zombies cannot get to the villagers; fences / glass / iron gates / elevated platforms do wonders here.
"Village" is defined by a large square around where the doors are, not where the doors are or where the villagers can walk.
We stumbled across this by accident when making a "research lab" over a frozen lake, with part of the "village" elevated over ground. Lots of things spawned under the walkways, around the walkways, outside the buildings, etc, but nothing inside the iron-gate walled elevated pathways.
Only thing that could get in were spiders.

NB: The first step in fixing sieges: Get the inside of the rooms "safe" from zombies. Seriously, the houses have dark spots. No wonder there are so few people in the villages – they were sieged before time 0.
(doesn't explain the low reproduction rates of natural villages 🙂

Keybounce, my point about zombie sieges was not that they can be safe, that players shouldn't need to protect them unless they hang around for long periods of time. The player can be distant from a village, not even knowing it exists and it gets besieged. It makes no sense what so ever that these villages even exist in the first place if they get wiped out so easily without player intervention. They NEED defences of their own, generated the same time, or at least villagers should be able to defend themselves against multiple zombies before being taken out. It has no balance at all.
Back when villages were besieged, half of the villages I came across were baren, and they're hard to find as it is. The fact that mobs get stronger the longer you stay there means an initial defence strong enough to overcome a couple of sieges would be a perfectly reasonable generation. This should be implemented before sieges are reinstated.

I agree.
Villages are currently badly designed, expected to be wiped out, have dark spots inside their "safe" houses; villagers will walk outside as soon as the sun comes up while zombies are still out there; etc.
The current design of villages needs to be improved.
The current "houses without doors" needs to be fixed on generation.
The whole "you need 8 (9?) doors before any survivors will breed, but you probably won't get that many in any village" means that a village is never expected to survive.
The whole "harder difficulty == village more likely to be wiped out" implies that a village is supposed to be something to be an aid for players, but the whole trading system is broken for that.
Yes, I think that villages should, by default, be big enough that they expect to survive a siege and repopulate; that sieges should generally be rare; that villagers should stay indoors until the monsters are gone; that the houses and churches should be safe. That's not what happens.
So both sieges AND villages are broken.

@Keybounce
Those "easy" instructions to make village zombie-proof only work against the current normally spawned zombies. As mentioned many times, the "real" sieges will happily spawn its zombies almost wherever, and there usual (and even more exotic) tricks will not work.
There seems to exists a way to make a village fully safe, but that would abuse something I'd consider a (design) bug, isn't easy to do, and makes the village look somewhat artificial, so, I'll just ignore it.
Also note that the real sieges do not attack villages that are small, and that your idea how a village is defined (for zombie sieges and many other things) is slightly incorrect.
However, it is still true that both normal spawns and sieges are simply overwhelming against any (normal) size current village, due to zombies' "power" and their ability to hit through some doors occasionally (combined with villagers' desire to linger near doors). Thus, indeed, first the zombie vs. villagers balance must be corrected, for any/all sizes of villages, and only then start fixing these sieges.

I have been under the impression (from reading the wiki and other things) that a village is defined by a villager near a door; once villagers sense a door, then a village is recognized by the game. If multiple villages have overlapping bounding boxes, then they can be combined into one bigger village. The size of the village's "box" depends on (number of doors? number of villagers? not sure which), but has a different height versus villager breeding / population cap, which allows for "split-level" villager farms.
Beyond that, the wiki article has changed since I last looked at it. Last time I checked it, it said that zombie sieges would attempt to start at the edge of the village, and only switch to spawning inside the village if it could not find darkness at the village edge. My memory of the article was that it said that zombies would spawn in dark places first, lit places or slabs as a last resort.
Equally, the need for a large village is news to me – I thought smaller villages would get smaller sieges (and it was probably just normal zombie spawns then.)

The wiki articles have some mistakes. When it comes to zombie sieges, I haven't bothered to make corrections, as the sieges do not work at all anyway, and the rules can change once fixed.
The village size definition may have changed since I last checked it, too. I don't remember all the details any more, but I am recalling that the size depends on the range of the door furthest away from the weighted center of all doors of that village. However, even that changes when player moves (when chunks get unloaded/loaded... that is another issue...)
In any case, these details have nothing to do with this issue, getting the sieges started.

In 1.7.4, I observed five or six zombie sieges over the course of about three hours.
With a population of 40+ villagers (this appears to be key).
My village is a long straight row of booths closed on three sides with a one block opening on the front. (now a half block opening. 🙂 )
I observed groups of about a dozen zombies spawning in a LL12 block twice. The other three times, I heard them but didn't see them spawn.

Please, don't post tickets if you know the solution.

@Cailan would you elaborate on what you mean with that 'ticket' and 'solution'? This whole issue, or just some (probably previous) comment? The way I understood your comment, my reply would be "you're 100% wrong", and as such, I think either you or I may have misunderstood something.
@Stephen
Are you absolutely sure those were actual siege spawns, not just random zombie spawns which just happened to gather into the village. You know, both siege and normal zombies are the same things and behave the same after been spawned, only the mechanism by which they are spawned is different.
This is one of the issues which can only be checked properly in the source code. That is MCP + fixing it a bit + manual work on the results, which is why I do not check often whether this issue is still valid or not. It would be take about 10 minutes for Mojang to fix this (or 30seconds to declare "wont fix"), it takes couple hours for me to just check if it is still there (per version). (Though I still hope they do not fix this until they fix the village vs. zombies balance.)

@Cailan And why not. It is a bug, this is the fix. That is what bug forums are for.
Actually if they do fix it, they better fix the bug involving the start point of a zombie siege.
They should start at the edge of the villager radius, not in the middle of the village.
See related bug MC-7488
This is the problem with bucket/spigot servers. They fixed zombie sieges, bit not the siege spawn point.

PLEASE FIX THIS

Thanks Ryan ! 🙂

I see this is marked as fixed now, but MC-7488 isn't. Please fix that one too!

Yes definitely..
Please fix the related (but not quite the same) bug MC-7488.
Without that bug being fixed as well, zombie sieges can be very annoying, as they can and will spawn in the middle of houses and trading booths.
Thanks Mog for fixing this.
Nice job 🙂 you ought to be paid by Mojang for this, you found the bug AND fixed it.