mojira.dev
MC-243759

Explosions won't damage an entity if the distance to its eyes is 0

How to reproduce:

  1. /gamemode survival

  2. /summon tnt ~ ~1.55875000357628 ~ {NoGravity:1b}

The reason is that avoids division by 0 by just ignoring zero-distance entities in net.minecraft.world.level.Explosion#explode().

Obviously, it's quite hard to abuse this bug, but hacked clients may make use of it.

Comments 3

Affects all types of explosions

Can confirm in 1.18.2.

Iaiao

(Unassigned)

Confirmed

Platform

Low

Entities

1.18, 1.18.2, 22w18a, 1.20.1, 23w33a, 1.21.1, 24w39a

Retrieved