The bug
Unable to set CanBreakDoors
to 1b
for drowned.
How to reproduce
Build a small house with for example an oak door
Spawn a villager inside it
/summon villager ~ ~ ~ {NoAI:1b}
Set the difficulty to hard
/difficulty hard
Summon a drowned outside of it
/summon drowned ~ ~ ~ {CanBreakDoors:1b}
Make sure the gamerule
mobGriefing
is set totrue
/gamerule mobGriefing true
Use the following command when the drowned is summoned
/data get entity @e[type=drowned,limit=1,distance=..3] CanBreakDoors
→ ❌ Notice that
CanBreakDoors
is still0b
Code analysis
Code analysis by @unknown can be found in this comment.
Linked issues
relates to 3
Attachments
Comments 13
Confirmed for recent 1.14 beta (19w07a).
Even manually editing the NBT tag doesn't work...
When entering /data modify entity <entityID> CanBreakDoors set value 1b
the answer is "Modified entity data of Drowned", but it still stays at 0b.
The question is: are Drowned even supposed to be able to break doors?
If no, why do they have the tag?
Types of zombies do have the CanBreakDoors
tag right? So drowned are meant to have the tag to break doors.
Can confirm in 22w17a. Here's a code analysis of this issue.
Code Analysis:
The following is based on a decompiled version of Minecraft 1.18.2 using MCP-Reborn.
net.minecraft.world.entity.monster.Drowned.java
public class Drowned extends Zombie implements RangedAttackMob {
...
protected boolean supportsBreakDoorGoal() {
return false;
}
...
If we look at the above class, we can see that the supportsBreakDoorGoal()
boolean for drowned always returns "false
" meaning that their "CanBreakDoors" NBT tag cannot be set to "1b".
Can confirm.