Skip to content

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

PropertyValue
Speedometer Registry KeyIdentifier.withDefaultNamespace("speedometer")
Native Vanilla KeyIdentifier.withDefaultNamespace("player_speed")
Interface Implementednet.minecraft.client.gui.components.debug.DebugScreenEntry
Mixin Target 1net.minecraft.client.gui.components.debug.DebugScreenEntries
Mixin Target 2net.minecraft.client.gui.components.debug.DebugScreenEntryList
Default Display StateDebugScreenEntryStatus.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

  1. Injeção no carregamento de classe estática (DebugScreenEntriesMixin): Durante a inicialização (<clinit>) de DebugScreenEntries, o Speedometer chama o método privado register para adicionar o speedometer ao registro vanilla (ENTRIES_BY_ID).
  2. Inicialização do estado padrão (DebugScreenEntryListMixin): Quando DebugScreenEntryList.rebuildCurrentList() é executado, o Speedometer verifica a presença do speedometer e o registra como IN_OVERLAY se ausente.
  3. Spy Wrapper Replacement: Se o vanilla registrar nativamente player_speed (ex: Minecraft 26.3+), o DebugScreenEntriesMixin substitui o objeto nativo pelo nosso DebugEntryPlayerSpeedWrapper.

🔗 Páginas relacionadas

Official documentation & web portal for Dasik Igaijinn mods.