mojira.dev
MC-137053

You cannot set the "CanBreakDoors" NBT tag of drowned to "1b"

The bug

Unable to set CanBreakDoors to 1b for drowned.

How to reproduce

  1. Build a small house with for example an oak door

  2. Spawn a villager inside it

    /summon villager ~ ~ ~ {NoAI:1b}
  1. Set the difficulty to hard

    /difficulty hard
  1. Summon a drowned outside of it

    /summon drowned ~ ~ ~ {CanBreakDoors:1b}
  1. Make sure the gamerule mobGriefing is set to true

    /gamerule mobGriefing true
  1. Use the following command when the drowned is summoned

    /data get entity @e[type=drowned,limit=1,distance=..3] CanBreakDoors

    → ❌ Notice that CanBreakDoors is still 0b

Code analysis

Code analysis by @unknown can be found in this comment.

Linked issues

Attachments

Comments 13

Can confirm.

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.

Why Parity?

@unknown Drowneds on Bedrock can break doors.

3 more comments

Confirmed with 22w14a

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".

Confirmed with 22w45a

Confirmed with 1.19.3 Pre-release 3

Confirmed with 1.19.3 Release Candidate 1

[Mod]Les3awe

etanaratsastaja

Confirmed

Platform

Low

Commands

drowned, vanilla-parity

Minecraft 1.13.1, Minecraft 1.13.2-pre1, Minecraft 1.13.2-pre2, Minecraft 1.13.2, Minecraft 18w43a, ..., 24w18a, 24w21b, 1.21 Pre-Release 2, 1.21 Pre-Release 4, 1.21

24w33a

Retrieved