When sitting/driving in a minecart and then hitting Mobs with a sword, the sweep attack doesn't seem to work.
The following is from the method net.minecraft.entity.EntityPlayer.attackTargetEntityWithCurrentItem(Entity targetEntity).
In order to sweep attack, the code checks that the player is on the ground. When a player is in a minecart, the boolean onGround is false. A way to fix this would be to check with the OR operator if the player is riding.