The bug
Magma Cubes, especially the larger ones, can still jump up blocks whilst standing on honey blocks.
To reproduce
/fill ~20 ~ ~20 ~ ~ ~ minecraft:honey_block
Summon magma cubes on top of the blocks.
Observed result
The magma cubes are able to jump.
Code analysis
Code analysis can be found in this comment.
Linked issues
relates to
Attachments
Comments


I was unable to reproduce. The Magma Cubes jump was restricted by the honey block
Could you please provide a screenshot of your setup? Maybe some of the magma blocks are not fully on top of the honey blocks but partially stand on top of other blocks and then are able to jump.

I was able to reproduce for large magma cubes.
Can confirm in 1.19.1.
Can confirm in 1.19.2.

Code analysis (Mojang mappings, 1.19.2): Normally a living entity's jump is restricted by honey blocks in jumpFromGround()
, but for magma cubes that is only partially the case. In MagmaCube#jumpFromGround()
:
Vec3 $$0 = this.getDeltaMovement();
this.setDeltaMovement($$0.x, this.getJumpPower() + (float)this.getSize() * 0.1f, $$0.z);
this.hasImpulse = true;
In LivingEntity#getJumpPower
, the block jump factor is taken into account. For magma cubes, there is an additional (float)this.getSize() * 0.1f
that gets added which is not scaled by its jump factor. A potential fix:
Vec3 $$0 = this.getDeltaMovement();
this.setDeltaMovement($$0.x, this.getJumpPower() + (float)this.getSize() * 0.1f * this.getBlockJumpFactor(), $$0.z);
this.hasImpulse = true;
This fix isn't perfect – magma cubes with a Size
of about 8 or above can still jump high enough to escape the honey blocks, but this still significantly restricts the jump in honey blocks.
Clones MC-163019