Skip to content

Arquitetura e Mixins

Esta referência técnica detalha a hierarquia de pacotes, organização do código e tabela de injeção Mixin.


📊 Diagrama de arquitetura de pacotes

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

🧩 Tabela de detalhamento de alvos Mixin

Classe MixinClasse Minecraft de destinoMétodo / Ponto de destinoTipo de injeçãoPropósito
DebugScreenEntriesMixinnet.minecraft.client.gui.components.debug.DebugScreenEntries<clinit> @At("TAIL")@InjectRegistra o ID de entrada speedometer e envolve a entrada nativa player_speed se presente.
DebugScreenEntriesMixinnet.minecraft.client.gui.components.debug.DebugScreenEntriesregister@InvokerInvoca o método privado vanilla register(Identifier, DebugScreenEntry).
DebugScreenEntryListMixinnet.minecraft.client.gui.components.debug.DebugScreenEntryListrebuildCurrentList @At("HEAD")@InjectGarante que o status do speedometer seja por padrão DebugScreenEntryStatus.IN_OVERLAY.

🔒 Segurança de threads e garantia não bloqueante

  • Todas as injeções de Mixin são executadas exclusivamente na thread de renderização do cliente do Minecraft.
  • A implementação não bloqueante sem travas garante zero perda de quadros ($<0.001\text{ ms}$).

🔗 Páginas relacionadas

Official documentation & web portal for Dasik Igaijinn mods.