mojira.dev
MC-114016

Reinforcement zombies are not centered on a block

The bug

Zombies spawning as reinforcement are not centered on a block, instead they use are spawned between 4 blocks.

How to reproduce

  1. Set the difficulty to "Hard"

    /difficulty hard
  2. Set the gamerule doMobSpawning to true if it is not already

    /gamerule doMobSpawning true
  3. Set the time to night or make sure there is no light in the area around you

    /time set night
  4. Setup a repeating command block with the following command

    /execute as @e[type=zombie] run attribute @s generic.movement_speed base set 0
  5. Summon a zombie using the following command

    /summon zombie ~ ~ ~ {Attributes:[{Name:"zombie.spawn_reinforcements",Base:1.0}]}
  6. Hit the zombie a few times

  7. Search for the spawned reinforcement zombies

    /effect give @e[type=zombie] glowing

    → You should see that the zombie is not centered on a block

Code analysis

Based on 1.11.2 decompiled using MCP 9.35 rc1

The method net.minecraft.entity.monster.EntityZombie.attackEntityFrom(DamageSource, float) does not add 0.5 to the X and Z coordinate it uses for spawning the zombies.

Comments 7

Can confirm in 1.17.1 Release Candidate 1.

Can confirm in 21w42a.

Can confirm in 21w44a.

Can confirm in 1.18 Pre-release 1. I think that @unknown would want to say something about this bug.

Can confirm in 1.18 Pre-release 4.

Why is this a bug?

Because no other entities in the game spawn like this, at least as far as I know.

Marcono1234

(Unassigned)

Confirmed

Gameplay

Normal

Mob spawning

block, centered, coordinate, reinforcement, zombie

Minecraft 1.11.2, Minecraft 17w06a, 20w07a, 1.16.1, 1.16.2 Pre-release 3, , 1.21.10, 1.21.11, 26.1, 26.2, 26.3

Retrieved