mojira.dev
MC-276395

Inconsistent Levitation Behavior

In Survival mode, apply this command in a loop:

execute as @a[nbt={OnGround:1b}] unless data entity @s active_effects[0] run item replace entity @s weapon.offhand with red_dye[food={nutrition:0,saturation:0,can_always_eat:true,eat_seconds:0.1,effects:[{effect:{id:"minecraft:levitation",amplifier:93,duration:2,show_particles:0b,show_icon:0b},probability:1}]}] 1

Hold down right-click. About 80% of the time, the levitation effect behaves as expected, but occasionally it will propel the player either much lower or much higher than normal. I tried using a weaker levitation effect over a longer duration, but the issue persists. I tested this on entities like wolves, but the bug seems to only affect the player. Although rare, this inconsistency disrupts the controlled, non-random behavior I initially intended to simulate a TNT propulsion effect.

Tested in version 1.21.1.

Comments 3

The command didn't do anything for me in a repeating command block in survival. Please double check the command's syntax, and attach a video of the issue occurring. It would also be helpful to have clearer steps to reproduce this issue.

Hello, you have to be on a block and keep the right click pressed, that will give you levitation.
And as explained, 80-90% of the time, the effect will be normal, but sometimes, the effect will make you fly much higher or much lower.
( you need to have activated f3 and look at the height )

Also, drink a milk bucket, you have to have no effect for my command to work, the command is only there to show in a simple way that the levitation effect sometimes bugs.

( repeat command block )

The command is indeed no longer valid in 24w36a due to item food component changes, could you update it?

MrBurdy

(Unassigned)

Unconfirmed

(Unassigned)

1.21.1, 24w36a

Retrieved