mojira.dev
MC-245873

Zombies will not break the door to attack villagers behind the door at the difficulty of "Normal" and "Hard".

I created a superflat world to see how a zombie break a door and attack villagers, and then I built a floating micro-platform (pictures will be attached in "Attachments") that disallowed zombies approaching villagers by walking on ground directly.

But when I put a door at middle and spawned a villager and a zombie in two sides separately, it's strange that the zombie did nothing (sometimes also shaking its head) instead of breaking the door! It's also confusing that zombies beneath the villager yet had the normal action of attempting attacking the villager. It seems that the zombie's AI have some errors to be fixed.

And also, the texts above is the reproduce method.

Attachments

Comments 7

Not all zombies can break doors. Is the zombie CanBreakDoors NBT set to 1?

SORRY, I don't know how to check it, but I think it might be "1", because I just set the world type "superflat", gamemode "creative" and generate structures "off" when I generate a new world.

I didn't change any "game rules" options and I didn't load any data packs and mods.

Hi, as partially stated above by @unknown, there are several aspects and criteria that need to be met in order for a zombie to possess the ability to break down a door. The requirements are as follows:

  1. The "mobGriefing" gamerule must be set to "true".

  2. The "difficulty" must be set to "hard".

  3. The zombies must have their "CanBreakDoors" tag set to "1b".

Are you certain that all of these aspects were met at the time of when this issue occurred? You can check by running the following commands:

/gamerule mobGriefing
/difficulty
/data get entity @e[type=minecraft:zombie,limit=1,sort=nearest] CanBreakDoors

I tested as the methods that @unknown stated and found that the value of the tag "CanBreakDoors" of zombies was "0b". Then I thought whether the value of the tag "CanBreakDoors" of zombies was "1b" was relavant to whether the world type was "default", so I created a new default world (difficuty was "hard", and other settings was in default), found a village and set the time to night. When I ran comands that mentioned by @unknown, I found that the value of the tag "CanBreakDoors" of zombies was STILL "0b".

But what was strange was that when I opt out of the world, reloaded the world and reran commands, I found that the value was "1b", and I saw a zombie was breaking a door and eventually succeeded. After that I reran commands and found that the value was changed back to "0b" again! What's more, I doubted that the probability of this happening seems low, because when I re-did as the steps above, I found that the value didn't be changed to "1b" even though I reloaded the world.

Here is the screenshot below. Because of some reasons, I didn't screenshoted the situation in which zombies was sucessfully broke the door.

(By the way, if whether the value of the tag "CanBreakDoors" of zombies was "1b" was not relavant to whether the world type was "default", which factor can impact this value? Relavant to whether the zombies was spawned artificially? Because all of the zombies appeared in the worlds was almost spawned by me.)

[media]

The value of CanBreakDoors is randomly assigned for each zombie afaik.

I'm going to resolve this ticket as everything seems to work fine, thanks for your report!

Thanks for @unknown's resolving!😊

Yue Fei

(Unassigned)

Unconfirmed

1.18.1

Retrieved