Skip to content

Integración con Pantalla de Depuración F3

Esta página documenta cómo Velocímetro se integra en el pipeline de renderizado de depuración F3 usando DebugScreenEntries y DebugScreenEntryList.


📊 Cuadro informativo de integración 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 arquitectura

+----------------------------------------------------------------+
|                     Minecraft F3 Debug Screen                   |
+----------------------------------------------------------------+
                               |
                   DebugScreenEntries.<clinit>()
                               |
                      DebugScreenEntriesMixin
                               |
        +-----------------------+-----------------------+
        |                                               |
   register()                                      put()
   ID de Speedometer                               ID de velocidad del jugador
        |                                               |
 DebugEntrySpeedometer                     DebugEntryPlayerSpeedWrapper
   (Línea independiente)                     (Línea consolidada)

⚙️ Flujo de trabajo de registro

  1. Inyección en carga de clase estática (DebugScreenEntriesMixin): Durante la inicialización (<clinit>) de DebugScreenEntries, Speedometer invoca el método privado register para agregar speedometer al registro vainilla (ENTRIES_BY_ID).
  2. Inicialización de estado predeterminado (DebugScreenEntryListMixin): Cuando se ejecuta DebugScreenEntryList.rebuildCurrentList(), Speedometer verifica si speedometer existe en allStatuses. Si no existe, lo registra automáticamente como IN_OVERLAY.
  3. Spy Wrapper Replacement: Si vainilla registra nativamente player_speed (p. ej. en Minecraft 26.3+), DebugScreenEntriesMixin reemplaza el objeto nativo por nuestro DebugEntryPlayerSpeedWrapper.

🔗 Páginas relacionadas

Official documentation & web portal for Dasik Igaijinn mods.