Integração com a Tela de Depuração F3
Esta página documenta como o Velocímetro se integra ao pipeline de renderização F3 via DebugScreenEntries e DebugScreenEntryList.
📊 Ficha de integração com F3
| Property | Value |
|---|---|
| Speedometer Registry Key | Identifier.withDefaultNamespace("speedometer") |
| Native Vanilla Key | Identifier.withDefaultNamespace("player_speed") |
| Interface Implemented | net.minecraft.client.gui.components.debug.DebugScreenEntry |
| Mixin Target 1 | net.minecraft.client.gui.components.debug.DebugScreenEntries |
| Mixin Target 2 | net.minecraft.client.gui.components.debug.DebugScreenEntryList |
| Default Display State | DebugScreenEntryStatus.IN_OVERLAY |
🏗 Diagrama de arquitetura
+----------------------------------------------------------------+
| Minecraft F3 Debug Screen |
+----------------------------------------------------------------+
|
DebugScreenEntries.<clinit>()
|
DebugScreenEntriesMixin
|
+-----------------------+-----------------------+
| |
register() put()
ID do Speedometer ID de velocidade do jogador
| |
DebugEntrySpeedometer DebugEntryPlayerSpeedWrapper
(Linha separada) (Linha consolidada)⚙️ Fluxo de registro
- Injeção no carregamento de classe estática (
DebugScreenEntriesMixin): Durante a inicialização (<clinit>) deDebugScreenEntries, o Speedometer chama o método privadoregisterpara adicionar ospeedometerao registro vanilla (ENTRIES_BY_ID). - Inicialização do estado padrão (
DebugScreenEntryListMixin): QuandoDebugScreenEntryList.rebuildCurrentList()é executado, o Speedometer verifica a presença dospeedometere o registra comoIN_OVERLAYse ausente. - Spy Wrapper Replacement: Se o vanilla registrar nativamente
player_speed(ex: Minecraft 26.3+), oDebugScreenEntriesMixinsubstitui o objeto nativo pelo nossoDebugEntryPlayerSpeedWrapper.
