✈️ Flight Speed Kinematics (Minecraft 26.2)
📌 Repository Source Disclaimer: The documentation in this Wiki reflects the current source code state in the repository, which may include recent unreleased commits or developmental features ahead of public release builds on CurseForge and Modrinth.
1. Official-Style Infobox
| Property | Technical Details |
|---|---|
| Subsystem Namespace | vo_creative_fly_speed |
| Logic Implementation | [FlySpeedLogic.java](file:///src/main/java/net/vanillaoutsider/vo_creative_fly_speed/FlySpeedLogic.java) |
| Bytecode Mixin Hook | [ServerPlayerMixin.java](file:///src/main/java/net/vanillaoutsider/vo_creative_fly_speed/mixin/ServerPlayerMixin.java) |
| Vanilla Base Flight Speed ($S_{\text{vanilla}$) | 0.05F blocks/tick ($1.0\text{ m/s}$) |
| Sprint Velocity Multiplier | $1.4\times$ ($+40%$ additive sprint flight) |
| Epsilon Drift Guard ($\epsilon$) | $10^{-6}\text{ F}$ (1e-6F) |
| Network Synchronization Packet | ClientboundPlayerAbilitiesPacket via ServerPlayer.onUpdateAbilities() |
| Supported GameModes | GameType.CREATIVE, GameType.SPECTATOR (Bypasses SURVIVAL, ADVENTURE) |
2. Step-by-Step Player Workflow
- Enter an Authorized GameMode:
- Switch your player to Creative (
/gamemode creative) or Spectator (/gamemode spectator).
- Switch your player to Creative (
- Double-Tap Jump to Fly:
- Double-tap the spacebar to initiate vanilla flight.
- Calibrate Flight Speed Multiplier:
- An operator executes the GameRule command with a permille integer (e.g.,
2000for $2.0\times$ speed):mcfunction/gamerule vo_creative_fly_speed 2000
- An operator executes the GameRule command with a permille integer (e.g.,
- Instantaneous Kinetic Transition:
- On the very next server tick ($50\text{ ms}$ max interval),
FlySpeedLogicevaluates the new rule, mutatesAbilities.flyingSpeed, and synchronizes the client. - The player instantly accelerates to $0.10\text{ blocks/tick}$ ($2.0\text{ m/s}$) without requiring relogging, landing, or resetting flight.
- On the very next server tick ($50\text{ ms}$ max interval),
- Sprint Boost Engagement:
- Holding the sprint key (
Controlor double-tappingW) multiplies the active flight speed by $1.4\times$, delivering $0.14\text{ blocks/tick}$ ($2.8\text{ m/s}$).
- Holding the sprint key (
3. Mathematical Formulas & Kinematics Equations
A. Permille Velocity Scaling Formula
Flight speed is calculated directly from the integer permille value $P \in [1, 100000]$:
$$S_{\text{fly} = S_{\text{vanilla} \times \left( \frac{P}{1000.0} \right)$$
Where:
- $S_{\text{vanilla} = 0.05\text{ blocks/tick}$ ($1.0\text{ block/second}$ at $20\text{ ticks/s}$).
- $P$ is the permille GameRule value (default: $1000$).
B. Sprint Velocity Compounding
When a flying player engages sprint mode, the engine compounds the sprint multiplier:
$$S_{\text{sprint} = S_{\text{fly} \times 1.4 = 0.05 \times \left( \frac{P}{1000.0} \right) \times 1.4$$
C. Metric Speed Conversions
Converting internal blocks/tick velocity into standard metric units:
$$V_{\text{m/s} = S_{\text{fly} \times 20.0 \quad (\text{blocks/second})$$
$$V_{\text{km/h} = V_{\text{m/s} \times 3.6 = S_{\text{fly} \times 72.0 \quad (\text{km/h})$$
D. Floating-Point Epsilon Drift Guard
To prevent constant IEEE 754 floating-point jitter and avoid saturating the network pipeline:
$$\Delta = \left| S_{\text{current} - S_{\text{target} \right|$$
$$\text{Sync Action} = \begin{cases} \text{Execute } \texttt{setFlyingSpeed}(S_{\text{target}) \text{ and } \texttt{onUpdateAbilities}(), & \text{if } \Delta > 10^{-6} \ \text{Bypass (Early Return)}, & \text{if } \Delta \le 10^{-6} \end{cases}$$
4. Visual ASCII Kinematic Lifecycle Diagram
+-------------------------------------------------------------------------+
| SERVER TICK LIFECYCLE |
+-------------------------------------------------------------------------+
|
v
[ ServerPlayer.tick() Injection Point ]
|
v
[ Evaluate GameMode Type ]
|
+--------------------+--------------------+
| |
case CREATIVE case SPECTATOR
| |
v v
Fetch vo_creative_fly_speed Fetch vo_spectator_fly_speed
| |
+--------------------+--------------------+
|
v
[ Calculate Target Float Speed ]
targetSpeed = 0.05F * (P / 1000.0F)
|
v
[ Epsilon Check: |current - target| > 1e-6F ]
|
+-------------------+-------------------+
| |
NO (Delta <= 1e-6) YES (Delta > 1e-6)
| |
v v
[ Early Return ] [ abilities.setFlyingSpeed ]
(0 CPU overhead) [ player.onUpdateAbilities ]
(0 packet sent) |
v
[ S2C Packet Transmission ]
ClientboundPlayerAbilitiesPacket
|
v
[ Client Local Player ]
Immediate Smooth Motion5. Data Structures & Player Abilities Schema
Minecraft stores ability states within the player's internal capability container. Below is the active data model:
{
"abilities": {
"flying": 1b,
"mayfly": 1b,
"instabuild": 1b,
"invulnerable": 1b,
"mayBuild": 1b,
"flyingSpeed": 0.125f,
"walkSpeed": 0.100f
}
}When synchronized over the network, ClientboundPlayerAbilitiesPacket packages the following boolean flags and float attributes:
invulnerable:booleanisFlying:booleancanFly:booleaninstabuild:booleanflyingSpeed:float(mutated byFlySpeedLogic)walkingSpeed:float(untouched)
6. Exhaustive Kinematic Reference Table
| Permille ($P$) | Multiplier | Flight Speed (blocks/tick) | Metric Speed ($V_{\text{m/s}$) | Sprint Speed ($V_{\text{m/s}$) | Real-World Velocity ($V_{\text{km/h}$) | Typical Use Case |
|---|---|---|---|---|---|---|
100 | $0.10\times$ | 0.005 | $0.1\text{ m/s}$ | $0.14\text{ m/s}$ | $0.36\text{ km/h}$ | Macro-precision block detailing |
500 | $0.50\times$ | 0.025 | $0.5\text{ m/s}$ | $0.70\text{ m/s}$ | $1.80\text{ km/h}$ | Slow cinematic camera pans |
1000 | $1.00\times$ | 0.050 | $1.0\text{ m/s}$ | $1.40\text{ m/s}$ | $3.60\text{ km/h}$ | Vanilla Default Flight Speed |
1500 | $1.50\times$ | 0.075 | $1.5\text{ m/s}$ | $2.10\text{ m/s}$ | $5.40\text{ km/h}$ | Comfortable building pace |
2000 | $2.00\times$ | 0.100 | $2.0\text{ m/s}$ | $2.80\text{ m/s}$ | $7.20\text{ km/h}$ | Fast aerial surveying |
2500 | $2.50\times$ | 0.125 | $2.5\text{ m/s}$ | $3.50\text{ m/s}$ | $9.00\text{ km/h}$ | Rapid structure framing |
5000 | $5.00\times$ | 0.250 | $5.0\text{ m/s}$ | $7.00\text{ m/s}$ | $18.00\text{ km/h}$ | Long-distance biome transit |
10000 | $10.00\times$ | 0.500 | $10.0\text{ m/s}$ | $14.00\text{ m/s}$ | $36.00\text{ km/h}$ | High-speed terrain scouting |
50000 | $50.00\times$ | 2.500 | $50.0\text{ m/s}$ | $70.00\text{ m/s}$ | $180.00\text{ km/h}$ | Extreme dimension testing |
100000 | $100.00\times$ | 5.000 | $100.0\text{ m/s}$ | $140.00\text{ m/s}$ | $360.00\text{ km/h}$ | Sovereign maximum threshold |
7. Developer & Addon Extension Hooks
External mod developers can access the pure calculation helper or listen to player movement updates:
Accessing Velocity Calculations
package net.vanillaoutsider.vo_creative_fly_speed;
// Pure static calculation helper
float calculated = FlySpeedLogic.calculateSpeed(2500); // returns 0.125FInspecting Dynamic GameRule Values
import net.vanillaoutsider.vo_creative_fly_speed.CreativeFlySpeedRules;
import net.minecraft.world.level.gamerules.GameRules;
int creativePermille = serverLevel.getGameRules().get(CreativeFlySpeedRules.CREATIVE_FLY_SPEED);
int spectatorPermille = serverLevel.getGameRules().get(CreativeFlySpeedRules.SPECTATOR_FLY_SPEED);