Arquitectura y Mixins
Esta referencia técnica detalla la jerarquía de paquetes, disposición de fuentes y tabla de inyección Mixin.
📊 Diagrama de arquitectura de paquetes
text
net.vanillaoutsider.speedometer
├── SpeedometerMod.java <-- Constants & Identifier definitions
├── client
│ ├── SpeedometerClient.java <-- ClientModInitializer entrypoint
│ ├── DebugEntrySpeedometer.java <-- Custom DebugScreenEntry implementation
│ └── DebugEntryPlayerSpeedWrapper.java <-- Interceptor spy-wrapper for player_speed
└── mixin
├── DebugScreenEntriesMixin.java <-- Hooks into DebugScreenEntries static init
└── DebugScreenEntryListMixin.java <-- Enforces default IN_OVERLAY status🧩 Tabla de desglose de objetivos Mixin
| Clase Mixin | Clase Minecraft objetivo | Método / Punto objetivo | Tipo de inyección | Propósito |
|---|---|---|---|---|
DebugScreenEntriesMixin | net.minecraft.client.gui.components.debug.DebugScreenEntries | <clinit> @At("TAIL") | @Inject | Registra el ID de entrada speedometer y envuelve la entrada nativa player_speed si está presente. |
DebugScreenEntriesMixin | net.minecraft.client.gui.components.debug.DebugScreenEntries | register | @Invoker | Invoca el método privado vainilla register(Identifier, DebugScreenEntry). |
DebugScreenEntryListMixin | net.minecraft.client.gui.components.debug.DebugScreenEntryList | rebuildCurrentList @At("HEAD") | @Inject | Garantiza que el estado de speedometer sea de forma predeterminada DebugScreenEntryStatus.IN_OVERLAY. |
🔒 Seguridad de hilos y garantía sin bloqueos
- Todas las inyecciones Mixin se ejecutan exclusivamente en el hilo de renderizado del cliente de Minecraft.
- La implementación sin bloqueos ni candados garantiza cero caídas de fotogramas ($<0.001\text{ ms}$).
