Skip to content

Architecture et Mixins

Cette référence technique détaille la hiérarchie des packages, l'organisation du code et les points d'injection Mixin.


📊 Diagramme d'architecture des packages

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

🧩 Tableau détaillé des cibles Mixin

Classe MixinClasse Minecraft cibleMéthode / Point cibleType d'injectionObjectif
DebugScreenEntriesMixinnet.minecraft.client.gui.components.debug.DebugScreenEntries<clinit> @At("TAIL")@InjectEnregistre l'ID d'entrée speedometer et enveloppe l'entrée native player_speed si présente.
DebugScreenEntriesMixinnet.minecraft.client.gui.components.debug.DebugScreenEntriesregister@InvokerAppelle la méthode privée vanilla register(Identifier, DebugScreenEntry).
DebugScreenEntryListMixinnet.minecraft.client.gui.components.debug.DebugScreenEntryListrebuildCurrentList @At("HEAD")@InjectGarantit que le statut de speedometer est par défaut DebugScreenEntryStatus.IN_OVERLAY.

🔒 Sécurité des threads et garantie non bloquante

  • Toutes les injections Mixin s'exécutent exclusivement sur le thread de rendu client de Minecraft.
  • L'implémentation non bloquante sans verrou garantit zéro baisse de framerate ($<0.001\text{ ms}$).

🔗 Pages associées

Official documentation & web portal for Dasik Igaijinn mods.