mojira.dev
MC-224409

Creepers with a high ExplosionRadius cause weird and unnatural explosion damage

They seem to leave a cross underneath them undestroyed

This might be the explanation for this bug. However, I'm not sure of it.

Explosions work by a creating a 16x16x16 grid around the explosion source. A ray from the center point to each block of the 16x16x16 grid is created. A ray departs from the explosion source with a given value. That value is decreased every 0.3 blocks it travels trough. The rays stops when it's value has reached 0. Every block that could not stop the ray is destroyed. For more explanation, see https://minecraft.fandom.com/wiki/Explosion#Effect.

However, there is a point where th two inner rays are diverted so far from the center that they don't enter the center blocks anymore. from this point, there is no ray any more that can destroy these blocks anymore, and they are untouched. A solution for this would be to make the amount of rays uneven, which makes that there is one ray going directly down

To prevent the remaining strange explosiondamage, the amount of rays could be calculated based on the creeper's ExplosionRadius, with something that makes that there is an uneven amount of rays to prevent the crosses.

On the first photo, I've spawned a lot of creepers on a line on a walkway. The explanation for the less destroyed part can be that a part of the walkway was blocking the explosion a bit more than the rest, but as I don't remember the walkway anymore, so I'm not sure of it.

The screenshot with the blocks that shouldn't be destroyable still needs proper testing, it's just theoretical.

For a reference to what blocks will be destroyed, best look to the explosiondamage picture. That is the real explosiondamage a creeper would do. (Note: It is a qaurt of the explosiondamage copied and rotated such that it forms a square, but that shouldn't matter as the explosiondamage is symmetrical)

You can get a spawnegg for a creeper that immediatly explodes using the following command:

/give @p creeper_spawn_egg{EntityTag:{id:"minecraft:creeper",ExplosionRadius:20,Fuse:0,ignited:1,powered:1}}

Don't use this spawnegg anywhere near things you'd like to keep, it's very destructive!!!

Linked issues

Attachments

Comments 9

Can confirm in 1.17.

Can confirm in 1.17.1.

Can confirm in 21w44a.

Maybe a better fix would be to have sphere around the tnt, where the size is dependent on the explosionRadius, and some algorithm would spread the rays so that they hit around one block apart at the surface of that sphere. This would mean small explosions wouldn't have an excessive number of rays to process, while large ones wouldn't have this problem.

Can confirm in 1.18.2.

Can confirm in 1.19.1.

Can confirm in 1.19.2.

[media]

WoutZeester1

(Unassigned)

Confirmed

Commands, Mob behaviour

1.16.5, 21w17a, 21w18a, 1.17, 1.17.1, ..., 22w14a, 1.19.1, 1.19.2, 1.19.4, 1.20.4

Retrieved