File tree Expand file tree Collapse file tree
src/main/java/eu/midnightdust/midnightcontrols/client/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1515import eu .midnightdust .midnightcontrols .client .util .MathUtil ;
1616import net .minecraft .client .Minecraft ;
1717import net .minecraft .client .player .LocalPlayer ;
18- import net .minecraft .util .Mth ;
19- import net .minecraft .world .entity .ai .attributes .Attributes ;
2018import net .minecraft .world .entity .player .Input ;
2119import net .minecraft .world .phys .Vec2 ;
2220import org .jetbrains .annotations .NotNull ;
@@ -81,11 +79,8 @@ else if (button == ButtonBinding.BACK || button == ButtonBinding.RIGHT)
8179 value = 1.f ;
8280 }
8381
84- this .slowdownFactor = client .player .isMovingSlowly () ? (Mth .clamp (
85- 0.3F + (float ) client .player .getAttributeValue (Attributes .SNEAKING_SPEED ),
86- 0.0F ,
87- 1.0F
88- )) : 1.f ;
82+ this .slowdownFactor = 1.f ; // TODO: Remove this entirely in case it also isn't needed in backports for older versions
83+ // LocalPlayer#modifyInput already applies the slowdown for us now. (1.21.11)
8984
9085 if (button == ButtonBinding .FORWARD || button == ButtonBinding .BACK ) {
9186 // Handle forward movement.
You can’t perform that action at this time.
0 commit comments