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는 allStatusesspeedometer가 있는지 확인하고, 없으면 자동으로 IN_OVERLAY로 등록합니다.
  3. Spy Wrapper Replacement: 바닐라가 네이티브로 player_speed를 등록하는 경우(예: Minecraft 26.3+), DebugScreenEntriesMixin은 바닐라 객체를 DebugEntryPlayerSpeedWrapper로 교체합니다.

🔗 관련 페이지

Official documentation & web portal for Dasik Igaijinn mods.