Skip to content

Commit

Permalink
Fixed slow footsteps when sprinting. Fixes #294
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollace committed Mar 31, 2024
1 parent fc6c15e commit 4a6ab4e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import net.minecraft.client.network.OtherClientPlayerEntity;
import net.minecraft.entity.EquipmentSlot;
import net.minecraft.entity.LivingEntity;
import net.minecraft.entity.passive.AbstractHorseEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.ArmorItem;
import net.minecraft.util.math.BlockPos;
Expand Down Expand Up @@ -177,7 +178,7 @@ protected void simulateFootsteps() {
}

// Fix high speed footsteps (i.e. horse riding)
if (motionTracker.getHorizontalSpeed() > 0.1) {
if ((entity instanceof AbstractHorseEntity) && motionTracker.getHorizontalSpeed() > 0.1) {
distance *= 3;
}

Expand Down

0 comments on commit 4a6ab4e

Please sign in to comment.