Now I can see the effect.
The code looks like this now:
public static Vec3 getSpeedPartByWater(Entity x,World xworld){
Vec3 y=Vec3.createVectorHelper(0d,0d,0d);
AxisAlignedBB zaabb=x.boundingBox.expand(0d,-0.40234375,0d).contract(0.001D, 0.001D, 0.001D);
int i1=(int)Math.floor(zaabb.minX);
int i2=(int)Math.floor(zaabb.maxX)+1;
int j1=(int)Math.floor(zaabb.minY);
int j2=(int)Math.floor(zaabb.maxY)+1;
int k1=(int)Math.floor(zaabb.minZ);
int k2=(int)Math.floor(zaabb.maxZ)+1;
if (!xworld.checkChunksExist(i1,j1,k1,i2,j2,k2)) {return y;}
int i,j,k;
Block zblock=null;
for(i=i1;i<i2;i++){
for(j=j1;j<j2;j++){
for(k=k1;k<k2;k++){
zblock=xworld.getBlock(i,j,k);
if(zblock==null){continue;}
if(zblock.getMaterial()!=Material.water){continue;}
if(j2<j+1-BlockLiquid.getLiquidHeightPercent(xworld.getBlockMetadata(i,j,k))){continue;}
zblock.velocityToAddToEntity(xworld,i,j,k,x,y);
}
}
}
if(y.lengthVector()>0&&x.isPushedByWater()) {
y=y.normalize();
y.xCoord=x.motionX*0.15+y.xCoord*0.0119;
y.yCoord=x.motionY*0.15+y.yCoord*0.0119;
y.zCoord=x.motionZ*0.15+y.zCoord*0.0119;
}
return y;
}