From Minecraft Parkour Wiki
On every tick, the game does these three steps:
Acceleration is added to the player's velocity.
The player is moved (new position = position + velocity).
The player's velocity is reduced to simulate drag.
We'll start by introducing Multipliers in an effort to make formulas more readable.
Multipliers
Movement Multiplier (See 45° Strafe )
M
t
=
{
1.3
Sprinting
1.0
Walking
0.3
Sneaking
0.0
Stopping
}
×
{
0.98
Default
1.0
45
∘
Strafe
0.98
2
45
∘
Sneak
}
{\displaystyle M_{t}={\begin{Bmatrix}1.3&{\textrm {Sprinting}}\\1.0&{\textrm {Walking}}\\0.3&{\textrm {Sneaking}}\\0.0&{\textrm {Stopping}}\end{Bmatrix}}\times {\begin{Bmatrix}0.98&{\textrm {Default}}\\1.0&45^{\circ }~{\textrm {Strafe}}\\0.98{\sqrt {2}}&45^{\circ }~{\textrm {Sneak}}\end{Bmatrix}}}
Effects Multiplier (See Status Effects )
E
t
=
(
1
+
0.2
×
S
p
e
e
d
)
×
(
1
−
0.15
×
S
l
o
w
n
e
s
s
)
⏟
I
n
c
r
e
a
s
e
s
b
y
20
%
p
e
r
l
e
v
e
l
o
f
S
p
e
e
d
D
e
c
r
e
a
s
e
s
b
y
15
%
p
e
r
l
e
v
e
l
o
f
S
l
o
w
n
e
s
s
≥
0
{\displaystyle E_{t}={\underset {Decreases~by~15\%~per~level~of~Slowness}{\underset {Increases~by~20\%~per~level~of~Speed}{\underbrace {\left(1+0.2\times Speed\right)~\times ~\left(1-0.15\times Slowness\right)} }}}\geq 0}
Slipperiness Multiplier (See Slipperiness )
S
t
=
{
0.6
Default
0.8
Slime
0.98
Ice
1.0
Airborne
}
{\displaystyle S_{t}={\begin{Bmatrix}0.6&{\textrm {Default}}\\0.8&{\textrm {Slime}}\\0.98&{\textrm {Ice}}\\1.0&{\textrm {Airborne}}\end{Bmatrix}}}
Linear Formulas
These simplified formulas only apply to linear movement (no change in direction).
While this condition might seem very restrictive, these formulas are very useful to analyze conventional jumps and momentum
We'll later expand on these formulas by including angles.
Definition :
V
H
,
0
{\displaystyle V_{H,0}}
is the player's initial speed (default = 0).
V
H
,
t
{\textstyle V_{H,t}}
is the player's speed on tick
t
{\textstyle t}
.
Ground Speed :
V
H
,
t
=
V
H
,
t
−
1
×
S
t
−
1
×
0.91
⏟
M
o
m
e
n
t
u
m
+
0.1
×
M
t
×
E
t
×
(
0.6
S
t
)
3
⏟
A
c
c
e
l
e
r
a
t
i
o
n
{\displaystyle V_{H,t}={\underset {Momentum}{\underbrace {\underset {}{V_{H,t-1}\times S_{t-1}\times 0.91}} }}~+~{\underset {Acceleration}{\underbrace {0.1\times M_{t}\times E_{t}\times \left({\frac {0.6}{S_{t}}}\right)^{3}} }}}
Jump Speed :
V
H
,
t
=
V
H
,
t
−
1
×
S
t
−
1
×
0.91
⏟
M
o
m
e
n
t
u
m
+
0.1
×
M
t
×
E
t
×
(
0.6
S
t
)
3
⏟
A
c
c
e
l
e
r
a
t
i
o
n
+
{
0.2
Sprinting
0.0
Else
}
⏟
S
p
r
i
n
t
j
u
m
p
B
o
o
s
t
{\displaystyle V_{H,t}={\underset {Momentum}{\underbrace {\underset {}{V_{H,t-1}\times S_{t-1}\times 0.91}} }}~+~{\underset {Acceleration}{\underbrace {0.1\times M_{t}\times E_{t}\times \left({\frac {0.6}{S_{t}}}\right)^{3}} }}+{\underset {Sprintjump~Boost}{\underbrace {\begin{Bmatrix}0.2&{\textrm {Sprinting}}\\0.0&{\textrm {Else}}\end{Bmatrix}} }}}
Air Speed :
V
H
,
t
=
V
H
,
t
−
1
×
S
t
−
1
×
0.91
⏟
M
o
m
e
n
t
u
m
+
0.02
×
M
t
⏟
A
c
c
e
l
e
r
a
t
i
o
n
{\displaystyle V_{H,t}={\underset {Momentum}{\underbrace {\underset {}{V_{H,t-1}\times S_{t-1}\times 0.91}} }}~+~{\underset {Acceleration}{\underbrace {\underset {}{0.02\times M_{t}}} }}}
Complete Formulas
Let's introduce two more variables:
D
t
{\textstyle D_{t}}
, The player's Direction in degrees (defined by their inputs and rotation)
F
t
{\textstyle F_{t}}
, The player's Facing in degrees (defined by their rotation only)
In reality, angles aren't as simple as that, as there are a limited number of significant angles (see Facing and Angles ).
For the purpose of simplicity, we'll ignore this fact.
Definition :
V
X
,
0
{\textstyle V_{X,0}}
and
V
Z
,
0
{\textstyle V_{Z,0}}
correspond to the player's initial velocity.
V
X
,
t
{\textstyle V_{X,t}}
and
V
Z
,
t
{\textstyle V_{Z,t}}
correspond to the player's velocity on tick
t
{\textstyle t}
Ground Velocity :
V
X
,
t
=
V
X
,
t
−
1
×
S
t
−
1
×
0.91
+
0.1
×
M
t
×
E
t
×
(
0.6
S
t
)
3
×
sin
(
D
t
)
{\displaystyle V\displaystyle _{X,t}={\underset {}{V\displaystyle _{X,t-1}\times S_{t-1}\times 0.91}}~+~0.1\times M_{t}\times E_{t}\times \left({\frac {0.6}{S_{t}}}\right)^{3}\times \sin(D_{t})}
V
Z
,
t
=
V
Z
,
t
−
1
×
S
t
−
1
×
0.91
⏟
M
o
m
e
n
t
u
m
+
0.1
×
M
t
×
E
t
×
(
0.6
S
t
)
3
⏟
A
c
c
e
l
e
r
a
t
i
o
n
×
cos
(
D
t
)
{\displaystyle V\displaystyle _{Z,t}={\underset {Momentum}{\underbrace {\underset {}{V\displaystyle _{Z,t-1}\times S_{t-1}\times 0.91}} }}~+~{\underset {Acceleration}{\underbrace {0.1\times M_{t}\times E_{t}\times \left({\frac {0.6}{S_{t}}}\right)^{3}} }}\times \cos(D_{t})}
Jump Velocity :
V
X
,
t
=
V
X
,
t
−
1
×
S
t
−
1
×
0.91
+
0.1
×
M
t
×
E
t
×
(
0.6
S
t
)
3
×
sin
(
D
t
)
+
{
0.2
Sprinting
0.0
Else
}
×
sin
(
F
t
)
{\displaystyle V\displaystyle _{X,t}={\underset {}{V\displaystyle _{X,t-1}\times S_{t-1}\times 0.91}}~+~0.1\times M_{t}\times E_{t}\times \left({\frac {0.6}{S_{t}}}\right)^{3}\times \sin(D_{t})+{\begin{Bmatrix}0.2&{\textrm {Sprinting}}\\0.0&{\textrm {Else}}\end{Bmatrix}}\times \sin(F_{t})}
V
Z
,
t
=
V
Z
,
t
−
1
×
S
t
−
1
×
0.91
⏟
M
o
m
e
n
t
u
m
+
0.1
×
M
t
×
E
t
×
(
0.6
S
t
)
3
⏟
A
c
c
e
l
e
r
a
t
i
o
n
×
cos
(
D
t
)
+
{
0.2
Sprinting
0.0
Else
}
×
cos
(
F
t
)
⏟
S
p
r
i
n
t
j
u
m
p
B
o
o
s
t
{\displaystyle V\displaystyle _{Z,t}={\underset {Momentum}{\underbrace {\underset {}{V\displaystyle _{Z,t-1}\times S_{t-1}\times 0.91}} }}~+~{\underset {Acceleration}{\underbrace {0.1\times M_{t}\times E_{t}\times \left({\frac {0.6}{S_{t}}}\right)^{3}} }}\times \cos(D_{t})+{\underset {Sprintjump~Boost}{\underbrace {{\begin{Bmatrix}0.2&{\textrm {Sprinting}}\\0.0&{\textrm {Else}}\end{Bmatrix}}\times \cos(F_{t})} }}}
Air Velocity :
V
X
,
t
=
V
X
,
t
−
1
×
S
t
−
1
×
0.91
+
0.02
×
M
t
×
sin
(
D
t
)
{\displaystyle V\displaystyle _{X,t}={\underset {}{V\displaystyle _{X,t-1}\times S_{t-1}\times 0.91}}~+~0.02\times M_{t}\times \sin(D_{t})}
V
Z
,
t
=
V
Z
,
t
−
1
×
S
t
−
1
×
0.91
⏟
M
o
m
e
n
t
u
m
+
0.02
×
M
t
⏟
A
c
c
e
l
e
r
a
t
i
o
n
×
cos
(
D
t
)
{\displaystyle V\displaystyle _{Z,t}={\underset {Momentum}{\underbrace {\underset {}{V\displaystyle _{Z,t-1}\times S_{t-1}\times 0.91}} }}~+~{\underset {Acceleration}{\underbrace {\underset {}{0.02\times M_{t}}} }}\times \cos(D_{t})}
Stopping Conditions
Horizontal speed is set to 0 if the player hits a wall, or if the speed is considered to be negligible.
Wall Collision :
If the player hits a X-facing wall, then momentum is cancelled, and
V
X
,
t
{\textstyle V\displaystyle _{X,t}}
only includes acceleration.
If the player hits a Z-facing wall, then momentum is cancelled, and
V
Z
,
t
{\textstyle V\displaystyle _{Z,t}}
only includes acceleration.
In either of these case, the player stops sprinting.
Negligible Speed Threshold :
If
|
V
X
,
t
−
1
×
S
t
−
1
×
0.91
|
<
0.005
,
{\textstyle \left|V\displaystyle _{X,t-1}\times S_{t-1}\times 0.91\right|<0.005,}
then momentum is cancelled, and only the acceleration is left.
If
|
V
Z
,
t
−
1
×
S
t
−
1
×
0.91
|
<
0.005
,
{\textstyle \left|V\displaystyle _{Z,t-1}\times S_{t-1}\times 0.91\right|<0.005,}
then momentum is cancelled, and only the acceleration is left.
In 1.9+, they are compared to 0.003 instead.
Source Code
[...]