mojira.dev
MC-148559

Sleeping villagers have a very small hitbox

The bug

The hitbox of villagers and baby villagers is too small when they are in a bed.

How to reproduce

  1. Spawn a baby villager or a villager

  2. Place a bed near the villager

  3. Set the time to night

  4. Press F3+B to show hitboxes

  5. Look at the villager's hitbox once it is in bed

Examples

[media]

[media]

Linked issues

Attachments

Comments

Pelle Reinke

still present in 20w16a

Pelle Reinke

still present in 20w18a

Pelle Reinke

still present in 20w19a

Pelle Reinke

still present in 20w20a

Pelle Reinke

still present in 20w22a

Mateus Pereira Milbradt

Affects 20w45a

Avoma

Can confirm in 21w11a.

user-c84db

Likely WF per MC-10919

Avoma

Can confirm in 1.17.

ampolive

Can confirm in 1.17.1 Release Candidate 1.

ampolive

Can confirm in 1.18 Pre-release 4.

Avoma

Can confirm in 1.18.

Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2 and 22w13a.

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.2.

ccJerrycc

I thought this is where the bug comes from (decompiled 1.20.2 using vanilla mapping:

net.minecraft.world.entity.LivingEntity.class

protected static final EntityDimensions SLEEPING_DIMENSIONS = EntityDimensions.fixed(0.2F, 0.2F);

...

public EntityDimensions getDimensions(Pose $$0) {
    return ($$0 == Pose.SLEEPING) ? SLEEPING_DIMENSIONS : super.getDimensions($$0).scale(getScale());
}

and it affects MC-10919 as well.

user-f2760

No way that got added by accident.

himazinn_Japan

Can confirm in 1.21.4.

Георг

(Unassigned)

Confirmed

Gameplay

Low

Hitboxes

baby-villager, bed, hitbox, sleeping, villager

Minecraft 1.14 Pre-Release 2, Minecraft 1.14 Pre-Release 3, Minecraft 1.14 Pre-Release 4, 1.14.4, 1.15 Pre-Release 2, ..., 23w17a, 1.20.1, 1.20.2, 1.20.4, 1.21.4

Retrieved