Matemática de Velocidade e Vetores
Esta página detalha as fórmulas matemáticas, a mecânica vetorial e as conversões de tick para segundo usadas pelo Velocímetro.
📊 Infobox de fórmulas matemáticas
| Propriedade | Fórmula / Valor |
|---|---|
| Taxa de ticks vanilla | $20.0\text{ ticks} = 1.0\text{ segundo}$ |
| Native Speed Source | entity.getKnownSpeed() ($\text{Vec3}$) |
| Total 3D Speed ($S$) | $S = \sqrt{v_x^2 + v_y^2 + v_z^2} \times 20.0$ |
| Horizontal Speed ($H$) | $H = \sqrt{v_x^2 + v_z^2} \times 20.0$ |
| Vertical Speed ($V$) | $V = |
| Unit of Measurement | blocos por segundo (b/s) |
| Display Precision | %.2f (Locale.ROOT) |
🧮 Fórmulas matemáticas
O Minecraft calcula o movimento das entidades internamente por tick. Seja $\vec{v} = (v_x, v_y, v_z)$ o vetor de velocidade de entity.getKnownSpeed() em $\text{blocks/tick}$.
1. Conversão de velocidade 3D total
$$S_{\text{bps}} = |\vec{v}| \times 20.0 = \sqrt{v_x^2 + v_y^2 + v_z^2} \times 20.0$$
2. Velocidade horizontal ($H$)
$$H_{\text{bps}} = \sqrt{v_x^2 + v_z^2} \times 20.0$$
3. Velocidade vertical ($V$)
$$V_{\text{bps}} = |v_y| \times 20.0$$
🔄 Matriz de conversão de tick para segundo
| Ação de movimento | Velocidade bruta ($\text{blocks/tick}$) | Horizontal ($H$) | Vertical ($V$) | Saída do Speedometer (b/s) |
|---|---|---|---|---|
| Andando | $0.215\text{ b/t}$ | $4.30\text{ b/s}$ | $0.00\text{ b/s}$ | Speed: 4.30 b/s (H: 4.30, V: 0.00) |
| Correndo | $0.280\text{ b/t}$ | $5.60\text{ b/s}$ | $0.00\text{ b/s}$ | Speed: 5.60 b/s (H: 5.60, V: 0.00) |
| Correndo + Pulando | $0.340\text{ b/t}$ | $6.20\text{ b/s}$ | $2.42\text{ b/s}$ | Speed: 6.66 b/s (H: 6.20, V: 2.42) |
| Barco (Gelo Azul) | $3.500\text{ b/t}$ | $70.00\text{ b/s}$ | $0.00\text{ b/s}$ | Speed: 70.00 b/s (H: 70.00, V: 0.00) |
| Mergulho de Élitros | $2.500\text{ b/t}$ | $30.00\text{ b/s}$ | $40.00\text{ b/s}$ | Speed: 50.00 b/s (H: 30.00, V: 40.00) |
