Skip to content

zh_cn F3 Debug Integration

Rifa edited this page Aug 25, 2026 · 1 revision

F3 调试界面集成

本页面记录了 速度计 (Speedometer) 如何使用 DebugScreenEntriesDebugScreenEntryList 接入 Minecraft 的客户端调试渲染流水线。


📊 F3 Debug Integration Infobox

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

🏗 Architecture Diagram

+----------------------------------------------------------------+
|                     Minecraft F3 Debug Screen                   |
+----------------------------------------------------------------+
                               |
                   DebugScreenEntries.<clinit>()
                               |
                      DebugScreenEntriesMixin
                               |
        +-----------------------+-----------------------+
        |                                               |
   register()                                      put()
   Speedometer ID                                  Player Speed ID
        |                                               |
 DebugEntrySpeedometer                     DebugEntryPlayerSpeedWrapper
   (Standalone Line)                         (Consolidated Line)

⚙️ Registration Workflow

  1. Static Class Loading Injection (DebugScreenEntriesMixin): During tail initialization (<clinit>) of DebugScreenEntries, Speedometer invokes the private static register method to add speedometer to vanilla's entry registry (ENTRIES_BY_ID).
  2. Default Status Initialization (DebugScreenEntryListMixin): When DebugScreenEntryList.rebuildCurrentList() executes, Speedometer verifies if speedometer exists in allStatuses. If absent, it automatically registers speedometer with DebugScreenEntryStatus.IN_OVERLAY.
  3. Spy Wrapper Replacement: If vanilla natively registers player_speed (e.g. in Minecraft 26.3+), DebugScreenEntriesMixin replaces vanilla's DebugScreenEntry object in ENTRIES_BY_ID with our DebugEntryPlayerSpeedWrapper.

🔗 相关页面

📖 Speedometer Wiki

🌐 Languages


🇺🇸 English
🇨🇳 简体中文 (Simplified Chinese)
🇭🇰 繁體中文 (Traditional Chinese)
🇷🇺 Русский (Russian)
🇪🇸 Español (Spanish)
🇩🇪 Deutsch (German)
🇫🇷 Français (French)
🇧🇷 Português (Portuguese)
🇯🇵 日本語 (Japanese)
🇮🇩 Bahasa Indonesia (Indonesian)
🇰🇷 한국어 (Korean)

🔗 External Links

Clone this wiki locally