I tamed a group of dogs and then tried to go across a body of water on a boat. The dogs jumped in the water but almost couldn't move. They also never ported over to me as I moved away from them. I went 1000 blocks before I noticed they weren't following me. When I went back they were still stuck in the water where I first got on my boat. As a side note I've noticed most mobs moving slower than normal in water.
Comments from @unknown:
Tested in 14w34c. Please add this into the description. Maybe Mojang will fix this before the 1.8 release.
Testcase:
1. Set creative mode. Find a lake. Equip enough zombie spawn eggs and a sword.
2. Set survival mode. Set night.
3. Spawn a zombie and attract him into the water, by keeping the same direction of movement.
Observed behavior: The zombie moves with a reasonable speed (just a bit slower in the water)
4. Change the direction of movement.
Observed behavior: The zombie will change direction to follow the player and his movement speed becomes almost 0.
I made some research based on the latest Forge.
The problem is located in class EntityLivingBase method onLivingUpdate
Here is a pseudo-code:
/**onLivingUpdate is called frequently so the entity can update its state every tick as required.*/
call onLivingUpdate
if motionX < 0.005 set motionX = 0
if motionY < 0.005 set motionY = 0
if motionZ < 0.005 set motionZ = 0
call moveEntityWithHeading(float strafe=0, float forward=0.0067620003)
if entity is in water then set friction = 0.02
call moveFlying(float strafe, float forward, float friction)
motionX = motionX + something what depends on strafe forward friction
motionZ = motionZ + something what depends on strafe forward friction
end moveFlying
// for a normal zombie which is turning in water, motionX and motionZ will be approximately 0.0045.
// this value will be reset to 0 at the next onLivingUpdate call
// therefore entities will never be able to speed up in water if they make the mistake to stop and turn around
// moveEntity tries to move the entity by the passed in displacement
call moveEntity(motionX, motionY, motionZ)
end moveEntityWithHeading
end onLivingUpdate
Note: moveFlying is called always. The name chosen by Forge guys is misleading.
A friction value = 0.03 would solve the problem. To be tested with diagonal movement!!
On ground covered by snow, the friction is 0.23.
The "friction" name for this coeficient may also be misleading.
Another parameter with the same purpose is jumpMovementFactor (also 0.02). It is applied when the entity is jumping in the water and for a short time is above the water (if is a zombie, will burn a little bit)
Related issues
is duplicated by
Comments


My issue of this was marked confirmed, then they found out it was a dupe of this one, so unconfirmed it, and this issue isn't confirmed? Someone confirm this!

I think I noticed this with chickens in 14w21b. It was in one of those smallish lakes, and I decided to use a lead because it was TOO SLOW.

Still an issue in w28a.

Still in 14w29b. Please confirm.

I can confirm that this is still in 14w29b. Affects cows, chickens, and sheep. Reproduced it in creative, but at first they were swimming normal and were able to cross a stream once, but upon trying to go back they slowed to a crawl, and haven't been able to get them swim normal again since - so not sure why they did it the first time.

It also effects zombies and skeletons, creepers and pigs (14w29b).
They move about 1/10th the speed they should have in water.
Its faster to build land bridges or manually push farmyard animals across water.
Wolves seem to not only suffer the slow movement but fail to teleport more oft than not.

Same for me in 14w30c. Swimming with cows or chickens while holding bait, or being chased by hostile mobs, is annoyingly slow.

Still true in 14w34b and I'll also confirm that it occurs with zombies. The one zombie I ran into that moved properly happened to have on Depth Strider III boots...

Tested in 14w34c. Please add this into the description. Maybe Mojang will fix this before the 1.8 release.
Testcase:
1. Set creative mode. Find a lake. Equip enough zombie spawn eggs and a sword.
2. Set survival mode. Set night.
3. Spawn a zombie and attract him into the water, by keeping the same direction of movement.
Observed behavior: The zombie moves with a reasonable speed (just a bit slower in the water)
4. Change the direction of movement.
Observed behavior: The zombie will change direction to follow the player and his movement speed becomes almost 0.

Great description Ioan Vira.
Still affects 1.8-pre1

Sometime ago Mojang balanced the swimming speed of zombies in water.
To avoid confusion, can we change the title to "Mobs swimming speed slows to 0 after changing direction of movement"? Or something like that.
I tested in 1.8-pre1 some additional usecases:
Setup:
1) Create an S shape channel with water.
2) At one end place trapped wolf, ocelot or villager, as needed.
3) At the other end, skeleton, creeper or zombie
Observed behavior:
During turning points, all mobs slow down.
Zombie does not resume movement speed.
Skeletons and creepers
if they flee from wolf/ocelot they resume movement speed when the path is clear.
if they chase the player, the movement speed does not resume (this I tested by running around a small lake)
I guess re-calculating movement path in water is not very good.
I noticed also that mobs take sometime sun damage while in the water. This was not happening before. If the mob is considered to be "in the air", falling back into the water, the path-finding algorithm or movement may be disturbed. Just a guess.
Thanks Kumasasa for adding the test case to description.

Something that may be related or along the same lines.
In a blaze farm I built in one of my worlds, blazes swim up a lava funnel in order to get them where I need them. However, when I run the prerelease/snapshots, they remain at the bottom of the lava stream indefinitely.
This means, if it is the same bug, that it is affected by vertical movement as well as horizontal movement, and that it occurs in lava as well as water.

Jonathan, I think that's a separate issue. Normal mobs float in water, so their vertical movement doesn't seem to be restricted. I'll have to do some testing. It may be caused by the same thing, but they seem to be different symptoms to me.
Edit: What you describe only affects blazes, and it doesn't have anything to do with them changing direction of movement. Blazes simply no longer float. Other mobs, such as zombies, do float (in both water and lava - the latter may require fire resistance for them to stay alive long enough to tell). Looks like the following ticket was recently opened for the issue:
MC-69582

Confirmed for 1.8.

This issue's title change is inaccurate. I have just tested this bug on a new world and found that, while the mob is going in the same exact direction as it was on land, it's speed was very slow the instant it made contact with the water block. It has been like this for a very long time, the name should be changed back.

Paul, was it their first time in the water? Because I think it might be a permanent change once they change direction in water, even if they get out and enter back in again - as I'm pretty sure I've seen that happen.

Still affects version 1.8.1.

The name for this issue is very innacurate. The mobs do not slow to 0, they just move a fraction of their normal speed, didn't get certain numbers. Also they are slow instantly when they move through the water.

Just tested it on 1.8.3. I think it's fixed...

Nope. Just tested in 1.8.3 and I can confirm it's still there, same as before.

Suggestion title: "All Mobs are extremely slow in the water".
EspaΓ±ol: "Todos los Mobs son extremadamente lentos en el agua":

I made some research based on the latest Forge.
The problem is located in class EntityLivingBase method onLivingUpdate
Here is a pseudo-code:
/**onLivingUpdate is called frequently so the entity can update its state every tick as required.*/
call onLivingUpdate
if motionX < 0.005 set motionX = 0
if motionY < 0.005 set motionY = 0
if motionZ < 0.005 set motionZ = 0
call moveEntityWithHeading(float strafe=0, float forward=0.0067620003)
if entity is in water then set friction = 0.02
call moveFlying(float strafe, float forward, float friction)
motionX = motionX + something what depends on strafe forward friction
motionZ = motionZ + something what depends on strafe forward friction
end moveFlying
// for a normal zombie which is turning in water, motionX and motionZ will be approximately 0.0045.
// this value will be reset to 0 at the next onLivingUpdate call
// therefore entities will never be able to speed up in water if they make the mistake to stop and turn around
// moveEntity tries to move the entity by the passed in displacement
call moveEntity(motionX, motionY, motionZ)
end moveEntityWithHeading
end onLivingUpdate
Note: moveFlying is called always. The name chosen by Forge guys is misleading.
A friction value = 0.03 would solve the problem. To be tested with diagonal movement!!
On ground covered by snow, the friction is 0.23.
The "friction" name for this coeficient may also be misleading.
Another parameter with the same purpose is jumpMovementFactor (also 0.02). It is applied when the entity is jumping in the water and for a short time is above the water (if is a zombie, will burn a little bit)

Please add my above comment into the description. Thanks π

Confirmed for 1.8.6.
I personally still prefer the old title "Mob swimming speed drastically decreases after changing direction of movement", since the mobs only slow down if you change the movement direction. I tested it with zombies and the following happened:
I spawned the zombie on land, went to the other side of the lake, and switched to survival; the speed was normal.
After changing direction, the speed drastically slowed down.
If I take the zombie out of water and than back in, the speed returns to normal (until I change its direction again).
If I spawn the zombie in the middle of the water, it moves extremely slowly.
If I fill up a bucket in front of the zombie (making the water flow in the same direction as the zombie's travel), it seems to speed up again.
Note that this mirrors the behavior described in MC-75474: if you block with a sword and go into water, then change direction, your speed slows down.

Of course not counting squids and guardians. And of course endermen.

I was watching yesterday a let's play video and I noticed that boats too are now influenced by this problem.
https://www.youtube.com/watch?v=6ERbgU-ZBzM&t=1319

So Mojang solved the desync boat issue by making the boat behave like all other entities which have no desync π
They might have to redesign how entities turn to eliminate the slowdown in the first place. The max speed of boats is high enough to escape the "filter" loop. The slowdown is irritating.
If they change this behavior, a new one might be more realistic...
A turn of 180 degrees with a realistic algorithm is supposed to slow down gradually the entities to 0 and speed up in the opposite direction.
But this was I guess the former behavior with desync... Isn't it? π π
With such a behavior, the mobs will get stuck again nevertheless, but less often.
I seen zombies which rotate 180 degrees to chose a different path, seemingly shorter.

Affects Version: 15w42a

Confirmed for 15w44a.

The report was spot on. The problem was that computed speed in water was right below the limit of considering the target static, preventing most entities from moving in water.
Many thanks for the great analysis and great bug report.

Thanks for fixing the bug ProfMobius and thanks to the moderators who do a great work.
Special regards to Kumasasa and Mustek π

Yes I have seen this happen after through testing this happens

Thank you, thank you, a year and a half of waiting for this moment.
ProfMobius is better than Dinnerbone. π

@unknown never worked on the ai for mobs, this has never been his department.
@unknown worked on this department since he's hired.
You can't say @unknown is worse because of this. π

please do not discuss a joke. What is important is repaired bug =)

Doesn't this bug still kinda exist? Mobs are way faster in water in release 1.7.4 than 15w45a or any later version.
Should I make a new bug report? Or should this be reopened?... Or should I suggest it as a feature on reddit or https://feedback.minecraft.net

It's very easy to notice when you see foxes hunting fish in water, how this bug is still in the game, altough not as severe.
Β
And so I tested it in different versions.
14w05b (before the bug) : Zombie: 9.5 seconds to swim to the player
15w45a ("fix version"): Zombie: 18 seconds to swim to the player
Latest version: Zombie/Creeper: about ~15 seconds to the player in water (Zombies now sink to the bottom so I tested with Creepers too)
I can confirm this. It takes a long time for (passive) mobs to cross a little stream.