mojira.dev
MC-48923

Slime/magma cubes not affected by jump boost potion effect

The bug

Slimes and magma cubes do not jump higher with the Jump Boost effect, although it still reduces fall damage for Slimes.

Steps to reproduce

  1. Spawn Slime

  2. Run command

    /effect give @e[type=slime] minecraft:jump_boost 60 10 false

Now you should see the particle effect, but the slime doesn't jump higher than normal.

For example see attached video or http://youtu.be/Upb30KUOVCM

Code analysis

Code analysis can be found in this comment.

Linked issues

Attachments

Comments 40

s7%6maTt4wC$JQ8*

I really hope this gets fixed, I need it for my map...

Itouch2

Confirmed

Itouch2

Confirmed for 14w08a and 14w10c

galaxy_2alex

Is this still a concern in the current Minecraft version 14w32d / Launcher version 1.5.2 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Markus Wersig

Tested it in 14w34d. Slimes still don't jump higher with Jump boost effect applied.

30 more comments
Avoma

Can confirm in 1.18.1.

Avoma

Can confirm in 1.18.2 and 22w11a.

Avoma

Can confirm in 1.19.

Avoma

Can confirm in 1.19.2.

ampolive

Code analysis (Mojang mappings, 1.19.2): the code for checking the Jump Boost effect is in LivingEntity#jumpFromGround(), which slimes (and magma cubes) override in their respective classes. In Slime#jumpFromGround(), instead of

Vec3 $$0 = this.getDeltaMovement();
this.setDeltaMovement($$0.x, this.getJumpPower(), $$0.z);

it should be

Vec3 $$0 = this.getDeltaMovement();
this.setDeltaMovement($$0.x, this.getJumpPower() + this.getJumpBoostPower(), $$0.z);

For magma cubes, it is a bit more complicated, because I am unsure if the jump boost should be scaled with the magma cube's size or not. But it should be an analogous fix.

Markus Wersig

Sonicwave

elvendorke

Confirmed

Low

Mob behaviour

jump_boost, magma_cube, slime

Minecraft 14w07a, Minecraft 14w10c, Minecraft 14w34d, Minecraft 1.8, Minecraft 15w33b, ..., 1.18.2, 22w11a, 1.19, 1.19.2, 22w45a

23w18a

Retrieved