All Mobs move extremely slowly in water
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 Ioan Vira:
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)
Linked Issues
is duplicated by16
Created Issue:
Dogs having trouble swimming
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.
is duplicated by
Dogs having trouble swimmingMobs swimming too slow
is duplicated by
relates to
is duplicated by
is duplicated by
is duplicated by
is duplicated by
is duplicated by
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.
Comment from Ioan Vira :
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 .
relates to
Mobs swimmingtoo slowMobs swimming speed slows to 0 after changing direction of movement
is duplicated by
is duplicated by
is duplicated by
relates to
the bug in video: By a Spanish youtuber (640k sub).
from 4:00 min.
Mobsswimming speed slows to 0 after changing direction of movementAll Mobs move extremely slowly in water
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 Ioan Vira:
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 onLivingUpdateHere 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 onLivingUpdateNote: 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: Affects Version: Minecraft 1.8.4
I tested it today.
Please add: Affects Version: Minecraft 1.8.5
I tested it today. =(
A comment with security level 'Users' was removed.
Affects Version: 15w31b and ....
in 15w31c but it is worse!! the mob take a negative path towards the player.(Very funny, it is another bug, do not know how to report or explain).
http://puu.sh/jkmmt.png (15w31c)
http://puu.sh/jkmE0.png (15w31c)
Please add: Affects Version: Minecraft 1.8.8 and 15w31a (1.9 snapshots)
is duplicated by
is duplicated by
is duplicated by
is duplicated by
relates to
is duplicated by
relates to
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.
(MC-48616)
Dupe of MC-48616
Dupe of MC-48616
Can someone clarify what the issue is and how to reproduce this? Because mobs are floating (swimming) for me. Including Silverfish (they float and don't just sink to the bottom and drown - even in downward flowing water).
Also, this is NOT about them swimming too slow, as that's MC-48616.
@Tobias, the mobs swimming slow is covered by MC-48616 and seems to predate the threaded AI. There might be other tickets open regarding your teleportation concerns. Remember to vote on issues.
The issue "Mobs can't swim" is in fact fixed.
"Mobs swimming too slow" is MC-48616.
Duplicate of MC-48616
Dupe of MC-48616
Duplicate of MC-48616.
Seems to be a duplicate (not just related) of MC-48616, since that issue describes mobs swimming slowly after changing direction (likely what's happening here).
Confirmed. Quite weird, and something tells me that this may be related to MC-48616.
EDIT: Indeed: if you walk, then sneak, and turn the other way (while still sneaking), your speed slows to almost none (akin to if you sneak first then walk).
Occurs in 1.8.8 while boating. Since they swim painfully slowly (thanks to MC-48616), it's easy to leave them far behind. If I don't enter water shallow enough for them to tp into before their chunk unloads, they unload with it. Crossing any decent-sized body of water requires going aaaaaaall the way around the edges and skimming the coast at regular intervals.
Does MC-48616 describe your issue ?
That was fixed in 15w44b, please recreate that issue in 15w46a in a new world.
That should have been fixed in 15w45a (MC-48616). Is it still confirmable?
So I was playing 19w07a, and noticed a fox hunting fish. However, they were extremely slow in the water, and the hunting looked extremely awkward since they were moving at a snail's pace.
I remembered this old bug (MC-48616) that caused mobs to move slowly in water, and started to research this, and so I tested it in different versions.
14w05b (before the bug) : Zombie: 9.5 seconds to swim to the player. (14w06a actually introduced it)
15w45a ("fix version"): Zombie: 18 seconds to swim to the player. That's about TWO TIMES slower than before.
Latest version: Zombie/Creeper: about ~15 seconds to the player in water (Zombies now sink to the bottom so I tried to test it with Creepers too)
But Foxes are the easiest mob proof that this bug still exists. I also think fish are surprisingly sluggish for a water mob, so they might be affected by this bug as well.
How to reproduce:
Make a mob chase another/player mob in water, for example:
Zombie chase a player or a villager
Wolf chase a sheep
Drowned chase a player of villager, but in 1-block high water
Notice how slowly they move.
You can compare this to any version before 14w05b to see how much faster the mobs were in water.
I can confirm this. It takes a long time for (passive) mobs to cross a little stream.
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
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-69582Confirmed 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:
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:
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.
Please add: Affects Version: 15w32a
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.
[Mojang] Nathan Adams never worked on the ai for mobs, this has never been his department.
ProfMobius (Thomas Guimbretiere) worked on this department since he's hired.
You can't say [Mojang] Nathan Adams 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)