-
Bug
-
Resolution: Fixed
-
Minecraft 14w07a, Minecraft 14w29b, Minecraft 14w30c, Minecraft 14w31a, Minecraft 14w33c, Minecraft 14w34b, Minecraft 14w34c, Minecraft 1.8-pre1, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 1.8.1, Minecraft 1.8.2-pre6, Minecraft 1.8.3, Minecraft 1.8.4, Minecraft 1.8.5, Minecraft 1.8.6, Minecraft 1.8.7, Minecraft 1.8.8, Minecraft 15w31a, Minecraft 15w31c, Minecraft 15w32a, Minecraft 15w42a, Minecraft 15w43c, Minecraft 15w44a
-
Confirmed
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 menzagitat:
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)
- is duplicated by
-
MC-48331 Mobs when in water won't swim towards you but still track you when you lure them to yourself
- Resolved
-
MC-48749 Mobs going too slow while in water (DUPLICATE)
- Resolved
-
MC-48953 Animals get stuck in water
- Resolved
-
MC-65225 Animals moving extremely slow in water
- Resolved
-
MC-65500 Chickens move really slow on water
- Resolved
-
MC-65828 Chickens in water
- Resolved
-
MC-67766 Mobs are slow in water
- Resolved
-
MC-67912 Mobs in water are like stupid.
- Resolved
-
MC-68178 mobs move very poorly in water
- Resolved
-
MC-70700 chickens in water almost stop moving
- Resolved
-
MC-71845 Hostile land mobs do not move in water
- Resolved
-
MC-73944 Entity AI Tracking
- Resolved
-
MC-75474 Deceleration / Acceleration in liquid is affected by order of action
- Resolved
-
MC-88848 Mobs has a hard time crossing water
- Resolved
-
MC-91338 Mob movement in water is slow or non-existent.
- Resolved
-
MC-92048 Mobs move very slow in water since 1.8
- Resolved
- relates to
-
MC-48331 Mobs when in water won't swim towards you but still track you when you lure them to yourself
- Resolved
-
MC-49937 Mobs can't swim
- Resolved
-
MC-144124 Some mobs move very slowly in water
- Resolved