Skip to content

F3 デバッグ画面への統合

このページでは、スピードメーターDebugScreenEntriesDebugScreenEntryList を介して F3 レンダリングパイプラインに統合する仕組みを解説します。


📊 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

🏗 アーキテクチャ図解

+----------------------------------------------------------------+
|                     Minecraft F3 Debug Screen                   |
+----------------------------------------------------------------+
                               |
                   DebugScreenEntries.<clinit>()
                               |
                      DebugScreenEntriesMixin
                               |
        +-----------------------+-----------------------+
        |                                               |
   register()                                      put()
   Speedometer 識別子                              プレイヤー速度識別子
        |                                               |
 DebugEntrySpeedometer                     DebugEntryPlayerSpeedWrapper
   (単独行)                                     (統合行)

⚙️ 登録ワークフロー

  1. 静的クラスロード注入 (DebugScreenEntriesMixin)DebugScreenEntries の静的初期化尾部 (<clinit>) で、Speedometer はプライベートな register を呼び出して speedometer をバニラの一覧 (ENTRIES_BY_ID) に登録します。
  2. デフォルト状態初期化 (DebugScreenEntryListMixin)DebugScreenEntryList.rebuildCurrentList() が実行される際、Speedometer は allStatuses 内の存在を確認し、なければ自動で IN_OVERLAY として登録します。
  3. Spy Wrapper Replacement: バニラが player_speed をネイティブに登録している場合(Minecraft 26.3+ など)、DebugScreenEntriesMixin はバニラのエントリを DebugEntryPlayerSpeedWrapper に差し替えます。

🔗 関連ページ

Official documentation & web portal for Dasik Igaijinn mods.