mojira.dev
MC-87568

Slimes with levitation moving only in a single direction and not changing it while levitating

Summoning a slime with levitation, so that they aren't affected by gravity, won't reset the slimes AI, so they'll move in whatever direction they were last moving indefinitely. Because of MC-87573, a slime summoned with levitation will move south. All other mobs won't move at all when they have levitation.

Steps to reproduce:
1. Run

/summon Slime ~ ~5 ~ {ActiveEffects:[{Duration:300,Id:25,Amplifier:1,Ambient:1b}]}

2. Observe the slime drift south.

Other details:
-This happens even when specifying a rotation value of 180, the slime will turn to face south. Again, this is because of MC-87573.

/summon Slime ~ ~1 ~ {ActiveEffects:[{Duration:300,Id:25,Amplifier:1,Ambient:1b}],Rotation:[180.0f,0.0f]}

-If you give levitation to a pre-summoned slime the slime will drift in the direction it was facing.

/effect @e[type=Slime] levitation 100 1

-This works across all levels of levitation, but most of my testing was done with level 255.

Linked issues

Comments 12

If you read the description of both issues, redstonehelper, you'd see that they're totally unrelated. The potion effect here works fine, I'm reporting a fluke in slime AI. Besides, this is levitation, not haste, and this works perfectly for all mobs except slimes.

All effects with amplifiers >4 are not supported. The amplifier here is 255. This effect is not supported.

But the effect works, it makes the slimes float. Unless you mean that Mojang won't fix bugs caused by amplifiers greater than 4, in which case I'll update the bug report. I'll have to do more testing, but this should work with any level of levitation.

That was quick. I ran a test and it does work with levitation 1. Updating bug report now.

You can use {code} in front and at the end of code or commands to have them being displayed differently

Confirmed but probably caused by MC-87573

2 more comments

Sorry, I'm marking this WAI: Just like players, mobs can move horizontally whlie levitating. Slimes happen to not move very intelligently (is there even an intelligent way to move while levitating?).

I have to disagree with your decision. No mobs will move while levitating, their AI is shut off. However slimes have a different movement pattern in the code. As opposed to zombies or skeletons which choose a target and slowly move towards it, slimes choose a target, get a velocity set (MC-87573 says this defaults to east) and don't "recalibrate" until they land again. If a slime is affected with levitation, it basically never recalculates or changes its velocity (because its AI is off), causing the drifting we see.
If you read this and still want to close the issue, it's not my place to argue. After all, this is an extremely obscure bug that will never effect most players, but bug it is. Thanks for actively moderating both here and /r/minecraft.

Slimes now act as you would expect when they're levitating.

Updated the summary to describe the issue (which was fixed) better.

Matthias Saihttam

Jens Bergensten

Confirmed

Minecraft 15w35c, Minecraft 15w35d, Minecraft 15w44b

Minecraft 15w49a

Retrieved