F3 デバッグ画面への統合
このページでは、スピードメーター が DebugScreenEntries と DebugScreenEntryList を介して F3 レンダリングパイプラインに統合する仕組みを解説します。
📊 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 |
🏗 アーキテクチャ図解
+----------------------------------------------------------------+
| Minecraft F3 Debug Screen |
+----------------------------------------------------------------+
|
DebugScreenEntries.<clinit>()
|
DebugScreenEntriesMixin
|
+-----------------------+-----------------------+
| |
register() put()
Speedometer 識別子 プレイヤー速度識別子
| |
DebugEntrySpeedometer DebugEntryPlayerSpeedWrapper
(単独行) (統合行)⚙️ 登録ワークフロー
- 静的クラスロード注入 (
DebugScreenEntriesMixin):DebugScreenEntriesの静的初期化尾部 (<clinit>) で、Speedometer はプライベートなregisterを呼び出してspeedometerをバニラの一覧 (ENTRIES_BY_ID) に登録します。 - デフォルト状態初期化 (
DebugScreenEntryListMixin):DebugScreenEntryList.rebuildCurrentList()が実行される際、Speedometer はallStatuses内の存在を確認し、なければ自動でIN_OVERLAYとして登録します。 - Spy Wrapper Replacement: バニラが
player_speedをネイティブに登録している場合(Minecraft 26.3+ など)、DebugScreenEntriesMixinはバニラのエントリをDebugEntryPlayerSpeedWrapperに差し替えます。
