Skip to content

Commit 4bb865d

Browse files
author
ffqq
committed
fix: don't stop sprinting when blinded
matches 1.8
1 parent e8bfad1 commit 4bb865d

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

src/main/java/club/polarite/normalizer/mixin/SprintResetMixin.java

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import net.minecraft.client.multiplayer.ClientLevel;
77
import net.minecraft.client.player.AbstractClientPlayer;
88
import net.minecraft.client.player.LocalPlayer;
9-
import net.minecraft.world.effect.MobEffects;
109
import net.minecraft.world.entity.EntityType;
1110
import net.minecraft.SharedConstants;
1211

@@ -28,22 +27,12 @@ public SprintResetMixin(ClientLevel clientLevel, GameProfile gameProfile) {
2827
super(clientLevel, gameProfile);
2928
}
3029

31-
/**
32-
* hasBlindness from <1.21.8.
33-
* this is because in 1.21.9+ they removed hasBlindness from LocalPlayer
34-
* @return true/false
35-
*/
36-
@Unique
37-
private boolean hasBlindness() {
38-
return this.hasEffect(MobEffects.BLINDNESS);
39-
}
40-
4130
@Shadow
4231
public abstract boolean isMovingSlowly();
4332

4433
@Unique
4534
private boolean shouldStopSprinting() {
46-
return this.hasBlindness() || this.isMovingSlowly() || this.isPassenger() && !this.isRidingCamel() || this.isUsingItem() && !this.isPassenger() && !this.isUnderWater();
35+
return this.isMovingSlowly() || this.isPassenger() && !this.isRidingCamel() || this.isUsingItem() && !this.isPassenger() && !this.isUnderWater();
4736
}
4837

4938
@Unique

0 commit comments

Comments
 (0)