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
| 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 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
- Inyección en carga de clase estática (
DebugScreenEntriesMixin): Durante la inicialización (<clinit>) deDebugScreenEntries, Speedometer invoca el método privadoregisterpara agregarspeedometeral registro vainilla (ENTRIES_BY_ID). - Inicialización de estado predeterminado (
DebugScreenEntryListMixin): Cuando se ejecutaDebugScreenEntryList.rebuildCurrentList(), Speedometer verifica sispeedometerexiste enallStatuses. Si no existe, lo registra automáticamente comoIN_OVERLAY. - Spy Wrapper Replacement: Si vainilla registra nativamente
player_speed(p. ej. en Minecraft 26.3+),DebugScreenEntriesMixinreemplaza el objeto nativo por nuestroDebugEntryPlayerSpeedWrapper.
