Minecraft.java

net.minecraft.client.Minecraft

信息

  • 全限定名:net.minecraft.client.Minecraft
  • 类型:public class
  • 包:net.minecraft.client
  • 源码路径:src/main/java/net/minecraft/client/Minecraft.java
  • 起始行号:L271
  • 继承:ReentrantBlockableEventLoop
  • 实现:WindowEventHandler
  • 职责:

    TODO

字段/常量

  • instance

    • 类型: Minecraft
    • 修饰符: private static
    • 源码定位: L272
    • 说明:

      TODO

  • LOGGER

    • 类型: Logger
    • 修饰符: private static final
    • 源码定位: L273
    • 说明:

      TODO

  • MAX_TICKS_PER_UPDATE

    • 类型: int
    • 修饰符: private static final
    • 源码定位: L274
    • 说明:

      TODO

  • DEFAULT_FONT

    • 类型: Identifier
    • 修饰符: public static final
    • 源码定位: L275
    • 说明:

      TODO

  • UNIFORM_FONT

    • 类型: Identifier
    • 修饰符: public static final
    • 源码定位: L276
    • 说明:

      TODO

  • ALT_FONT

    • 类型: Identifier
    • 修饰符: public static final
    • 源码定位: L277
    • 说明:

      TODO

  • REGIONAL_COMPLIANCIES

    • 类型: Identifier
    • 修饰符: private static final
    • 源码定位: L278
    • 说明:

      TODO

  • RESOURCE_RELOAD_INITIAL_TASK

    • 类型: CompletableFuture<Unit>
    • 修饰符: private static final
    • 源码定位: L279
    • 说明:

      TODO

  • SOCIAL_INTERACTIONS_NOT_AVAILABLE

    • 类型: Component
    • 修饰符: private static final
    • 源码定位: L280
    • 说明:

      TODO

  • SAVING_LEVEL

    • 类型: Component
    • 修饰符: private static final
    • 源码定位: L281
    • 说明:

      TODO

  • UPDATE_DRIVERS_ADVICE

    • 类型: String
    • 修饰符: public static final
    • 源码定位: L282
    • 说明:

      TODO

  • canary

    • 类型: long
    • 修饰符: private final
    • 源码定位: L283
    • 说明:

      TODO

  • resourcePackDirectory

    • 类型: Path
    • 修饰符: private final
    • 源码定位: L284
    • 说明:

      TODO

  • profileFuture

    • 类型: CompletableFuture<ProfileResult>
    • 修饰符: private final
    • 源码定位: L285
    • 说明:

      TODO

  • textureManager

    • 类型: TextureManager
    • 修饰符: private final
    • 源码定位: L286
    • 说明:

      TODO

  • shaderManager

    • 类型: ShaderManager
    • 修饰符: private final
    • 源码定位: L287
    • 说明:

      TODO

  • fixerUpper

    • 类型: DataFixer
    • 修饰符: private final
    • 源码定位: L288
    • 说明:

      TODO

  • window

    • 类型: Window
    • 修饰符: private final
    • 源码定位: L289
    • 说明:

      TODO

  • textInputManager

    • 类型: TextInputManager
    • 修饰符: private final
    • 源码定位: L290
    • 说明:

      TODO

  • deltaTracker

    • 类型: DeltaTracker.Timer
    • 修饰符: private final
    • 源码定位: L291
    • 说明:

      TODO

  • renderBuffers

    • 类型: RenderBuffers
    • 修饰符: private final
    • 源码定位: L292
    • 说明:

      TODO

  • levelRenderer

    • 类型: LevelRenderer
    • 修饰符: public final
    • 源码定位: L293
    • 说明:

      TODO

  • entityRenderDispatcher

    • 类型: EntityRenderDispatcher
    • 修饰符: private final
    • 源码定位: L294
    • 说明:

      TODO

  • blockModelResolver

    • 类型: BlockModelResolver
    • 修饰符: private final
    • 源码定位: L295
    • 说明:

      TODO

  • itemModelResolver

    • 类型: ItemModelResolver
    • 修饰符: private final
    • 源码定位: L296
    • 说明:

      TODO

  • mapRenderer

    • 类型: MapRenderer
    • 修饰符: private final
    • 源码定位: L297
    • 说明:

      TODO

  • particleEngine

    • 类型: ParticleEngine
    • 修饰符: public final
    • 源码定位: L298
    • 说明:

      TODO

  • particleResources

    • 类型: ParticleResources
    • 修饰符: private final
    • 源码定位: L299
    • 说明:

      TODO

  • user

    • 类型: User
    • 修饰符: private final
    • 源码定位: L300
    • 说明:

      TODO

  • font

    • 类型: Font
    • 修饰符: public final
    • 源码定位: L301
    • 说明:

      TODO

  • fontFilterFishy

    • 类型: Font
    • 修饰符: public final
    • 源码定位: L302
    • 说明:

      TODO

  • gameRenderer

    • 类型: GameRenderer
    • 修饰符: public final
    • 源码定位: L303
    • 说明:

      TODO

  • gui

    • 类型: Gui
    • 修饰符: public final
    • 源码定位: L304
    • 说明:

      TODO

  • options

    • 类型: Options
    • 修饰符: public final
    • 源码定位: L305
    • 说明:

      TODO

  • debugEntries

    • 类型: DebugScreenEntryList
    • 修饰符: public final
    • 源码定位: L306
    • 说明:

      TODO

  • hotbarManager

    • 类型: HotbarManager
    • 修饰符: private final
    • 源码定位: L307
    • 说明:

      TODO

  • mouseHandler

    • 类型: MouseHandler
    • 修饰符: public final
    • 源码定位: L308
    • 说明:

      TODO

  • keyboardHandler

    • 类型: KeyboardHandler
    • 修饰符: public final
    • 源码定位: L309
    • 说明:

      TODO

  • lastInputType

    • 类型: InputType
    • 修饰符: private
    • 源码定位: L310
    • 说明:

      TODO

  • gameDirectory

    • 类型: File
    • 修饰符: public final
    • 源码定位: L311
    • 说明:

      TODO

  • launchedVersion

    • 类型: String
    • 修饰符: private final
    • 源码定位: L312
    • 说明:

      TODO

  • versionType

    • 类型: String
    • 修饰符: private final
    • 源码定位: L313
    • 说明:

      TODO

  • proxy

    • 类型: Proxy
    • 修饰符: private final
    • 源码定位: L314
    • 说明:

      TODO

  • offlineDeveloperMode

    • 类型: boolean
    • 修饰符: private final
    • 源码定位: L315
    • 说明:

      TODO

  • levelSource

    • 类型: LevelStorageSource
    • 修饰符: private final
    • 源码定位: L316
    • 说明:

      TODO

  • demo

    • 类型: boolean
    • 修饰符: private final
    • 源码定位: L317
    • 说明:

      TODO

  • allowsMultiplayer

    • 类型: boolean
    • 修饰符: private final
    • 源码定位: L318
    • 说明:

      TODO

  • allowsChat

    • 类型: boolean
    • 修饰符: private final
    • 源码定位: L319
    • 说明:

      TODO

  • resourceManager

    • 类型: ReloadableResourceManager
    • 修饰符: private final
    • 源码定位: L320
    • 说明:

      TODO

  • vanillaPackResources

    • 类型: VanillaPackResources
    • 修饰符: private final
    • 源码定位: L321
    • 说明:

      TODO

  • downloadedPackSource

    • 类型: DownloadedPackSource
    • 修饰符: private final
    • 源码定位: L322
    • 说明:

      TODO

  • resourcePackRepository

    • 类型: PackRepository
    • 修饰符: private final
    • 源码定位: L323
    • 说明:

      TODO

  • languageManager

    • 类型: LanguageManager
    • 修饰符: private final
    • 源码定位: L324
    • 说明:

      TODO

  • blockColors

    • 类型: BlockColors
    • 修饰符: private final
    • 源码定位: L325
    • 说明:

      TODO

  • mainRenderTarget

    • 类型: RenderTarget
    • 修饰符: private final
    • 源码定位: L326
    • 说明:

      TODO

  • tracyFrameCapture

    • 类型: TracyFrameCapture
    • 修饰符: private final
    • 源码定位: L327
    • 说明:

      TODO

  • soundManager

    • 类型: SoundManager
    • 修饰符: private final
    • 源码定位: L328
    • 说明:

      TODO

  • musicManager

    • 类型: MusicManager
    • 修饰符: private final
    • 源码定位: L329
    • 说明:

      TODO

  • fontManager

    • 类型: FontManager
    • 修饰符: private final
    • 源码定位: L330
    • 说明:

      TODO

  • splashManager

    • 类型: SplashManager
    • 修饰符: private final
    • 源码定位: L331
    • 说明:

      TODO

  • gpuWarnlistManager

    • 类型: GpuWarnlistManager
    • 修饰符: private final
    • 源码定位: L332
    • 说明:

      TODO

  • regionalCompliancies

    • 类型: PeriodicNotificationManager
    • 修饰符: private final
    • 源码定位: L333
    • 说明:

      TODO

  • userApiService

    • 类型: UserApiService
    • 修饰符: private final
    • 源码定位: L334
    • 说明:

      TODO

  • userPropertiesFuture

    • 类型: CompletableFuture<UserProperties>
    • 修饰符: private final
    • 源码定位: L335
    • 说明:

      TODO

  • skinManager

    • 类型: SkinManager
    • 修饰符: private final
    • 源码定位: L336
    • 说明:

      TODO

  • atlasManager

    • 类型: AtlasManager
    • 修饰符: private final
    • 源码定位: L337
    • 说明:

      TODO

  • modelManager

    • 类型: ModelManager
    • 修饰符: private final
    • 源码定位: L338
    • 说明:

      TODO

  • mapTextureManager

    • 类型: MapTextureManager
    • 修饰符: private final
    • 源码定位: L339
    • 说明:

      TODO

  • waypointStyles

    • 类型: WaypointStyleManager
    • 修饰符: private final
    • 源码定位: L340
    • 说明:

      TODO

  • toastManager

    • 类型: ToastManager
    • 修饰符: private final
    • 源码定位: L341
    • 说明:

      TODO

  • tutorial

    • 类型: Tutorial
    • 修饰符: private final
    • 源码定位: L342
    • 说明:

      TODO

  • playerSocialManager

    • 类型: PlayerSocialManager
    • 修饰符: private final
    • 源码定位: L343
    • 说明:

      TODO

  • blockEntityRenderDispatcher

    • 类型: BlockEntityRenderDispatcher
    • 修饰符: private final
    • 源码定位: L344
    • 说明:

      TODO

  • telemetryManager

    • 类型: ClientTelemetryManager
    • 修饰符: private final
    • 源码定位: L345
    • 说明:

      TODO

  • profileKeyPairManager

    • 类型: ProfileKeyPairManager
    • 修饰符: private final
    • 源码定位: L346
    • 说明:

      TODO

  • realmsDataFetcher

    • 类型: RealmsDataFetcher
    • 修饰符: private final
    • 源码定位: L347
    • 说明:

      TODO

  • quickPlayLog

    • 类型: QuickPlayLog
    • 修饰符: private final
    • 源码定位: L348
    • 说明:

      TODO

  • services

    • 类型: Services
    • 修饰符: private final
    • 源码定位: L349
    • 说明:

      TODO

  • playerSkinRenderCache

    • 类型: PlayerSkinRenderCache
    • 修饰符: private final
    • 源码定位: L350
    • 说明:

      TODO

  • gameMode

    • 类型: MultiPlayerGameMode
    • 修饰符: public
    • 源码定位: L351
    • 说明:

      TODO

  • level

    • 类型: ClientLevel
    • 修饰符: public
    • 源码定位: L352
    • 说明:

      TODO

  • player

    • 类型: LocalPlayer
    • 修饰符: public
    • 源码定位: L353
    • 说明:

      TODO

  • singleplayerServer

    • 类型: IntegratedServer
    • 修饰符: private
    • 源码定位: L354
    • 说明:

      TODO

  • pendingConnection

    • 类型: Connection
    • 修饰符: private
    • 源码定位: L355
    • 说明:

      TODO

  • isLocalServer

    • 类型: boolean
    • 修饰符: private
    • 源码定位: L356
    • 说明:

      TODO

  • crosshairPickEntity

    • 类型: Entity
    • 修饰符: public
    • 源码定位: L357
    • 说明:

      TODO

  • hitResult

    • 类型: HitResult
    • 修饰符: public
    • 源码定位: L358
    • 说明:

      TODO

  • rightClickDelay

    • 类型: int
    • 修饰符: private
    • 源码定位: L359
    • 说明:

      TODO

  • missTime

    • 类型: int
    • 修饰符: protected
    • 源码定位: L360
    • 说明:

      TODO

  • pause

    • 类型: boolean
    • 修饰符: private volatile
    • 源码定位: L361
    • 说明:

      TODO

  • lastNanoTime

    • 类型: long
    • 修饰符: private
    • 源码定位: L362
    • 说明:

      TODO

  • lastTime

    • 类型: long
    • 修饰符: private
    • 源码定位: L363
    • 说明:

      TODO

  • frames

    • 类型: int
    • 修饰符: private
    • 源码定位: L364
    • 说明:

      TODO

  • screen

    • 类型: Screen
    • 修饰符: public
    • 源码定位: L365
    • 说明:

      TODO

  • overlay

    • 类型: Overlay
    • 修饰符: private
    • 源码定位: L366
    • 说明:

      TODO

  • clientLevelTeardownInProgress

    • 类型: boolean
    • 修饰符: private
    • 源码定位: L367
    • 说明:

      TODO

  • gameThread

    • 类型: Thread
    • 修饰符: private
    • 源码定位: L368
    • 说明:

      TODO

  • running

    • 类型: boolean
    • 修饰符: private volatile
    • 源码定位: L369
    • 说明:

      TODO

  • fps

    • 类型: int
    • 修饰符: private static
    • 源码定位: L370
    • 说明:

      TODO

  • frameTimeNs

    • 类型: long
    • 修饰符: private
    • 源码定位: L371
    • 说明:

      TODO

  • framerateLimitTracker

    • 类型: FramerateLimitTracker
    • 修饰符: private final
    • 源码定位: L372
    • 说明:

      TODO

  • wireframe

    • 类型: boolean
    • 修饰符: public
    • 源码定位: L373
    • 说明:

      TODO

  • smartCull

    • 类型: boolean
    • 修饰符: public
    • 源码定位: L374
    • 说明:

      TODO

  • lastActiveTime

    • 类型: long
    • 修饰符: private
    • 源码定位: L375
    • 说明:

      TODO

  • pendingReload

    • 类型: CompletableFuture<Void>
    • 修饰符: private
    • 源码定位: L376
    • 说明:

      TODO

  • socialInteractionsToast

    • 类型: TutorialToast
    • 修饰符: private
    • 源码定位: L377
    • 说明:

      TODO

  • fpsPieRenderTicks

    • 类型: int
    • 修饰符: private
    • 源码定位: L378
    • 说明:

      TODO

  • fpsPieProfiler

    • 类型: ContinuousProfiler
    • 修饰符: private final
    • 源码定位: L379
    • 说明:

      TODO

  • metricsRecorder

    • 类型: MetricsRecorder
    • 修饰符: private
    • 源码定位: L380
    • 说明:

      TODO

  • reloadStateTracker

    • 类型: ResourceLoadStateTracker
    • 修饰符: private final
    • 源码定位: L381
    • 说明:

      TODO

  • savedCpuDuration

    • 类型: long
    • 修饰符: private
    • 源码定位: L382
    • 说明:

      TODO

  • gpuUtilization

    • 类型: double
    • 修饰符: private
    • 源码定位: L383
    • 说明:

      TODO

  • currentFrameProfile

    • 类型: TimerQuery.FrameProfile
    • 修饰符: private
    • 源码定位: L384
    • 说明:

      TODO

  • narrator

    • 类型: GameNarrator
    • 修饰符: private final
    • 源码定位: L385
    • 说明:

      TODO

  • chatListener

    • 类型: ChatListener
    • 修饰符: private final
    • 源码定位: L386
    • 说明:

      TODO

  • reportingContext

    • 类型: ReportingContext
    • 修饰符: private
    • 源码定位: L387
    • 说明:

      TODO

  • commandHistory

    • 类型: CommandHistory
    • 修饰符: private final
    • 源码定位: L388
    • 说明:

      TODO

  • directoryValidator

    • 类型: DirectoryValidator
    • 修饰符: private final
    • 源码定位: L389
    • 说明:

      TODO

  • gameLoadFinished

    • 类型: boolean
    • 修饰符: private
    • 源码定位: L390
    • 说明:

      TODO

  • clientStartTimeMs

    • 类型: long
    • 修饰符: private final
    • 源码定位: L391
    • 说明:

      TODO

  • clientTickCount

    • 类型: long
    • 修饰符: private
    • 源码定位: L392
    • 说明:

      TODO

  • packetProcessor

    • 类型: PacketProcessor
    • 修饰符: private final
    • 源码定位: L393
    • 说明:

      TODO

  • perTickGizmos

    • 类型: SimpleGizmoCollector
    • 修饰符: private final
    • 源码定位: L394
    • 说明:

      TODO

  • drainedLatestTickGizmos

    • 类型: List<SimpleGizmoCollector.GizmoInstance>
    • 修饰符: private
    • 源码定位: L395
    • 说明:

      TODO

内部类/嵌套类型

  • net.minecraft.client.Minecraft.GameLoadCookie
    • 类型: record
    • 修饰符: private
    • 源码定位: L2942
    • 说明:

      TODO

构造器

public Minecraft(GameConfig gameConfig) @ L397

  • 构造器名:Minecraft
  • 源码定位:L397
  • 修饰符:public

参数:

  • gameConfig: GameConfig

说明:

TODO

方法

下面的方法块按源码顺序生成。

public boolean hasShiftDown() @ L714

  • 方法名:hasShiftDown
  • 源码定位:L714
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean hasControlDown() @ L719

  • 方法名:hasControlDown
  • 源码定位:L719
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean hasAltDown() @ L724

  • 方法名:hasAltDown
  • 源码定位:L724
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

private void onResourceLoadFinished(Minecraft.GameLoadCookie loadCookie) @ L729

  • 方法名:onResourceLoadFinished
  • 源码定位:L729
  • 返回类型:void
  • 修饰符:private

参数:

  • loadCookie: Minecraft.GameLoadCookie

说明:

TODO

  • 方法名:onGameLoadFinished
  • 源码定位:L736
  • 返回类型:void
  • 修饰符:private

参数:

  • cookie: Minecraft.GameLoadCookie

说明:

TODO

public boolean isGameLoadFinished() @ L746

  • 方法名:isGameLoadFinished
  • 源码定位:L746
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

  • 方法名:buildInitialScreens
  • 源码定位:L750
  • 返回类型:Runnable
  • 修饰符:private

参数:

  • cookie: Minecraft.GameLoadCookie

说明:

TODO

private boolean addInitialScreens(List<Function<Runnable,Screen>> screens) @ L769

  • 方法名:addInitialScreens
  • 源码定位:L769
  • 返回类型:boolean
  • 修饰符:private

参数:

  • screens: List<Function<Runnable,Screen>>

说明:

TODO

private static boolean countryEqualsISO3(Object iso3Locale) @ L803

  • 方法名:countryEqualsISO3
  • 源码定位:L803
  • 返回类型:boolean
  • 修饰符:private static

参数:

  • iso3Locale: Object

说明:

TODO

public void updateTitle() @ L811

  • 方法名:updateTitle
  • 源码定位:L811
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

private String createTitle() @ L815

  • 方法名:createTitle
  • 源码定位:L815
  • 返回类型:String
  • 修饰符:private

参数:

说明:

TODO

private UserApiService createUserApiService(YggdrasilAuthenticationService authService, GameConfig config) @ L841

  • 方法名:createUserApiService
  • 源码定位:L841
  • 返回类型:UserApiService
  • 修饰符:private

参数:

  • authService: YggdrasilAuthenticationService
  • config: GameConfig

说明:

TODO

public boolean isOfflineDeveloperMode() @ L845

  • 方法名:isOfflineDeveloperMode
  • 源码定位:L845
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public static ModCheck checkModStatus() @ L849

  • 方法名:checkModStatus
  • 源码定位:L849
  • 返回类型:ModCheck
  • 修饰符:public static

参数:

说明:

TODO

private void rollbackResourcePacks(Throwable t, Minecraft.GameLoadCookie loadCookie) @ L853

  • 方法名:rollbackResourcePacks
  • 源码定位:L853
  • 返回类型:void
  • 修饰符:private

参数:

  • t: Throwable
  • loadCookie: Minecraft.GameLoadCookie

说明:

TODO

public void clearResourcePacksOnError(Throwable t, Component message, Minecraft.GameLoadCookie loadCookie) @ L861

  • 方法名:clearResourcePacksOnError
  • 源码定位:L861
  • 返回类型:void
  • 修饰符:public

参数:

  • t: Throwable
  • message: Component
  • loadCookie: Minecraft.GameLoadCookie

说明:

TODO

private void abortResourcePackRecovery() @ L872

  • 方法名:abortResourcePackRecovery
  • 源码定位:L872
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

private void addResourcePackLoadFailToast(Component message) @ L883

  • 方法名:addResourcePackLoadFailToast
  • 源码定位:L883
  • 返回类型:void
  • 修饰符:private

参数:

  • message: Component

说明:

TODO

public void triggerResourcePackRecovery(Exception exception) @ L888

  • 方法名:triggerResourcePackRecovery
  • 源码定位:L888
  • 返回类型:void
  • 修饰符:public

参数:

  • exception: Exception

说明:

TODO

public void run() @ L901

  • 方法名:run
  • 源码定位:L901
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

void updateFontOptions() @ L949

  • 方法名:updateFontOptions
  • 源码定位:L949
  • 返回类型:void
  • 修饰符:package-private

参数:

说明:

TODO

private void onFullscreenError(int error, long description) @ L953

  • 方法名:onFullscreenError
  • 源码定位:L953
  • 返回类型:void
  • 修饰符:private

参数:

  • error: int
  • description: long

说明:

TODO

public RenderTarget getMainRenderTarget() @ L958

  • 方法名:getMainRenderTarget
  • 源码定位:L958
  • 返回类型:RenderTarget
  • 修饰符:public

参数:

说明:

TODO

public String getLaunchedVersion() @ L962

  • 方法名:getLaunchedVersion
  • 源码定位:L962
  • 返回类型:String
  • 修饰符:public

参数:

说明:

TODO

public String getVersionType() @ L966

  • 方法名:getVersionType
  • 源码定位:L966
  • 返回类型:String
  • 修饰符:public

参数:

说明:

TODO

public void delayCrash(CrashReport crash) @ L970

  • 方法名:delayCrash
  • 源码定位:L970
  • 返回类型:void
  • 修饰符:public

参数:

  • crash: CrashReport

说明:

TODO

public void emergencySaveAndCrash(CrashReport partialReport) @ L975

  • 方法名:emergencySaveAndCrash
  • 源码定位:L975
  • 返回类型:void
  • 修饰符:public

参数:

  • partialReport: CrashReport

说明:

TODO

public static int saveReport(File gameDirectory, CrashReport crash) @ L983

  • 方法名:saveReport
  • 源码定位:L983
  • 返回类型:int
  • 修饰符:public static

参数:

  • gameDirectory: File
  • crash: CrashReport

说明:

TODO

public static void crash(Minecraft minecraft, File gameDirectory, CrashReport crash) @ L1010

  • 方法名:crash
  • 源码定位:L1010
  • 返回类型:void
  • 修饰符:public static

参数:

  • minecraft: Minecraft
  • gameDirectory: File
  • crash: CrashReport

说明:

TODO

private static int saveReportAndShutdownSoundManager(Minecraft minecraft, File gameDirectory, CrashReport crash) @ L1015

  • 方法名:saveReportAndShutdownSoundManager
  • 源码定位:L1015
  • 返回类型:int
  • 修饰符:private static

参数:

  • minecraft: Minecraft
  • gameDirectory: File
  • crash: CrashReport

说明:

TODO

public boolean isEnforceUnicode() @ L1024

  • 方法名:isEnforceUnicode
  • 源码定位:L1024
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public CompletableFuture<Void> reloadResourcePacks() @ L1028

  • 方法名:reloadResourcePacks
  • 源码定位:L1028
  • 返回类型:CompletableFuture
  • 修饰符:public

参数:

说明:

TODO

private CompletableFuture<Void> reloadResourcePacks(boolean isRecovery, Minecraft.GameLoadCookie loadCookie) @ L1032

  • 方法名:reloadResourcePacks
  • 源码定位:L1032
  • 返回类型:CompletableFuture
  • 修饰符:private

参数:

  • isRecovery: boolean
  • loadCookie: Minecraft.GameLoadCookie

说明:

TODO

private void selfTest() @ L1073

  • 方法名:selfTest
  • 源码定位:L1073
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

public LevelStorageSource getLevelSource() @ L1116

  • 方法名:getLevelSource
  • 源码定位:L1116
  • 返回类型:LevelStorageSource
  • 修饰符:public

参数:

说明:

TODO

public void openChatScreen(ChatComponent.ChatMethod chatMethod) @ L1120

  • 方法名:openChatScreen
  • 源码定位:L1120
  • 返回类型:void
  • 修饰符:public

参数:

  • chatMethod: ChatComponent.ChatMethod

说明:

TODO

public void setScreen(Screen screen) @ L1126

  • 方法名:setScreen
  • 源码定位:L1126
  • 返回类型:void
  • 修饰符:public

参数:

  • screen: Screen

说明:

TODO

public void setOverlay(Overlay overlay) @ L1177

  • 方法名:setOverlay
  • 源码定位:L1177
  • 返回类型:void
  • 修饰符:public

参数:

  • overlay: Overlay

说明:

TODO

public void destroy() @ L1181

  • 方法名:destroy
  • 源码定位:L1181
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void close() @ L1212

  • 方法名:close
  • 源码定位:L1212
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

private void runTick(boolean advanceGameTime) @ L1246

  • 方法名:runTick
  • 源码定位:L1246
  • 返回类型:void
  • 修饰符:private

参数:

  • advanceGameTime: boolean

说明:

TODO

private void renderFrame(boolean advanceGameTime) @ L1318

  • 方法名:renderFrame
  • 源码定位:L1318
  • 返回类型:void
  • 修饰符:private

参数:

  • advanceGameTime: boolean

说明:

TODO

private void pauseIfInactive() @ L1396

  • 方法名:pauseIfInactive
  • 源码定位:L1396
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

private ProfilerFiller constructProfiler(boolean shouldCollectFrameProfile, SingleTickProfiler tickProfiler) @ L1406

  • 方法名:constructProfiler
  • 源码定位:L1406
  • 返回类型:ProfilerFiller
  • 修饰符:private

参数:

  • shouldCollectFrameProfile: boolean
  • tickProfiler: SingleTickProfiler

说明:

TODO

private void finishProfilers(boolean shouldCollectFrameProfile, SingleTickProfiler tickProfiler) @ L1434

  • 方法名:finishProfilers
  • 源码定位:L1434
  • 返回类型:void
  • 修饰符:private

参数:

  • shouldCollectFrameProfile: boolean
  • tickProfiler: SingleTickProfiler

说明:

TODO

public void resizeGui() @ L1447

  • 方法名:resizeGui
  • 源码定位:L1447
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void cursorEntered() @ L1458

  • 方法名:cursorEntered
  • 源码定位:L1458
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public int getFps() @ L1463

  • 方法名:getFps
  • 源码定位:L1463
  • 返回类型:int
  • 修饰符:public

参数:

说明:

TODO

public long getFrameTimeNs() @ L1467

  • 方法名:getFrameTimeNs
  • 源码定位:L1467
  • 返回类型:long
  • 修饰符:public

参数:

说明:

TODO

public void sendLowDiskSpaceWarning() @ L1471

  • 方法名:sendLowDiskSpaceWarning
  • 源码定位:L1471
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

private void emergencySave() @ L1475

  • 方法名:emergencySave
  • 源码定位:L1475
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

public boolean debugClientMetricsStart(Consumer<Component> debugFeedback) @ L1490

  • 方法名:debugClientMetricsStart
  • 源码定位:L1490
  • 返回类型:boolean
  • 修饰符:public

参数:

  • debugFeedback: Consumer

说明:

TODO

private void debugClientMetricsStop() @ L1552

  • 方法名:debugClientMetricsStop
  • 源码定位:L1552
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

private void debugClientMetricsCancel() @ L1559

  • 方法名:debugClientMetricsCancel
  • 源码定位:L1559
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

private Path archiveProfilingReport(SystemReport systemReport, List<Path> profilingResultPaths) @ L1566

  • 方法名:archiveProfilingReport
  • 源码定位:L1566
  • 返回类型:Path
  • 修饰符:private

参数:

  • systemReport: SystemReport
  • profilingResultPaths: List

说明:

TODO

public void stop() @ L1603

  • 方法名:stop
  • 源码定位:L1603
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public boolean isRunning() @ L1607

  • 方法名:isRunning
  • 源码定位:L1607
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public void pauseGame(boolean suppressPauseMenuIfWeReallyArePausing) @ L1611

  • 方法名:pauseGame
  • 源码定位:L1611
  • 返回类型:void
  • 修饰符:public

参数:

  • suppressPauseMenuIfWeReallyArePausing: boolean

说明:

TODO

private void continueAttack(boolean down) @ L1622

  • 方法名:continueAttack
  • 源码定位:L1622
  • 返回类型:void
  • 修饰符:private

参数:

  • down: boolean

说明:

TODO

private boolean startAttack() @ L1647

  • 方法名:startAttack
  • 源码定位:L1647
  • 返回类型:boolean
  • 修饰符:private

参数:

说明:

TODO

private void startUseItem() @ L1711

  • 方法名:startUseItem
  • 源码定位:L1711
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

public MusicManager getMusicManager() @ L1777

  • 方法名:getMusicManager
  • 源码定位:L1777
  • 返回类型:MusicManager
  • 修饰符:public

参数:

说明:

TODO

public void tick() @ L1781

  • 方法名:tick
  • 源码定位:L1781
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

private boolean isLevelRunningNormally() @ L1913

  • 方法名:isLevelRunningNormally
  • 源码定位:L1913
  • 返回类型:boolean
  • 修饰符:private

参数:

说明:

TODO

private boolean isMultiplayerServer() @ L1917

  • 方法名:isMultiplayerServer
  • 源码定位:L1917
  • 返回类型:boolean
  • 修饰符:private

参数:

说明:

TODO

private void handleKeybinds() @ L1921

  • 方法名:handleKeybinds
  • 源码定位:L1921
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

private Optional<Holder<Dialog>> getQuickActionsDialog() @ L2051

  • 方法名:getQuickActionsDialog
  • 源码定位:L2051
  • 返回类型:Optional<Holder>
  • 修饰符:private

参数:

说明:

TODO

public ClientTelemetryManager getTelemetryManager() @ L2062

  • 方法名:getTelemetryManager
  • 源码定位:L2062
  • 返回类型:ClientTelemetryManager
  • 修饰符:public

参数:

说明:

TODO

public double getGpuUtilization() @ L2066

  • 方法名:getGpuUtilization
  • 源码定位:L2066
  • 返回类型:double
  • 修饰符:public

参数:

说明:

TODO

public ProfileKeyPairManager getProfileKeyPairManager() @ L2070

  • 方法名:getProfileKeyPairManager
  • 源码定位:L2070
  • 返回类型:ProfileKeyPairManager
  • 修饰符:public

参数:

说明:

TODO

public WorldOpenFlows createWorldOpenFlows() @ L2074

  • 方法名:createWorldOpenFlows
  • 源码定位:L2074
  • 返回类型:WorldOpenFlows
  • 修饰符:public

参数:

说明:

TODO

public void doWorldLoad(LevelStorageSource.LevelStorageAccess levelSourceAccess, PackRepository packRepository, WorldStem worldStem, Optional<GameRules> gameRules, boolean newWorld) @ L2078

  • 方法名:doWorldLoad
  • 源码定位:L2078
  • 返回类型:void
  • 修饰符:public

参数:

  • levelSourceAccess: LevelStorageSource.LevelStorageAccess
  • packRepository: PackRepository
  • worldStem: WorldStem
  • gameRules: Optional
  • newWorld: boolean

说明:

TODO

public void setLevel(ClientLevel level) @ L2140

  • 方法名:setLevel
  • 源码定位:L2140
  • 返回类型:void
  • 修饰符:public

参数:

  • level: ClientLevel

说明:

TODO

public void disconnectFromWorld(Component message) @ L2145

  • 方法名:disconnectFromWorld
  • 源码定位:L2145
  • 返回类型:void
  • 修饰符:public

参数:

  • message: Component

说明:

TODO

public void disconnectWithSavingScreen() @ L2168

  • 方法名:disconnectWithSavingScreen
  • 源码定位:L2168
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void disconnectWithProgressScreen() @ L2172

  • 方法名:disconnectWithProgressScreen
  • 源码定位:L2172
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void disconnectWithProgressScreen(boolean stopSound) @ L2176

  • 方法名:disconnectWithProgressScreen
  • 源码定位:L2176
  • 返回类型:void
  • 修饰符:public

参数:

  • stopSound: boolean

说明:

TODO

public void disconnect(Screen screen, boolean keepResourcePacks) @ L2180

  • 方法名:disconnect
  • 源码定位:L2180
  • 返回类型:void
  • 修饰符:public

参数:

  • screen: Screen
  • keepResourcePacks: boolean

说明:

TODO

public void disconnect(Screen screen, boolean keepResourcePacks, boolean stopSound) @ L2184

  • 方法名:disconnect
  • 源码定位:L2184
  • 返回类型:void
  • 修饰符:public

参数:

  • screen: Screen
  • keepResourcePacks: boolean
  • stopSound: boolean

说明:

TODO

public void clearDownloadedResourcePacks() @ L2234

  • 方法名:clearDownloadedResourcePacks
  • 源码定位:L2234
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public void clearClientLevel(Screen screen) @ L2239

  • 方法名:clearClientLevel
  • 源码定位:L2239
  • 返回类型:void
  • 修饰符:public

参数:

  • screen: Screen

说明:

TODO

public void setScreenAndShow(Screen screen) @ L2265

  • 方法名:setScreenAndShow
  • 源码定位:L2265
  • 返回类型:void
  • 修饰符:public

参数:

  • screen: Screen

说明:

TODO

private void updateLevelInEngines(ClientLevel level) @ L2272

  • 方法名:updateLevelInEngines
  • 源码定位:L2272
  • 返回类型:void
  • 修饰符:private

参数:

  • level: ClientLevel

说明:

TODO

private void updateLevelInEngines(ClientLevel level, boolean stopSound) @ L2276

  • 方法名:updateLevelInEngines
  • 源码定位:L2276
  • 返回类型:void
  • 修饰符:private

参数:

  • level: ClientLevel
  • stopSound: boolean

说明:

TODO

private UserProperties userProperties() @ L2289

  • 方法名:userProperties
  • 源码定位:L2289
  • 返回类型:UserProperties
  • 修饰符:private

参数:

说明:

TODO

public boolean telemetryOptInExtra() @ L2293

  • 方法名:telemetryOptInExtra
  • 源码定位:L2293
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean extraTelemetryAvailable() @ L2297

  • 方法名:extraTelemetryAvailable
  • 源码定位:L2297
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean allowsTelemetry() @ L2301

  • 方法名:allowsTelemetry
  • 源码定位:L2301
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean allowsMultiplayer() @ L2305

  • 方法名:allowsMultiplayer
  • 源码定位:L2305
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean allowsRealms() @ L2309

  • 方法名:allowsRealms
  • 源码定位:L2309
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public BanDetails multiplayerBan() @ L2313

  • 方法名:multiplayerBan
  • 源码定位:L2313
  • 返回类型:BanDetails
  • 修饰符:public

参数:

说明:

TODO

public boolean isNameBanned() @ L2317

  • 方法名:isNameBanned
  • 源码定位:L2317
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean isBlocked(UUID uuid) @ L2322

  • 方法名:isBlocked
  • 源码定位:L2322
  • 返回类型:boolean
  • 修饰符:public

参数:

  • uuid: UUID

说明:

TODO

private boolean isLocalOrUnknownPlayer(UUID uuid) @ L2326

  • 方法名:isLocalOrUnknownPlayer
  • 源码定位:L2326
  • 返回类型:boolean
  • 修饰符:private

参数:

  • uuid: UUID

说明:

TODO

public ChatAbilities computeChatAbilities() @ L2330

  • 方法名:computeChatAbilities
  • 源码定位:L2330
  • 返回类型:ChatAbilities
  • 修饰符:public

参数:

说明:

TODO

public final boolean isDemo() @ L2352

  • 方法名:isDemo
  • 源码定位:L2352
  • 返回类型:boolean
  • 修饰符:public final

参数:

说明:

TODO

public final boolean canSwitchGameMode() @ L2356

  • 方法名:canSwitchGameMode
  • 源码定位:L2356
  • 返回类型:boolean
  • 修饰符:public final

参数:

说明:

TODO

public ClientPacketListener getConnection() @ L2360

  • 方法名:getConnection
  • 源码定位:L2360
  • 返回类型:ClientPacketListener
  • 修饰符:public

参数:

说明:

TODO

public static boolean renderNames() @ L2364

  • 方法名:renderNames
  • 源码定位:L2364
  • 返回类型:boolean
  • 修饰符:public static

参数:

说明:

TODO

public static boolean useShaderTransparency() @ L2368

  • 方法名:useShaderTransparency
  • 源码定位:L2368
  • 返回类型:boolean
  • 修饰符:public static

参数:

说明:

TODO

private void pickBlockOrEntity() @ L2373

  • 方法名:pickBlockOrEntity
  • 源码定位:L2373
  • 返回类型:void
  • 修饰符:private

参数:

说明:

TODO

public CrashReport fillReport(CrashReport report) @ L2388

  • 方法名:fillReport
  • 源码定位:L2388
  • 返回类型:CrashReport
  • 修饰符:public

参数:

  • report: CrashReport

说明:

TODO

public static void fillReport(Minecraft minecraft, LanguageManager languageManager, String launchedVersion, Options options, CrashReport report) @ L2410

  • 方法名:fillReport
  • 源码定位:L2410
  • 返回类型:void
  • 修饰符:public static

参数:

  • minecraft: Minecraft
  • languageManager: LanguageManager
  • launchedVersion: String
  • options: Options
  • report: CrashReport

说明:

TODO

private static String formatSeconds(double timeInSeconds) @ L2417

  • 方法名:formatSeconds
  • 源码定位:L2417
  • 返回类型:String
  • 修饰符:private static

参数:

  • timeInSeconds: double

说明:

TODO

private void fillUptime(CrashReportCategory category) @ L2421

  • 方法名:fillUptime
  • 源码定位:L2421
  • 返回类型:void
  • 修饰符:private

参数:

  • category: CrashReportCategory

说明:

TODO

private static SystemReport fillSystemReport(SystemReport systemReport, Minecraft minecraft, LanguageManager languageManager, String launchedVersion, Options options) @ L2428

  • 方法名:fillSystemReport
  • 源码定位:L2428
  • 返回类型:SystemReport
  • 修饰符:private static

参数:

  • systemReport: SystemReport
  • minecraft: Minecraft
  • languageManager: LanguageManager
  • launchedVersion: String
  • options: Options

说明:

TODO

public static Minecraft getInstance() @ L2485

  • 方法名:getInstance
  • 源码定位:L2485
  • 返回类型:Minecraft
  • 修饰符:public static

参数:

说明:

TODO

public CompletableFuture<Void> delayTextureReload() @ L2489

  • 方法名:delayTextureReload
  • 源码定位:L2489
  • 返回类型:CompletableFuture
  • 修饰符:public

参数:

说明:

TODO

public void updateReportEnvironment(ReportEnvironment environment) @ L2493

  • 方法名:updateReportEnvironment
  • 源码定位:L2493
  • 返回类型:void
  • 修饰符:public

参数:

  • environment: ReportEnvironment

说明:

TODO

public ServerData getCurrentServer() @ L2499

  • 方法名:getCurrentServer
  • 源码定位:L2499
  • 返回类型:ServerData
  • 修饰符:public

参数:

说明:

TODO

public boolean isLocalServer() @ L2503

  • 方法名:isLocalServer
  • 源码定位:L2503
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean hasSingleplayerServer() @ L2507

  • 方法名:hasSingleplayerServer
  • 源码定位:L2507
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public IntegratedServer getSingleplayerServer() @ L2511

  • 方法名:getSingleplayerServer
  • 源码定位:L2511
  • 返回类型:IntegratedServer
  • 修饰符:public

参数:

说明:

TODO

public boolean isSingleplayer() @ L2515

  • 方法名:isSingleplayer
  • 源码定位:L2515
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public boolean isLocalPlayer(UUID profileId) @ L2520

  • 方法名:isLocalPlayer
  • 源码定位:L2520
  • 返回类型:boolean
  • 修饰符:public

参数:

  • profileId: UUID

说明:

TODO

public User getUser() @ L2524

  • 方法名:getUser
  • 源码定位:L2524
  • 返回类型:User
  • 修饰符:public

参数:

说明:

TODO

public GameProfile getGameProfile() @ L2528

  • 方法名:getGameProfile
  • 源码定位:L2528
  • 返回类型:GameProfile
  • 修饰符:public

参数:

说明:

TODO

public Proxy getProxy() @ L2533

  • 方法名:getProxy
  • 源码定位:L2533
  • 返回类型:Proxy
  • 修饰符:public

参数:

说明:

TODO

public TextureManager getTextureManager() @ L2537

  • 方法名:getTextureManager
  • 源码定位:L2537
  • 返回类型:TextureManager
  • 修饰符:public

参数:

说明:

TODO

public ShaderManager getShaderManager() @ L2541

  • 方法名:getShaderManager
  • 源码定位:L2541
  • 返回类型:ShaderManager
  • 修饰符:public

参数:

说明:

TODO

public ResourceManager getResourceManager() @ L2545

  • 方法名:getResourceManager
  • 源码定位:L2545
  • 返回类型:ResourceManager
  • 修饰符:public

参数:

说明:

TODO

public PackRepository getResourcePackRepository() @ L2549

  • 方法名:getResourcePackRepository
  • 源码定位:L2549
  • 返回类型:PackRepository
  • 修饰符:public

参数:

说明:

TODO

public VanillaPackResources getVanillaPackResources() @ L2553

  • 方法名:getVanillaPackResources
  • 源码定位:L2553
  • 返回类型:VanillaPackResources
  • 修饰符:public

参数:

说明:

TODO

public DownloadedPackSource getDownloadedPackSource() @ L2557

  • 方法名:getDownloadedPackSource
  • 源码定位:L2557
  • 返回类型:DownloadedPackSource
  • 修饰符:public

参数:

说明:

TODO

public Path getResourcePackDirectory() @ L2561

  • 方法名:getResourcePackDirectory
  • 源码定位:L2561
  • 返回类型:Path
  • 修饰符:public

参数:

说明:

TODO

public LanguageManager getLanguageManager() @ L2565

  • 方法名:getLanguageManager
  • 源码定位:L2565
  • 返回类型:LanguageManager
  • 修饰符:public

参数:

说明:

TODO

public boolean isPaused() @ L2569

  • 方法名:isPaused
  • 源码定位:L2569
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public GpuWarnlistManager getGpuWarnlistManager() @ L2573

  • 方法名:getGpuWarnlistManager
  • 源码定位:L2573
  • 返回类型:GpuWarnlistManager
  • 修饰符:public

参数:

说明:

TODO

public SoundManager getSoundManager() @ L2577

  • 方法名:getSoundManager
  • 源码定位:L2577
  • 返回类型:SoundManager
  • 修饰符:public

参数:

说明:

TODO

public Music getSituationalMusic() @ L2581

  • 方法名:getSituationalMusic
  • 源码定位:L2581
  • 返回类型:Music
  • 修饰符:public

参数:

说明:

TODO

public float getMusicVolume() @ L2603

  • 方法名:getMusicVolume
  • 源码定位:L2603
  • 返回类型:float
  • 修饰符:public

参数:

说明:

TODO

public Services services() @ L2612

  • 方法名:services
  • 源码定位:L2612
  • 返回类型:Services
  • 修饰符:public

参数:

说明:

TODO

public SkinManager getSkinManager() @ L2616

  • 方法名:getSkinManager
  • 源码定位:L2616
  • 返回类型:SkinManager
  • 修饰符:public

参数:

说明:

TODO

public Entity getCameraEntity() @ L2620

  • 方法名:getCameraEntity
  • 源码定位:L2620
  • 返回类型:Entity
  • 修饰符:public

参数:

说明:

TODO

public void setCameraEntity(Entity cameraEntity) @ L2624

  • 方法名:setCameraEntity
  • 源码定位:L2624
  • 返回类型:void
  • 修饰符:public

参数:

  • cameraEntity: Entity

说明:

TODO

public boolean shouldEntityAppearGlowing(Entity entity) @ L2629

  • 方法名:shouldEntityAppearGlowing
  • 源码定位:L2629
  • 返回类型:boolean
  • 修饰符:public

参数:

  • entity: Entity

说明:

TODO

protected Thread getRunningThread() @ L2634

  • 方法名:getRunningThread
  • 源码定位:L2634
  • 返回类型:Thread
  • 修饰符:protected

参数:

说明:

TODO

public Runnable wrapRunnable(Runnable runnable) @ L2639

  • 方法名:wrapRunnable
  • 源码定位:L2639
  • 返回类型:Runnable
  • 修饰符:public

参数:

  • runnable: Runnable

说明:

TODO

protected boolean shouldRun(Runnable task) @ L2644

  • 方法名:shouldRun
  • 源码定位:L2644
  • 返回类型:boolean
  • 修饰符:protected

参数:

  • task: Runnable

说明:

TODO

public EntityRenderDispatcher getEntityRenderDispatcher() @ L2649

  • 方法名:getEntityRenderDispatcher
  • 源码定位:L2649
  • 返回类型:EntityRenderDispatcher
  • 修饰符:public

参数:

说明:

TODO

public BlockEntityRenderDispatcher getBlockEntityRenderDispatcher() @ L2653

  • 方法名:getBlockEntityRenderDispatcher
  • 源码定位:L2653
  • 返回类型:BlockEntityRenderDispatcher
  • 修饰符:public

参数:

说明:

TODO

public MapRenderer getMapRenderer() @ L2657

  • 方法名:getMapRenderer
  • 源码定位:L2657
  • 返回类型:MapRenderer
  • 修饰符:public

参数:

说明:

TODO

public DataFixer getFixerUpper() @ L2661

  • 方法名:getFixerUpper
  • 源码定位:L2661
  • 返回类型:DataFixer
  • 修饰符:public

参数:

说明:

TODO

public DeltaTracker getDeltaTracker() @ L2665

  • 方法名:getDeltaTracker
  • 源码定位:L2665
  • 返回类型:DeltaTracker
  • 修饰符:public

参数:

说明:

TODO

public BlockColors getBlockColors() @ L2669

  • 方法名:getBlockColors
  • 源码定位:L2669
  • 返回类型:BlockColors
  • 修饰符:public

参数:

说明:

TODO

public boolean showOnlyReducedInfo() @ L2673

  • 方法名:showOnlyReducedInfo
  • 源码定位:L2673
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public ToastManager getToastManager() @ L2677

  • 方法名:getToastManager
  • 源码定位:L2677
  • 返回类型:ToastManager
  • 修饰符:public

参数:

说明:

TODO

public Tutorial getTutorial() @ L2681

  • 方法名:getTutorial
  • 源码定位:L2681
  • 返回类型:Tutorial
  • 修饰符:public

参数:

说明:

TODO

public boolean isWindowActive() @ L2685

  • 方法名:isWindowActive
  • 源码定位:L2685
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public HotbarManager getHotbarManager() @ L2689

  • 方法名:getHotbarManager
  • 源码定位:L2689
  • 返回类型:HotbarManager
  • 修饰符:public

参数:

说明:

TODO

public ModelManager getModelManager() @ L2693

  • 方法名:getModelManager
  • 源码定位:L2693
  • 返回类型:ModelManager
  • 修饰符:public

参数:

说明:

TODO

public AtlasManager getAtlasManager() @ L2697

  • 方法名:getAtlasManager
  • 源码定位:L2697
  • 返回类型:AtlasManager
  • 修饰符:public

参数:

说明:

TODO

public MapTextureManager getMapTextureManager() @ L2701

  • 方法名:getMapTextureManager
  • 源码定位:L2701
  • 返回类型:MapTextureManager
  • 修饰符:public

参数:

说明:

TODO

public WaypointStyleManager getWaypointStyles() @ L2705

  • 方法名:getWaypointStyles
  • 源码定位:L2705
  • 返回类型:WaypointStyleManager
  • 修饰符:public

参数:

说明:

TODO

public Component grabPanoramixScreenshot(File folder) @ L2709

  • 方法名:grabPanoramixScreenshot
  • 源码定位:L2709
  • 返回类型:Component
  • 修饰符:public

参数:

  • folder: File

说明:

TODO

public SplashManager getSplashManager() @ L2794

  • 方法名:getSplashManager
  • 源码定位:L2794
  • 返回类型:SplashManager
  • 修饰符:public

参数:

说明:

TODO

public Overlay getOverlay() @ L2798

  • 方法名:getOverlay
  • 源码定位:L2798
  • 返回类型:Overlay
  • 修饰符:public

参数:

说明:

TODO

public PlayerSocialManager getPlayerSocialManager() @ L2802

  • 方法名:getPlayerSocialManager
  • 源码定位:L2802
  • 返回类型:PlayerSocialManager
  • 修饰符:public

参数:

说明:

TODO

public Window getWindow() @ L2806

  • 方法名:getWindow
  • 源码定位:L2806
  • 返回类型:Window
  • 修饰符:public

参数:

说明:

TODO

public TextInputManager textInputManager() @ L2810

  • 方法名:textInputManager
  • 源码定位:L2810
  • 返回类型:TextInputManager
  • 修饰符:public

参数:

说明:

TODO

public void onTextInputFocusChange(GuiEventListener element, boolean isFocused) @ L2814

  • 方法名:onTextInputFocusChange
  • 源码定位:L2814
  • 返回类型:void
  • 修饰符:public

参数:

  • element: GuiEventListener
  • isFocused: boolean

说明:

TODO

public FramerateLimitTracker getFramerateLimitTracker() @ L2825

  • 方法名:getFramerateLimitTracker
  • 源码定位:L2825
  • 返回类型:FramerateLimitTracker
  • 修饰符:public

参数:

说明:

TODO

public DebugScreenOverlay getDebugOverlay() @ L2829

  • 方法名:getDebugOverlay
  • 源码定位:L2829
  • 返回类型:DebugScreenOverlay
  • 修饰符:public

参数:

说明:

TODO

public RenderBuffers renderBuffers() @ L2833

  • 方法名:renderBuffers
  • 源码定位:L2833
  • 返回类型:RenderBuffers
  • 修饰符:public

参数:

说明:

TODO

public void updateMaxMipLevel(int mipmapLevels) @ L2837

  • 方法名:updateMaxMipLevel
  • 源码定位:L2837
  • 返回类型:void
  • 修饰符:public

参数:

  • mipmapLevels: int

说明:

TODO

public EntityModelSet getEntityModels() @ L2841

  • 方法名:getEntityModels
  • 源码定位:L2841
  • 返回类型:EntityModelSet
  • 修饰符:public

参数:

说明:

TODO

public boolean isTextFilteringEnabled() @ L2845

  • 方法名:isTextFilteringEnabled
  • 源码定位:L2845
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public void prepareForMultiplayer() @ L2849

  • 方法名:prepareForMultiplayer
  • 源码定位:L2849
  • 返回类型:void
  • 修饰符:public

参数:

说明:

TODO

public InputType getLastInputType() @ L2854

  • 方法名:getLastInputType
  • 源码定位:L2854
  • 返回类型:InputType
  • 修饰符:public

参数:

说明:

TODO

public void setLastInputType(InputType lastInputType) @ L2858

  • 方法名:setLastInputType
  • 源码定位:L2858
  • 返回类型:void
  • 修饰符:public

参数:

  • lastInputType: InputType

说明:

TODO

public GameNarrator getNarrator() @ L2862

  • 方法名:getNarrator
  • 源码定位:L2862
  • 返回类型:GameNarrator
  • 修饰符:public

参数:

说明:

TODO

public ChatListener getChatListener() @ L2866

  • 方法名:getChatListener
  • 源码定位:L2866
  • 返回类型:ChatListener
  • 修饰符:public

参数:

说明:

TODO

public ReportingContext getReportingContext() @ L2870

  • 方法名:getReportingContext
  • 源码定位:L2870
  • 返回类型:ReportingContext
  • 修饰符:public

参数:

说明:

TODO

public RealmsDataFetcher realmsDataFetcher() @ L2874

  • 方法名:realmsDataFetcher
  • 源码定位:L2874
  • 返回类型:RealmsDataFetcher
  • 修饰符:public

参数:

说明:

TODO

public QuickPlayLog quickPlayLog() @ L2878

  • 方法名:quickPlayLog
  • 源码定位:L2878
  • 返回类型:QuickPlayLog
  • 修饰符:public

参数:

说明:

TODO

public CommandHistory commandHistory() @ L2882

  • 方法名:commandHistory
  • 源码定位:L2882
  • 返回类型:CommandHistory
  • 修饰符:public

参数:

说明:

TODO

public DirectoryValidator directoryValidator() @ L2886

  • 方法名:directoryValidator
  • 源码定位:L2886
  • 返回类型:DirectoryValidator
  • 修饰符:public

参数:

说明:

TODO

public PlayerSkinRenderCache playerSkinRenderCache() @ L2890

  • 方法名:playerSkinRenderCache
  • 源码定位:L2890
  • 返回类型:PlayerSkinRenderCache
  • 修饰符:public

参数:

说明:

TODO

private float getTickTargetMillis(float defaultTickTargetMillis) @ L2894

  • 方法名:getTickTargetMillis
  • 源码定位:L2894
  • 返回类型:float
  • 修饰符:private

参数:

  • defaultTickTargetMillis: float

说明:

TODO

public ItemModelResolver getItemModelResolver() @ L2905

  • 方法名:getItemModelResolver
  • 源码定位:L2905
  • 返回类型:ItemModelResolver
  • 修饰符:public

参数:

说明:

TODO

public boolean canInterruptScreen() @ L2909

  • 方法名:canInterruptScreen
  • 源码定位:L2909
  • 返回类型:boolean
  • 修饰符:public

参数:

说明:

TODO

public static String getLauncherBrand() @ L2913

  • 方法名:getLauncherBrand
  • 源码定位:L2913
  • 返回类型:String
  • 修饰符:public static

参数:

说明:

TODO

public PacketProcessor packetProcessor() @ L2917

  • 方法名:packetProcessor
  • 源码定位:L2917
  • 返回类型:PacketProcessor
  • 修饰符:public

参数:

说明:

TODO

public Gizmos.TemporaryCollection collectPerTickGizmos() @ L2921

  • 方法名:collectPerTickGizmos
  • 源码定位:L2921
  • 返回类型:Gizmos.TemporaryCollection
  • 修饰符:public

参数:

说明:

TODO

public Collection<SimpleGizmoCollector.GizmoInstance> getPerTickGizmos() @ L2925

  • 方法名:getPerTickGizmos
  • 源码定位:L2925
  • 返回类型:Collection<SimpleGizmoCollector.GizmoInstance>
  • 修饰符:public

参数:

说明:

TODO

private void pick(float partialTicks) @ L2929

  • 方法名:pick
  • 源码定位:L2929
  • 返回类型:void
  • 修饰符:private

参数:

  • partialTicks: float

说明:

TODO

代码

@OnlyIn(Dist.CLIENT)
public class Minecraft extends ReentrantBlockableEventLoop<Runnable> implements WindowEventHandler {
    private static Minecraft instance;
    private static final Logger LOGGER = LogUtils.getLogger();
    private static final int MAX_TICKS_PER_UPDATE = 10;
    public static final Identifier DEFAULT_FONT = Identifier.withDefaultNamespace("default");
    public static final Identifier UNIFORM_FONT = Identifier.withDefaultNamespace("uniform");
    public static final Identifier ALT_FONT = Identifier.withDefaultNamespace("alt");
    private static final Identifier REGIONAL_COMPLIANCIES = Identifier.withDefaultNamespace("regional_compliancies.json");
    private static final CompletableFuture<Unit> RESOURCE_RELOAD_INITIAL_TASK = CompletableFuture.completedFuture(Unit.INSTANCE);
    private static final Component SOCIAL_INTERACTIONS_NOT_AVAILABLE = Component.translatable("multiplayer.socialInteractions.not_available");
    private static final Component SAVING_LEVEL = Component.translatable("menu.savingLevel");
    public static final String UPDATE_DRIVERS_ADVICE = "Please make sure you have up-to-date drivers (see aka.ms/mcdriver for instructions).";
    private final long canary = Double.doubleToLongBits(Math.PI);
    private final Path resourcePackDirectory;
    private final CompletableFuture<@Nullable ProfileResult> profileFuture;
    private final TextureManager textureManager;
    private final ShaderManager shaderManager;
    private final DataFixer fixerUpper;
    private final Window window;
    private final TextInputManager textInputManager;
    private final DeltaTracker.Timer deltaTracker = new DeltaTracker.Timer(20.0F, 0L, this::getTickTargetMillis);
    private final RenderBuffers renderBuffers;
    public final LevelRenderer levelRenderer;
    private final EntityRenderDispatcher entityRenderDispatcher;
    private final BlockModelResolver blockModelResolver;
    private final ItemModelResolver itemModelResolver;
    private final MapRenderer mapRenderer;
    public final ParticleEngine particleEngine;
    private final ParticleResources particleResources;
    private final User user;
    public final Font font;
    public final Font fontFilterFishy;
    public final GameRenderer gameRenderer;
    public final Gui gui;
    public final Options options;
    public final DebugScreenEntryList debugEntries;
    private final HotbarManager hotbarManager;
    public final MouseHandler mouseHandler;
    public final KeyboardHandler keyboardHandler;
    private InputType lastInputType = InputType.NONE;
    public final File gameDirectory;
    private final String launchedVersion;
    private final String versionType;
    private final Proxy proxy;
    private final boolean offlineDeveloperMode;
    private final LevelStorageSource levelSource;
    private final boolean demo;
    private final boolean allowsMultiplayer;
    private final boolean allowsChat;
    private final ReloadableResourceManager resourceManager;
    private final VanillaPackResources vanillaPackResources;
    private final DownloadedPackSource downloadedPackSource;
    private final PackRepository resourcePackRepository;
    private final LanguageManager languageManager;
    private final BlockColors blockColors;
    private final RenderTarget mainRenderTarget;
    private final @Nullable TracyFrameCapture tracyFrameCapture;
    private final SoundManager soundManager;
    private final MusicManager musicManager;
    private final FontManager fontManager;
    private final SplashManager splashManager;
    private final GpuWarnlistManager gpuWarnlistManager;
    private final PeriodicNotificationManager regionalCompliancies = new PeriodicNotificationManager(REGIONAL_COMPLIANCIES, Minecraft::countryEqualsISO3);
    private final UserApiService userApiService;
    private final CompletableFuture<UserProperties> userPropertiesFuture;
    private final SkinManager skinManager;
    private final AtlasManager atlasManager;
    private final ModelManager modelManager;
    private final MapTextureManager mapTextureManager;
    private final WaypointStyleManager waypointStyles;
    private final ToastManager toastManager;
    private final Tutorial tutorial;
    private final PlayerSocialManager playerSocialManager;
    private final BlockEntityRenderDispatcher blockEntityRenderDispatcher;
    private final ClientTelemetryManager telemetryManager;
    private final ProfileKeyPairManager profileKeyPairManager;
    private final RealmsDataFetcher realmsDataFetcher;
    private final QuickPlayLog quickPlayLog;
    private final Services services;
    private final PlayerSkinRenderCache playerSkinRenderCache;
    public @Nullable MultiPlayerGameMode gameMode;
    public @Nullable ClientLevel level;
    public @Nullable LocalPlayer player;
    private @Nullable IntegratedServer singleplayerServer;
    private @Nullable Connection pendingConnection;
    private boolean isLocalServer;
    public @Nullable Entity crosshairPickEntity;
    public @Nullable HitResult hitResult;
    private int rightClickDelay;
    protected int missTime;
    private volatile boolean pause;
    private long lastNanoTime = Util.getNanos();
    private long lastTime;
    private int frames;
    public @Nullable Screen screen;
    private @Nullable Overlay overlay;
    private boolean clientLevelTeardownInProgress;
    private Thread gameThread;
    private volatile boolean running;
    private static int fps;
    private long frameTimeNs;
    private final FramerateLimitTracker framerateLimitTracker;
    public boolean wireframe;
    public boolean smartCull = true;
    private long lastActiveTime = Util.getMillis();
    private @Nullable CompletableFuture<Void> pendingReload;
    private @Nullable TutorialToast socialInteractionsToast;
    private int fpsPieRenderTicks;
    private final ContinuousProfiler fpsPieProfiler;
    private MetricsRecorder metricsRecorder = InactiveMetricsRecorder.INSTANCE;
    private final ResourceLoadStateTracker reloadStateTracker = new ResourceLoadStateTracker();
    private long savedCpuDuration;
    private double gpuUtilization;
    private TimerQuery.@Nullable FrameProfile currentFrameProfile;
    private final GameNarrator narrator;
    private final ChatListener chatListener;
    private ReportingContext reportingContext;
    private final CommandHistory commandHistory;
    private final DirectoryValidator directoryValidator;
    private boolean gameLoadFinished;
    private final long clientStartTimeMs;
    private long clientTickCount;
    private final PacketProcessor packetProcessor;
    private final SimpleGizmoCollector perTickGizmos = new SimpleGizmoCollector();
    private List<SimpleGizmoCollector.GizmoInstance> drainedLatestTickGizmos = new ArrayList<>();
 
    public Minecraft(GameConfig gameConfig) {
        super("Client", true);
        instance = this;
        this.clientStartTimeMs = System.currentTimeMillis();
        this.gameDirectory = gameConfig.location.gameDirectory;
        File assetsDirectory = gameConfig.location.assetDirectory;
        this.resourcePackDirectory = gameConfig.location.resourcePackDirectory.toPath();
        this.launchedVersion = gameConfig.game.launchVersion;
        this.versionType = gameConfig.game.versionType;
        Path gameDirPath = this.gameDirectory.toPath();
        this.directoryValidator = LevelStorageSource.parseValidator(gameDirPath.resolve("allowed_symlinks.txt"));
        ClientPackSource clientPackSource = new ClientPackSource(gameConfig.location.getExternalAssetSource(), this.directoryValidator);
        this.downloadedPackSource = new DownloadedPackSource(this, gameDirPath.resolve("downloads"), gameConfig.user);
        RepositorySource directoryPacks = new FolderRepositorySource(
            this.resourcePackDirectory, PackType.CLIENT_RESOURCES, PackSource.DEFAULT, this.directoryValidator
        );
        this.resourcePackRepository = new PackRepository(clientPackSource, this.downloadedPackSource.createRepositorySource(), directoryPacks);
        this.vanillaPackResources = clientPackSource.getVanillaPack();
        this.proxy = gameConfig.user.proxy;
        this.offlineDeveloperMode = gameConfig.game.offlineDeveloperMode;
        YggdrasilAuthenticationService authenticationService = this.offlineDeveloperMode
            ? YggdrasilAuthenticationService.createOffline(this.proxy)
            : new YggdrasilAuthenticationService(this.proxy);
        this.services = Services.create(authenticationService, this.gameDirectory);
        this.user = gameConfig.user.user;
        this.profileFuture = this.offlineDeveloperMode
            ? CompletableFuture.completedFuture(null)
            : CompletableFuture.supplyAsync(() -> this.services.sessionService().fetchProfile(this.user.getProfileId(), true), Util.nonCriticalIoPool());
        this.userApiService = this.createUserApiService(authenticationService, gameConfig);
        this.userPropertiesFuture = CompletableFuture.supplyAsync(() -> {
            try {
                return this.userApiService.fetchProperties();
            } catch (AuthenticationException var2x) {
                LOGGER.error("Failed to fetch user properties", (Throwable)var2x);
                return UserApiService.OFFLINE_PROPERTIES;
            }
        }, Util.nonCriticalIoPool());
        LOGGER.info("Setting user: {}", this.user.getName());
        LOGGER.debug("(Session ID is {})", this.user.getSessionId());
        this.demo = gameConfig.game.demo;
        this.allowsMultiplayer = !gameConfig.game.disableMultiplayer;
        this.allowsChat = !gameConfig.game.disableChat;
        this.singleplayerServer = null;
        KeybindResolver.setKeyResolver(KeyMapping::createNameSupplier);
        this.fixerUpper = DataFixers.getDataFixer();
        this.gameThread = Thread.currentThread();
        this.options = new Options(this, this.gameDirectory);
        this.debugEntries = new DebugScreenEntryList(this.gameDirectory, this.fixerUpper);
        this.toastManager = new ToastManager(this, this.options);
        boolean lastStartWasClean = this.options.startedCleanly;
        this.options.startedCleanly = false;
        this.options.save();
        this.running = true;
        this.tutorial = new Tutorial(this, this.options);
        this.hotbarManager = new HotbarManager(gameDirPath, this.fixerUpper);
        LOGGER.info("Backend library: {}", RenderSystem.getBackendDescription());
        DisplayData displayData = gameConfig.display;
        if (this.options.overrideHeight > 0 && this.options.overrideWidth > 0) {
            displayData = gameConfig.display.withSize(this.options.overrideWidth, this.options.overrideHeight);
        }
 
        if (!lastStartWasClean) {
            displayData = displayData.withFullscreen(false);
            this.options.fullscreenVideoModeString = null;
            LOGGER.warn("Detected unexpected shutdown during last game startup: resetting fullscreen mode");
        }
 
        Util.timeSource = RenderSystem.initBackendSystem(new BackendOptions(this.options.exclusiveFullscreen().get()));
        GpuBackend[] backends = new GpuBackend[]{new GlBackend()};
        StringBuilder errorMsgBuilder = new StringBuilder("No supported graphics backend was found.");
        Window windowCandidate = null;
        GpuDevice device = null;
 
        for (GpuBackend backend : backends) {
            try {
                windowCandidate = new Window(this, displayData, this.options.fullscreenVideoModeString, this.createTitle(), backend);
                device = windowCandidate.backend()
                    .createDevice(
                        windowCandidate.handle(),
                        (id, type) -> this.getShaderManager().getShader(id, type),
                        new GpuDebugOptions(this.options.glDebugVerbosity, SharedConstants.DEBUG_SYNCHRONOUS_GL_LOGS, gameConfig.game.renderDebugLabels)
                    );
                RenderSystem.initRenderer(device);
                break;
            } catch (BackendCreationException var24) {
                LOGGER.error("Failed to create backend {}", backend.getName(), var24);
                errorMsgBuilder.append("\n\n- Tried ").append(backend.getName()).append(": \n  ").append(var24.getMessage());
                if (windowCandidate != null) {
                    windowCandidate.close();
                    windowCandidate = null;
                }
            }
        }
 
        if (windowCandidate == null) {
            String errorMsg = errorMsgBuilder.toString();
            MessageBox.error(errorMsg);
            throw new Window.WindowInitFailed(errorMsg);
        } else {
            this.window = windowCandidate;
            this.textInputManager = new TextInputManager(this.window);
            this.window.setWindowCloseCallback(new Runnable() {
                private boolean threadStarted;
 
                {
                    Objects.requireNonNull(Minecraft.this);
                }
 
                @Override
                public void run() {
                    if (!this.threadStarted) {
                        this.threadStarted = true;
                        ClientShutdownWatchdog.startShutdownWatchdog(Minecraft.this, gameConfig.location.gameDirectory, Minecraft.this.gameThread.threadId());
                    }
                }
            });
            GameLoadTimesEvent.INSTANCE.endStep(TelemetryProperty.LOAD_TIME_PRE_WINDOW_MS);
 
            try {
                this.window.setIcon(this.vanillaPackResources, SharedConstants.getCurrentVersion().stable() ? IconSet.RELEASE : IconSet.SNAPSHOT);
            } catch (IOException var23) {
                LOGGER.error("Couldn't set icon", (Throwable)var23);
            }
 
            this.mouseHandler = new MouseHandler(this);
            this.mouseHandler.setup(this.window);
            this.keyboardHandler = new KeyboardHandler(this);
            this.keyboardHandler.setup(this.window);
            this.options.applyGraphicsPreset(this.options.graphicsPreset().get());
            LOGGER.info("Using optional rendering extensions: {}", String.join(", ", RenderSystem.getDevice().getEnabledExtensions()));
            this.mainRenderTarget = new MainTarget(this.window.getWidth(), this.window.getHeight());
            this.resourceManager = new ReloadableResourceManager(PackType.CLIENT_RESOURCES);
            this.resourcePackRepository.reload();
            this.options.loadSelectedResourcePacks(this.resourcePackRepository);
            this.languageManager = new LanguageManager(this.options.languageCode, languageData -> {
                if (this.player != null) {
                    this.player.connection.updateSearchTrees();
                }
            });
            this.resourceManager.registerReloadListener(this.languageManager);
            this.textureManager = new TextureManager(this.resourceManager);
            this.resourceManager.registerReloadListener(this.textureManager);
            this.shaderManager = new ShaderManager(this.textureManager, this::triggerResourcePackRecovery);
            this.resourceManager.registerReloadListener(this.shaderManager);
            SkinTextureDownloader skinTextureDownloader = new SkinTextureDownloader(this.proxy, this.textureManager, this);
            this.skinManager = new SkinManager(assetsDirectory.toPath().resolve("skins"), this.services, skinTextureDownloader, this);
            this.levelSource = new LevelStorageSource(gameDirPath.resolve("saves"), gameDirPath.resolve("backups"), this.directoryValidator, this.fixerUpper);
            this.commandHistory = new CommandHistory(gameDirPath);
            this.musicManager = new MusicManager(this);
            this.soundManager = new SoundManager(this.options);
            this.resourceManager.registerReloadListener(this.soundManager);
            this.splashManager = new SplashManager(this.user);
            this.resourceManager.registerReloadListener(this.splashManager);
            this.atlasManager = new AtlasManager(this.textureManager, this.options.mipmapLevels().get());
            this.resourceManager.registerReloadListener(this.atlasManager);
            ProfileResolver localProfileResolver = new LocalPlayerResolver(this, this.services.profileResolver());
            this.playerSkinRenderCache = new PlayerSkinRenderCache(this.textureManager, this.skinManager, localProfileResolver);
            ClientMannequin.registerOverrides(this.playerSkinRenderCache);
            this.fontManager = new FontManager(this.textureManager, this.atlasManager, this.playerSkinRenderCache);
            this.font = this.fontManager.createFont();
            this.fontFilterFishy = this.fontManager.createFontFilterFishy();
            this.resourceManager.registerReloadListener(this.fontManager);
            this.updateFontOptions();
            this.resourceManager.registerReloadListener(new GrassColorReloadListener());
            this.resourceManager.registerReloadListener(new FoliageColorReloadListener());
            this.resourceManager.registerReloadListener(new DryFoliageColorReloadListener());
            this.window.setErrorSection("Startup");
            RenderSystem.setupDefaultState();
            this.window.setErrorSection("Post startup");
            this.blockColors = BlockColors.createDefault();
            this.modelManager = new ModelManager(this.blockColors, this.atlasManager, this.playerSkinRenderCache);
            this.resourceManager.registerReloadListener(this.modelManager);
            EquipmentAssetManager equipmentAssets = new EquipmentAssetManager();
            this.resourceManager.registerReloadListener(equipmentAssets);
            this.blockModelResolver = new BlockModelResolver(this.modelManager);
            this.itemModelResolver = new ItemModelResolver(this.modelManager);
            this.mapTextureManager = new MapTextureManager(this.textureManager);
            this.mapRenderer = new MapRenderer(this.atlasManager, this.mapTextureManager);
 
            try {
                int maxSectionBuilders = Runtime.getRuntime().availableProcessors();
                Tesselator.init();
                this.renderBuffers = new RenderBuffers(maxSectionBuilders);
            } catch (OutOfMemoryError var22) {
                MessageBox.error(
                    "Oh no! The game was unable to allocate memory off-heap while trying to start. You may try to free some memory by closing other applications on your computer, check that your system meets the minimum requirements, and try again. If the problem persists, please visit: "
                        + CommonLinks.GENERAL_HELP
                );
                throw new SilentInitException("Unable to allocate render buffers", var22);
            }
 
            this.playerSocialManager = new PlayerSocialManager(this, this.userApiService);
            this.entityRenderDispatcher = new EntityRenderDispatcher(
                this,
                this.textureManager,
                this.blockModelResolver,
                this.itemModelResolver,
                this.mapRenderer,
                this.atlasManager,
                this.font,
                this.options,
                this.modelManager.entityModels(),
                equipmentAssets,
                this.playerSkinRenderCache
            );
            this.resourceManager.registerReloadListener(this.entityRenderDispatcher);
            this.blockEntityRenderDispatcher = new BlockEntityRenderDispatcher(
                this.font,
                this.modelManager.entityModels(),
                this.blockModelResolver,
                this.itemModelResolver,
                this.entityRenderDispatcher,
                this.atlasManager,
                this.playerSkinRenderCache
            );
            this.resourceManager.registerReloadListener(this.blockEntityRenderDispatcher);
            this.particleResources = new ParticleResources();
            this.resourceManager.registerReloadListener(this.particleResources);
            this.particleEngine = new ParticleEngine(this.level, this.particleResources);
            this.particleResources.onReload(this.particleEngine::clearParticles);
            this.waypointStyles = new WaypointStyleManager();
            this.resourceManager.registerReloadListener(this.waypointStyles);
            this.gameRenderer = new GameRenderer(this, this.entityRenderDispatcher.getItemInHandRenderer(), this.renderBuffers, this.modelManager);
            WindowRenderState windowRenderState = this.gameRenderer.getGameRenderState().windowRenderState;
            windowRenderState.width = this.window.getWidth();
            windowRenderState.height = this.window.getHeight();
            this.levelRenderer = new LevelRenderer(
                this,
                this.entityRenderDispatcher,
                this.blockEntityRenderDispatcher,
                this.renderBuffers,
                this.gameRenderer.getGameRenderState(),
                this.gameRenderer.getFeatureRenderDispatcher()
            );
            this.resourceManager.registerReloadListener(this.levelRenderer);
            this.resourceManager.registerReloadListener(this.levelRenderer.getCloudRenderer());
            this.gpuWarnlistManager = new GpuWarnlistManager();
            this.resourceManager.registerReloadListener(this.gpuWarnlistManager);
            this.resourceManager.registerReloadListener(this.regionalCompliancies);
            this.gui = new Gui(this);
            RealmsClient realmsClient = RealmsClient.getOrCreate(this);
            this.realmsDataFetcher = new RealmsDataFetcher(realmsClient);
            RenderSystem.setErrorCallback(this::onFullscreenError);
            if (this.mainRenderTarget.width != this.window.getWidth() || this.mainRenderTarget.height != this.window.getHeight()) {
                StringBuilder message = new StringBuilder(
                    "Recovering from unsupported resolution ("
                        + this.window.getWidth()
                        + "x"
                        + this.window.getHeight()
                        + ").\nPlease make sure you have up-to-date drivers (see aka.ms/mcdriver for instructions)."
                );
 
                try {
                    List<String> messages = device.getLastDebugMessages();
                    if (!messages.isEmpty()) {
                        message.append("\n\nReported GL debug messages:\n").append(String.join("\n", messages));
                    }
                } catch (Throwable var21) {
                }
 
                this.window.setWindowed(this.mainRenderTarget.width, this.mainRenderTarget.height);
                MessageBox.error(message.toString());
            } else if (this.options.fullscreen().get() && !this.window.isFullscreen()) {
                if (lastStartWasClean) {
                    this.window.toggleFullScreen();
                    this.options.fullscreen().set(this.window.isFullscreen());
                } else {
                    this.options.fullscreen().set(false);
                }
            }
 
            this.window.updateVsync(this.options.enableVsync().get());
            this.window.updateRawMouseInput(this.options.rawMouseInput().get());
            this.window.setAllowCursorChanges(this.options.allowCursorChanges().get());
            this.window.setDefaultErrorCallback();
            this.resizeGui();
            this.gameRenderer.preloadUiShader(this.vanillaPackResources.asProvider());
            this.telemetryManager = new ClientTelemetryManager(this, this.userApiService, this.user);
            this.profileKeyPairManager = this.offlineDeveloperMode
                ? ProfileKeyPairManager.EMPTY_KEY_MANAGER
                : ProfileKeyPairManager.create(this.userApiService, this.user, gameDirPath);
            this.narrator = new GameNarrator(this);
            this.narrator.checkStatus(this.options.narrator().get() != NarratorStatus.OFF);
            this.chatListener = new ChatListener(this);
            this.chatListener.setMessageDelay(this.options.chatDelay().get());
            this.reportingContext = ReportingContext.create(ReportEnvironment.local(), this.userApiService);
            TitleScreen.registerTextures(this.textureManager);
            LoadingOverlay.registerTextures(this.textureManager);
            this.gameRenderer.registerPanoramaTextures(this.textureManager);
            this.setScreen(new GenericMessageScreen(Component.translatable("gui.loadingMinecraft")));
            List<PackResources> packs = this.resourcePackRepository.openAllSelected();
            this.reloadStateTracker.startReload(ResourceLoadStateTracker.ReloadReason.INITIAL, packs);
            ReloadInstance reloadInstance = this.resourceManager
                .createReload(Util.backgroundExecutor().forName("resourceLoad"), this, RESOURCE_RELOAD_INITIAL_TASK, packs);
            GameLoadTimesEvent.INSTANCE.beginStep(TelemetryProperty.LOAD_TIME_LOADING_OVERLAY_MS);
            Minecraft.GameLoadCookie loadCookie = new Minecraft.GameLoadCookie(realmsClient, gameConfig.quickPlay);
            this.setOverlay(new LoadingOverlay(this, reloadInstance, maybeT -> Util.ifElse(maybeT, t -> this.rollbackResourcePacks(t, loadCookie), () -> {
                if (SharedConstants.IS_RUNNING_IN_IDE) {
                    this.selfTest();
                }
 
                this.reloadStateTracker.finishReload();
                this.onResourceLoadFinished(loadCookie);
            }), false));
            this.quickPlayLog = QuickPlayLog.of(gameConfig.quickPlay.logPath());
            this.framerateLimitTracker = new FramerateLimitTracker(this.options, this);
            this.fpsPieProfiler = new ContinuousProfiler(Util.timeSource, () -> this.fpsPieRenderTicks, this.framerateLimitTracker::isHeavilyThrottled);
            if (TracyClient.isAvailable() && gameConfig.game.captureTracyImages) {
                this.tracyFrameCapture = new TracyFrameCapture();
            } else {
                this.tracyFrameCapture = null;
            }
 
            this.packetProcessor = new PacketProcessor(this.gameThread);
        }
    }
 
    public boolean hasShiftDown() {
        Window window = this.getWindow();
        return InputConstants.isKeyDown(window, 340) || InputConstants.isKeyDown(window, 344);
    }
 
    public boolean hasControlDown() {
        Window window = this.getWindow();
        return InputConstants.isKeyDown(window, 341) || InputConstants.isKeyDown(window, 345);
    }
 
    public boolean hasAltDown() {
        Window window = this.getWindow();
        return InputConstants.isKeyDown(window, 342) || InputConstants.isKeyDown(window, 346);
    }
 
    private void onResourceLoadFinished(Minecraft.@Nullable GameLoadCookie loadCookie) {
        if (!this.gameLoadFinished) {
            this.gameLoadFinished = true;
            this.onGameLoadFinished(loadCookie);
        }
    }
 
    private void onGameLoadFinished(Minecraft.@Nullable GameLoadCookie cookie) {
        Runnable showScreen = this.buildInitialScreens(cookie);
        GameLoadTimesEvent.INSTANCE.endStep(TelemetryProperty.LOAD_TIME_LOADING_OVERLAY_MS);
        GameLoadTimesEvent.INSTANCE.endStep(TelemetryProperty.LOAD_TIME_TOTAL_TIME_MS);
        GameLoadTimesEvent.INSTANCE.send(this.telemetryManager.getOutsideSessionSender());
        showScreen.run();
        this.options.startedCleanly = true;
        this.options.save();
    }
 
    public boolean isGameLoadFinished() {
        return this.gameLoadFinished;
    }
 
    private Runnable buildInitialScreens(Minecraft.@Nullable GameLoadCookie cookie) {
        List<Function<Runnable, Screen>> screens = new ArrayList<>();
        boolean onboardingScreenAdded = this.addInitialScreens(screens);
        Runnable nextStep = () -> {
            if (cookie != null && cookie.quickPlayData.isEnabled()) {
                QuickPlay.connect(this, cookie.quickPlayData.variant(), cookie.realmsClient());
            } else {
                this.setScreen(new TitleScreen(true, new LogoRenderer(onboardingScreenAdded)));
            }
        };
 
        for (Function<Runnable, Screen> function : Lists.reverse(screens)) {
            Screen screen = function.apply(nextStep);
            nextStep = () -> this.setScreen(screen);
        }
 
        return nextStep;
    }
 
    private boolean addInitialScreens(List<Function<Runnable, Screen>> screens) {
        boolean onboardingScreenAdded = false;
        if (this.options.onboardAccessibility || SharedConstants.DEBUG_FORCE_ONBOARDING_SCREEN) {
            screens.add(next -> new AccessibilityOnboardingScreen(this.options, next));
            onboardingScreenAdded = true;
        }
 
        BanDetails multiplayerBan = this.multiplayerBan();
        if (multiplayerBan != null) {
            screens.add(next -> BanNoticeScreens.create(result -> {
                if (result) {
                    Util.getPlatform().openUri(CommonLinks.SUSPENSION_HELP);
                }
 
                next.run();
            }, multiplayerBan));
        }
 
        ProfileResult profileResult = this.profileFuture.join();
        if (profileResult != null) {
            GameProfile profile = profileResult.profile();
            Set<ProfileActionType> actions = profileResult.actions();
            if (actions.contains(ProfileActionType.FORCED_NAME_CHANGE)) {
                screens.add(onClose -> BanNoticeScreens.createNameBan(profile.name(), onClose));
            }
 
            if (actions.contains(ProfileActionType.USING_BANNED_SKIN)) {
                screens.add(BanNoticeScreens::createSkinBan);
            }
        }
 
        return onboardingScreenAdded;
    }
 
    private static boolean countryEqualsISO3(Object iso3Locale) {
        try {
            return Locale.getDefault().getISO3Country().equals(iso3Locale);
        } catch (MissingResourceException var2) {
            return false;
        }
    }
 
    public void updateTitle() {
        this.window.setTitle(this.createTitle());
    }
 
    private String createTitle() {
        StringBuilder builder = new StringBuilder("Minecraft");
        if (checkModStatus().shouldReportAsModified()) {
            builder.append("*");
        }
 
        builder.append(" ");
        builder.append(SharedConstants.getCurrentVersion().name());
        ClientPacketListener connection = this.getConnection();
        if (connection != null && connection.getConnection().isConnected()) {
            builder.append(" - ");
            ServerData server = this.getCurrentServer();
            if (this.singleplayerServer != null && !this.singleplayerServer.isPublished()) {
                builder.append(I18n.get("title.singleplayer"));
            } else if (server != null && server.isRealm()) {
                builder.append(I18n.get("title.multiplayer.realms"));
            } else if (this.singleplayerServer == null && (server == null || !server.isLan())) {
                builder.append(I18n.get("title.multiplayer.other"));
            } else {
                builder.append(I18n.get("title.multiplayer.lan"));
            }
        }
 
        return builder.toString();
    }
 
    private UserApiService createUserApiService(YggdrasilAuthenticationService authService, GameConfig config) {
        return config.game.offlineDeveloperMode ? UserApiService.OFFLINE : authService.createUserApiService(config.user.user.getAccessToken());
    }
 
    public boolean isOfflineDeveloperMode() {
        return this.offlineDeveloperMode;
    }
 
    public static ModCheck checkModStatus() {
        return ModCheck.identify("vanilla", ClientBrandRetriever::getClientModName, "Client", Minecraft.class);
    }
 
    private void rollbackResourcePacks(Throwable t, Minecraft.@Nullable GameLoadCookie loadCookie) {
        if (this.resourcePackRepository.getSelectedIds().size() > 1) {
            this.clearResourcePacksOnError(t, null, loadCookie);
        } else {
            Util.throwAsRuntime(t);
        }
    }
 
    public void clearResourcePacksOnError(Throwable t, @Nullable Component message, Minecraft.@Nullable GameLoadCookie loadCookie) {
        LOGGER.info("Caught error loading resourcepacks, removing all selected resourcepacks", t);
        this.reloadStateTracker.startRecovery(t);
        this.downloadedPackSource.onRecovery();
        this.resourcePackRepository.setSelected(Collections.emptyList());
        this.options.resourcePacks.clear();
        this.options.incompatibleResourcePacks.clear();
        this.options.save();
        this.reloadResourcePacks(true, loadCookie).thenRunAsync(() -> this.addResourcePackLoadFailToast(message), this);
    }
 
    private void abortResourcePackRecovery() {
        this.setOverlay(null);
        if (this.level != null) {
            this.level.disconnect(ClientLevel.DEFAULT_QUIT_MESSAGE);
            this.disconnectWithProgressScreen();
        }
 
        this.setScreen(new TitleScreen());
        this.addResourcePackLoadFailToast(null);
    }
 
    private void addResourcePackLoadFailToast(@Nullable Component message) {
        ToastManager toastManager = this.getToastManager();
        SystemToast.addOrUpdate(toastManager, SystemToast.SystemToastId.PACK_LOAD_FAILURE, Component.translatable("resourcePack.load_fail"), message);
    }
 
    public void triggerResourcePackRecovery(Exception exception) {
        if (!this.resourcePackRepository.isAbleToClearAnyPack()) {
            if (this.resourcePackRepository.getSelectedIds().size() <= 1) {
                LOGGER.error(LogUtils.FATAL_MARKER, exception.getMessage(), (Throwable)exception);
                this.emergencySaveAndCrash(new CrashReport(exception.getMessage(), exception));
            } else {
                this.schedule(this::abortResourcePackRecovery);
            }
        } else {
            this.clearResourcePacksOnError(exception, Component.translatable("resourcePack.runtime_failure"), null);
        }
    }
 
    public void run() {
        this.gameThread = Thread.currentThread();
        if (Runtime.getRuntime().availableProcessors() > 4) {
            this.gameThread.setPriority(10);
        }
 
        DiscontinuousFrame tickFrame = TracyClient.createDiscontinuousFrame("Client Tick");
 
        try {
            boolean oomRecovery = false;
 
            while (this.running) {
                try {
                    SingleTickProfiler tickProfiler = SingleTickProfiler.createTickProfiler("Renderer");
                    boolean shouldCollectFrameProfile = this.getDebugOverlay().showProfilerChart();
 
                    try (Profiler.Scope ignored = Profiler.use(this.constructProfiler(shouldCollectFrameProfile, tickProfiler))) {
                        this.metricsRecorder.startTick();
                        tickFrame.start();
                        this.window.resetIsResized();
                        RenderSystem.pollEvents();
                        this.runTick(!oomRecovery);
                        tickFrame.end();
                        this.metricsRecorder.endTick();
                    }
 
                    this.finishProfilers(shouldCollectFrameProfile, tickProfiler);
                } catch (OutOfMemoryError var10) {
                    if (oomRecovery) {
                        throw var10;
                    }
 
                    this.emergencySave();
                    this.setScreen(new OutOfMemoryScreen());
                    System.gc();
                    LOGGER.error(LogUtils.FATAL_MARKER, "Out of memory", (Throwable)var10);
                    oomRecovery = true;
                }
            }
        } catch (ReportedException var11) {
            LOGGER.error(LogUtils.FATAL_MARKER, "Reported exception thrown!", (Throwable)var11);
            this.emergencySaveAndCrash(var11.getReport());
        } catch (Throwable var12) {
            LOGGER.error(LogUtils.FATAL_MARKER, "Unreported exception thrown!", var12);
            this.emergencySaveAndCrash(new CrashReport("Unexpected error", var12));
        }
    }
 
    void updateFontOptions() {
        this.fontManager.updateOptions(this.options);
    }
 
    private void onFullscreenError(int error, long description) {
        this.options.enableVsync().set(false);
        this.options.save();
    }
 
    public RenderTarget getMainRenderTarget() {
        return this.mainRenderTarget;
    }
 
    public String getLaunchedVersion() {
        return this.launchedVersion;
    }
 
    public String getVersionType() {
        return this.versionType;
    }
 
    @Override
    public void delayCrash(CrashReport crash) {
        super.delayCrash(this.fillReport(crash));
    }
 
    public void emergencySaveAndCrash(CrashReport partialReport) {
        MemoryReserve.release();
        CrashReport finalReport = this.fillReport(partialReport);
        int exitCode = saveReportAndShutdownSoundManager(this, this.gameDirectory, finalReport);
        this.emergencySave();
        System.exit(exitCode);
    }
 
    public static int saveReport(File gameDirectory, CrashReport crash) {
        Path crashDir = gameDirectory.toPath().resolve("crash-reports");
        Path crashFile = crashDir.resolve("crash-" + Util.getFilenameFormattedDateTime() + "-client.txt");
        Bootstrap.realStdoutPrintln(crash.getFriendlyReport(ReportType.CRASH));
        LOGGER.debug("Disabling console - remaining logs will be available only in log file");
 
        byte var4;
        try {
            if (crash.getSaveFile() != null) {
                Bootstrap.realStdoutPrintln("#@!@# Game crashed! Crash report saved to: #@!@# " + crash.getSaveFile().toAbsolutePath());
                return -1;
            }
 
            if (!crash.saveToFile(crashFile, ReportType.CRASH)) {
                Bootstrap.realStdoutPrintln("#@?@# Game crashed! Crash report could not be saved. #@?@#");
                return -2;
            }
 
            Bootstrap.realStdoutPrintln("#@!@# Game crashed! Crash report saved to: #@!@# " + crashFile.toAbsolutePath());
            var4 = -1;
        } finally {
            Bootstrap.shutdownStdout();
        }
 
        return var4;
    }
 
    public static void crash(@Nullable Minecraft minecraft, File gameDirectory, CrashReport crash) {
        int exitCode = saveReportAndShutdownSoundManager(minecraft, gameDirectory, crash);
        System.exit(exitCode);
    }
 
    private static int saveReportAndShutdownSoundManager(@Nullable Minecraft minecraft, File gameDirectory, CrashReport crash) {
        int exitCode = saveReport(gameDirectory, crash);
        if (minecraft != null) {
            minecraft.soundManager.emergencyShutdown();
        }
 
        return exitCode;
    }
 
    public boolean isEnforceUnicode() {
        return this.options.forceUnicodeFont().get();
    }
 
    public CompletableFuture<Void> reloadResourcePacks() {
        return this.reloadResourcePacks(false, null);
    }
 
    private CompletableFuture<Void> reloadResourcePacks(boolean isRecovery, Minecraft.@Nullable GameLoadCookie loadCookie) {
        if (this.pendingReload != null) {
            return this.pendingReload;
        } else {
            CompletableFuture<Void> result = new CompletableFuture<>();
            if (!isRecovery && this.overlay instanceof LoadingOverlay) {
                this.pendingReload = result;
                return result;
            } else {
                this.resourcePackRepository.reload();
                List<PackResources> packs = this.resourcePackRepository.openAllSelected();
                if (!isRecovery) {
                    this.reloadStateTracker.startReload(ResourceLoadStateTracker.ReloadReason.MANUAL, packs);
                }
 
                this.setOverlay(
                    new LoadingOverlay(
                        this,
                        this.resourceManager.createReload(Util.backgroundExecutor().forName("resourceLoad"), this, RESOURCE_RELOAD_INITIAL_TASK, packs),
                        maybeT -> Util.ifElse(maybeT, t -> {
                            if (isRecovery) {
                                this.downloadedPackSource.onRecoveryFailure();
                                this.abortResourcePackRecovery();
                            } else {
                                this.rollbackResourcePacks(t, loadCookie);
                            }
                        }, () -> {
                            this.levelRenderer.allChanged();
                            this.reloadStateTracker.finishReload();
                            this.downloadedPackSource.onReloadSuccess();
                            result.complete(null);
                            this.onResourceLoadFinished(loadCookie);
                        }),
                        !isRecovery
                    )
                );
                return result;
            }
        }
    }
 
    private void selfTest() {
        boolean error = false;
        BlockStateModelSet blockModelSet = this.getModelManager().getBlockStateModelSet();
        BlockStateModel missingModel = blockModelSet.missingModel();
 
        for (Block block : BuiltInRegistries.BLOCK) {
            for (BlockState state : block.getStateDefinition().getPossibleStates()) {
                if (state.getRenderShape() == RenderShape.MODEL) {
                    BlockStateModel model = blockModelSet.get(state);
                    if (model == missingModel) {
                        LOGGER.debug("Missing model for: {}", state);
                        error = true;
                    }
                }
            }
        }
 
        TextureAtlasSprite missingIcon = missingModel.particleMaterial().sprite();
 
        for (Block block : BuiltInRegistries.BLOCK) {
            for (BlockState statex : block.getStateDefinition().getPossibleStates()) {
                TextureAtlasSprite particleIcon = blockModelSet.getParticleMaterial(statex).sprite();
                if (!statex.isAir() && particleIcon == missingIcon) {
                    LOGGER.debug("Missing particle icon for: {}", statex);
                }
            }
        }
 
        BuiltInRegistries.ITEM.listElements().forEach(holder -> {
            Item item = holder.value();
            String descriptionId = item.getDescriptionId();
            String name = Component.translatable(descriptionId).getString();
            if (name.toLowerCase(Locale.ROOT).equals(item.getDescriptionId())) {
                LOGGER.debug("Missing translation for: {} {} {}", holder.key().identifier(), descriptionId, item);
            }
        });
        error |= MenuScreens.selfTest();
        error |= EntityRenderers.validateRegistrations();
        if (error) {
            throw new IllegalStateException("Your game data is foobar, fix the errors above!");
        }
    }
 
    public LevelStorageSource getLevelSource() {
        return this.levelSource;
    }
 
    public void openChatScreen(ChatComponent.ChatMethod chatMethod) {
        if (this.player != null) {
            this.gui.getChat().openScreen(chatMethod, ChatScreen::new);
        }
    }
 
    public void setScreen(@Nullable Screen screen) {
        if (SharedConstants.IS_RUNNING_IN_IDE && Thread.currentThread() != this.gameThread) {
            LOGGER.error("setScreen called from non-game thread");
        }
 
        if (this.screen != null) {
            this.screen.removed();
        } else {
            this.setLastInputType(InputType.NONE);
        }
 
        if (screen == null) {
            if (this.clientLevelTeardownInProgress) {
                throw new IllegalStateException("Trying to return to in-game GUI during disconnection");
            }
 
            if (this.level == null) {
                screen = new TitleScreen();
            } else if (this.player.isDeadOrDying()) {
                if (this.player.shouldShowDeathScreen()) {
                    screen = new DeathScreen(null, this.level.getLevelData().isHardcore(), this.player);
                } else {
                    this.player.respawn();
                }
            } else {
                screen = this.gui.getChat().restoreChatScreen();
            }
        }
 
        this.screen = screen;
        if (this.screen != null) {
            this.screen.added();
        }
 
        if (screen != null) {
            this.mouseHandler.releaseMouse();
            KeyMapping.releaseAll();
            screen.init(this.window.getGuiScaledWidth(), this.window.getGuiScaledHeight());
        } else {
            this.textInputManager.stopTextInput();
            if (this.level != null) {
                KeyMapping.restoreToggleStatesOnScreenClosed();
            }
 
            this.soundManager.resume();
            this.mouseHandler.grabMouse();
        }
 
        this.updateTitle();
    }
 
    public void setOverlay(@Nullable Overlay overlay) {
        this.overlay = overlay;
    }
 
    public void destroy() {
        try {
            LOGGER.info("Stopping!");
 
            try {
                this.narrator.destroy();
            } catch (Throwable var7) {
            }
 
            try {
                if (this.level != null) {
                    this.level.disconnect(ClientLevel.DEFAULT_QUIT_MESSAGE);
                }
 
                this.disconnectWithProgressScreen();
            } catch (Throwable var6) {
            }
 
            if (this.screen != null) {
                this.screen.removed();
            }
 
            this.close();
        } finally {
            Util.timeSource = System::nanoTime;
            if (!this.hasDelayedCrash()) {
                System.exit(0);
            }
        }
    }
 
    @Override
    public void close() {
        if (this.currentFrameProfile != null) {
            this.currentFrameProfile.cancel();
        }
 
        try {
            this.telemetryManager.close();
            this.regionalCompliancies.close();
            this.atlasManager.close();
            this.fontManager.close();
            this.gameRenderer.close();
            this.shaderManager.close();
            this.levelRenderer.close();
            this.soundManager.destroy();
            this.mapTextureManager.close();
            this.textureManager.close();
            this.resourceManager.close();
            if (this.tracyFrameCapture != null) {
                this.tracyFrameCapture.close();
            }
 
            FreeTypeUtil.destroy();
            Util.shutdownExecutors();
            RenderSystem.getSamplerCache().close();
            RenderSystem.getDevice().close();
        } catch (Throwable var5) {
            LOGGER.error("Shutdown failure!", var5);
            throw var5;
        } finally {
            this.window.close();
        }
    }
 
    private void runTick(boolean advanceGameTime) {
        this.window.setErrorSection("Pre render");
        if (this.window.shouldClose()) {
            this.stop();
        }
 
        if (this.pendingReload != null && !(this.overlay instanceof LoadingOverlay)) {
            CompletableFuture<Void> future = this.pendingReload;
            this.pendingReload = null;
            this.reloadResourcePacks().thenRun(() -> future.complete(null));
        }
 
        int ticksToDo = advanceGameTime ? this.deltaTracker.advanceGameTime(Util.getMillis()) : 0;
        ProfilerFiller profiler = Profiler.get();
        if (advanceGameTime) {
            try (Gizmos.TemporaryCollection ignored = this.collectPerTickGizmos()) {
                profiler.push("scheduledPacketProcessing");
                this.packetProcessor.processQueuedPackets();
                profiler.popPush("scheduledExecutables");
                this.runAllTasks();
                profiler.pop();
            }
 
            profiler.push("tick");
            if (ticksToDo > 0 && this.isLevelRunningNormally()) {
                profiler.push("textures");
                this.textureManager.tick();
                profiler.pop();
            }
 
            for (int i = 0; i < Math.min(10, ticksToDo); i++) {
                profiler.incrementCounter("clientTick");
 
                try (Gizmos.TemporaryCollection ignored = this.collectPerTickGizmos()) {
                    this.tick();
                }
            }
 
            if (ticksToDo > 0 && (this.level == null || this.level.tickRateManager().runsNormally())) {
                this.drainedLatestTickGizmos = this.perTickGizmos.drainGizmos();
            }
 
            profiler.pop();
        }
 
        this.window.setErrorSection("Render");
 
        try (Gizmos.TemporaryCollection ignored = this.levelRenderer.collectPerFrameGizmos()) {
            profiler.push("sound");
            this.soundManager.updateSource(this.gameRenderer.getMainCamera());
            profiler.popPush("toasts");
            this.toastManager.update();
            profiler.popPush("mouse");
            this.mouseHandler.handleAccumulatedMovement();
            profiler.popPush("frame");
            this.renderFrame(advanceGameTime);
            profiler.pop();
        }
 
        this.window.setErrorSection("Post render");
        boolean previouslyPaused = this.pause;
        this.pause = this.hasSingleplayerServer()
            && (this.screen != null && this.screen.isPauseScreen() || this.overlay != null && this.overlay.isPauseScreen())
            && !this.singleplayerServer.isPublished();
        if (!previouslyPaused && this.pause) {
            this.soundManager.pauseAllExcept(SoundSource.MUSIC, SoundSource.UI);
        }
 
        this.deltaTracker.updatePauseState(this.pause);
        this.deltaTracker.updateFrozenState(!this.isLevelRunningNormally());
    }
 
    private void renderFrame(boolean advanceGameTime) {
        ProfilerFiller profiler = Profiler.get();
        profiler.push("update");
        this.deltaTracker.advanceRealTime(Util.getMillis());
        boolean recordGpuUtilization;
        if (!this.debugEntries.isCurrentlyEnabled(DebugScreenEntries.GPU_UTILIZATION) && !this.metricsRecorder.isRecording()) {
            recordGpuUtilization = false;
            this.gpuUtilization = 0.0;
        } else {
            recordGpuUtilization = (this.currentFrameProfile == null || this.currentFrameProfile.isDone()) && !TimerQuery.getInstance().isRecording();
            if (recordGpuUtilization) {
                TimerQuery.getInstance().beginProfile();
            }
        }
 
        long renderStartTimer = Util.getNanos();
        this.pauseIfInactive();
        this.window.updateFullscreenIfChanged();
        if (this.isGameLoadFinished() && advanceGameTime && this.level != null) {
            this.level.update();
        }
 
        this.gameRenderer.update(this.deltaTracker, advanceGameTime);
        float worldPartialTicks = this.deltaTracker.getGameTimeDeltaPartialTick(false);
        this.pick(worldPartialTicks);
        profiler.popPush("extract");
        this.gameRenderer.getGameRenderState().framerateLimit = this.framerateLimitTracker.getFramerateLimit();
        this.gameRenderer.extract(this.deltaTracker, advanceGameTime);
        profiler.popPush("gpuAsync");
        RenderSystem.executePendingTasks();
        profiler.pop();
        this.gameRenderer.render(this.deltaTracker, advanceGameTime);
        profiler.push("present");
        if (!this.gameRenderer.getGameRenderState().windowRenderState.isMinimized) {
            this.mainRenderTarget.blitToScreen();
        }
 
        this.frameTimeNs = Util.getNanos() - renderStartTimer;
        if (recordGpuUtilization) {
            this.currentFrameProfile = TimerQuery.getInstance().endProfile();
        }
 
        profiler.popPush("swapBuffers");
        if (this.tracyFrameCapture != null) {
            this.tracyFrameCapture.upload();
            this.tracyFrameCapture.capture(this.mainRenderTarget);
        }
 
        RenderSystem.flipFrame(this.tracyFrameCapture);
        profiler.popPush("frameLimiter");
        int framerateLimit = this.gameRenderer.getGameRenderState().framerateLimit;
        if (framerateLimit < 260) {
            FramerateLimiter.limitDisplayFPS(framerateLimit);
        }
 
        profiler.popPush("fpsUpdate");
        this.frames++;
        long currentTime = Util.getNanos();
        long frameDuration = currentTime - this.lastNanoTime;
        if (recordGpuUtilization) {
            this.savedCpuDuration = frameDuration;
        }
 
        this.getDebugOverlay().logFrameDuration(frameDuration);
        this.lastNanoTime = currentTime;
        if (this.currentFrameProfile != null && this.currentFrameProfile.isDone()) {
            this.gpuUtilization = this.currentFrameProfile.get() * 100.0 / this.savedCpuDuration;
        }
 
        while (Util.getMillis() >= this.lastTime + 1000L) {
            fps = this.frames;
            this.lastTime += 1000L;
            this.frames = 0;
        }
 
        profiler.pop();
    }
 
    private void pauseIfInactive() {
        if (!this.window.isFocused() && this.options.pauseOnLostFocus && (!this.options.touchscreen().get() || !this.mouseHandler.isRightPressed())) {
            if (Util.getMillis() - this.lastActiveTime > 500L) {
                this.pauseGame(false);
            }
        } else {
            this.lastActiveTime = Util.getMillis();
        }
    }
 
    private ProfilerFiller constructProfiler(boolean shouldCollectFrameProfile, @Nullable SingleTickProfiler tickProfiler) {
        if (!shouldCollectFrameProfile) {
            this.fpsPieProfiler.disable();
            if (!this.metricsRecorder.isRecording() && tickProfiler == null) {
                return InactiveProfiler.INSTANCE;
            }
        }
 
        ProfilerFiller result;
        if (shouldCollectFrameProfile) {
            if (!this.fpsPieProfiler.isEnabled()) {
                this.fpsPieRenderTicks = 0;
                this.fpsPieProfiler.enable();
            }
 
            this.fpsPieRenderTicks++;
            result = this.fpsPieProfiler.getFiller();
        } else {
            result = InactiveProfiler.INSTANCE;
        }
 
        if (this.metricsRecorder.isRecording()) {
            result = ProfilerFiller.combine(result, this.metricsRecorder.getProfiler());
        }
 
        return SingleTickProfiler.decorateFiller(result, tickProfiler);
    }
 
    private void finishProfilers(boolean shouldCollectFrameProfile, @Nullable SingleTickProfiler tickProfiler) {
        if (tickProfiler != null) {
            tickProfiler.endTick();
        }
 
        ProfilerPieChart profilerPieChart = this.getDebugOverlay().getProfilerPieChart();
        if (shouldCollectFrameProfile) {
            profilerPieChart.setPieChartResults(this.fpsPieProfiler.getResults());
        } else {
            profilerPieChart.setPieChartResults(null);
        }
    }
 
    @Override
    public void resizeGui() {
        int guiScale = this.window.calculateScale(this.options.guiScale().get(), this.isEnforceUnicode());
        this.window.setGuiScale(guiScale);
        if (this.screen != null) {
            this.screen.resize(this.window.getGuiScaledWidth(), this.window.getGuiScaledHeight());
        }
 
        this.mouseHandler.setIgnoreFirstMove();
    }
 
    @Override
    public void cursorEntered() {
        this.mouseHandler.cursorEntered();
    }
 
    public int getFps() {
        return fps;
    }
 
    public long getFrameTimeNs() {
        return this.frameTimeNs;
    }
 
    public void sendLowDiskSpaceWarning() {
        this.execute(() -> SystemToast.onLowDiskSpace(this));
    }
 
    private void emergencySave() {
        MemoryReserve.release();
 
        try {
            if (this.isLocalServer && this.singleplayerServer != null) {
                this.singleplayerServer.halt(true);
            }
 
            this.disconnectWithSavingScreen();
        } catch (Throwable var2) {
        }
 
        System.gc();
    }
 
    public boolean debugClientMetricsStart(Consumer<Component> debugFeedback) {
        if (this.metricsRecorder.isRecording()) {
            this.debugClientMetricsStop();
            return false;
        } else {
            Consumer<ProfileResults> onStopped = results -> {
                if (results != EmptyProfileResults.EMPTY) {
                    int ticks = results.getTickDuration();
                    double durationInSeconds = (double)results.getNanoDuration() / TimeUtil.NANOSECONDS_PER_SECOND;
                    this.execute(
                        () -> debugFeedback.accept(
                            Component.translatable(
                                "commands.debug.stopped",
                                String.format(Locale.ROOT, "%.2f", durationInSeconds),
                                ticks,
                                String.format(Locale.ROOT, "%.2f", ticks / durationInSeconds)
                            )
                        )
                    );
                }
            };
            Consumer<Path> onFinished = profilePath -> {
                Component profilePathComponent = Component.literal(profilePath.toString())
                    .withStyle(ChatFormatting.UNDERLINE)
                    .withStyle(s -> s.withClickEvent(new ClickEvent.OpenFile(profilePath.getParent())));
                this.execute(() -> debugFeedback.accept(Component.translatable("debug.profiling.stop", profilePathComponent)));
            };
            SystemReport systemReport = fillSystemReport(new SystemReport(), this, this.languageManager, this.launchedVersion, this.options);
            Consumer<List<Path>> profileReports = logs -> {
                Path profilePath = this.archiveProfilingReport(systemReport, logs);
                onFinished.accept(profilePath);
            };
            Consumer<Path> whenClientMetricsRecordingFinished;
            if (this.singleplayerServer == null) {
                whenClientMetricsRecordingFinished = path -> profileReports.accept(ImmutableList.of(path));
            } else {
                this.singleplayerServer.fillSystemReport(systemReport);
                CompletableFuture<Path> clientMetricRecordingResult = new CompletableFuture<>();
                CompletableFuture<Path> serverMetricRecordingResult = new CompletableFuture<>();
                CompletableFuture.allOf(clientMetricRecordingResult, serverMetricRecordingResult)
                    .thenRunAsync(
                        () -> profileReports.accept(ImmutableList.of(clientMetricRecordingResult.join(), serverMetricRecordingResult.join())), Util.ioPool()
                    );
                this.singleplayerServer.startRecordingMetrics(ignored -> {}, serverMetricRecordingResult::complete);
                whenClientMetricsRecordingFinished = clientMetricRecordingResult::complete;
            }
 
            this.metricsRecorder = ActiveMetricsRecorder.createStarted(
                new ClientMetricsSamplersProvider(Util.timeSource, this.levelRenderer),
                Util.timeSource,
                Util.ioPool(),
                new MetricsPersister("client"),
                results -> {
                    this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
                    onStopped.accept(results);
                },
                whenClientMetricsRecordingFinished
            );
            return true;
        }
    }
 
    private void debugClientMetricsStop() {
        this.metricsRecorder.end();
        if (this.singleplayerServer != null) {
            this.singleplayerServer.finishRecordingMetrics();
        }
    }
 
    private void debugClientMetricsCancel() {
        this.metricsRecorder.cancel();
        if (this.singleplayerServer != null) {
            this.singleplayerServer.cancelRecordingMetrics();
        }
    }
 
    private Path archiveProfilingReport(SystemReport systemReport, List<Path> profilingResultPaths) {
        String levelName;
        if (this.isLocalServer()) {
            levelName = this.getSingleplayerServer().getWorldData().getLevelName();
        } else {
            ServerData server = this.getCurrentServer();
            levelName = server != null ? server.name : "unknown";
        }
 
        Path archivePath;
        try {
            String profilingName = String.format(
                Locale.ROOT, "%s-%s-%s", Util.getFilenameFormattedDateTime(), levelName, SharedConstants.getCurrentVersion().id()
            );
            String zipFileName = FileUtil.findAvailableName(MetricsPersister.PROFILING_RESULTS_DIR, profilingName, ".zip");
            archivePath = MetricsPersister.PROFILING_RESULTS_DIR.resolve(zipFileName);
        } catch (IOException var21) {
            throw new UncheckedIOException(var21);
        }
 
        try (FileZipper fileZipper = new FileZipper(archivePath)) {
            fileZipper.add(Paths.get("system.txt"), systemReport.toLineSeparatedString());
            fileZipper.add(Paths.get("client").resolve(this.options.getFile().getName()), this.options.dumpOptionsForReport());
            profilingResultPaths.forEach(fileZipper::add);
        } finally {
            for (Path path : profilingResultPaths) {
                try {
                    FileUtils.forceDelete(path.toFile());
                } catch (IOException var18) {
                    LOGGER.warn("Failed to delete temporary profiling result {}", path, var18);
                }
            }
        }
 
        return archivePath;
    }
 
    public void stop() {
        this.running = false;
    }
 
    public boolean isRunning() {
        return this.running;
    }
 
    public void pauseGame(boolean suppressPauseMenuIfWeReallyArePausing) {
        if (this.screen == null) {
            boolean canGameReallyBePaused = this.hasSingleplayerServer() && !this.singleplayerServer.isPublished();
            if (canGameReallyBePaused) {
                this.setScreen(new PauseScreen(!suppressPauseMenuIfWeReallyArePausing));
            } else {
                this.setScreen(new PauseScreen(true));
            }
        }
    }
 
    private void continueAttack(boolean down) {
        if (!down) {
            this.missTime = 0;
        }
 
        if (this.missTime <= 0 && !this.player.isUsingItem()) {
            ItemStack heldItem = this.player.getItemInHand(InteractionHand.MAIN_HAND);
            if (!heldItem.has(DataComponents.PIERCING_WEAPON)) {
                if (down && this.hitResult != null && this.hitResult.getType() == HitResult.Type.BLOCK) {
                    BlockHitResult blockHit = (BlockHitResult)this.hitResult;
                    BlockPos pos = blockHit.getBlockPos();
                    if (!this.level.getBlockState(pos).isAir()) {
                        Direction direction = blockHit.getDirection();
                        if (this.gameMode.continueDestroyBlock(pos, direction)) {
                            this.level.addBreakingBlockEffect(pos, direction);
                            this.player.swing(InteractionHand.MAIN_HAND);
                        }
                    }
                } else {
                    this.gameMode.stopDestroyBlock();
                }
            }
        }
    }
 
    private boolean startAttack() {
        if (this.missTime > 0) {
            return false;
        } else if (this.hitResult == null) {
            LOGGER.error("Null returned as 'hitResult', this shouldn't happen!");
            if (this.gameMode.hasMissTime()) {
                this.missTime = 10;
            }
 
            return false;
        } else if (this.player.isHandsBusy()) {
            return false;
        } else if (this.gameMode.isSpectator()) {
            if (this.hitResult instanceof EntityHitResult entityHitResult) {
                this.gameMode.spectate(entityHitResult.getEntity());
            }
 
            return true;
        } else {
            ItemStack heldItem = this.player.getItemInHand(InteractionHand.MAIN_HAND);
            if (!heldItem.isItemEnabled(this.level.enabledFeatures())) {
                return false;
            } else if (this.player.cannotAttackWithItem(heldItem, 0)) {
                return false;
            } else {
                boolean endAttack = false;
                PiercingWeapon piercingWeapon = heldItem.get(DataComponents.PIERCING_WEAPON);
                if (piercingWeapon != null) {
                    this.gameMode.piercingAttack(piercingWeapon);
                    this.player.swing(InteractionHand.MAIN_HAND);
                    return true;
                } else {
                    switch (this.hitResult.getType()) {
                        case ENTITY:
                            AttackRange customItemRange = heldItem.get(DataComponents.ATTACK_RANGE);
                            if (customItemRange == null || customItemRange.isInRange(this.player, this.hitResult.getLocation())) {
                                this.gameMode.attack(this.player, ((EntityHitResult)this.hitResult).getEntity());
                            }
                            break;
                        case BLOCK:
                            BlockHitResult blockHit = (BlockHitResult)this.hitResult;
                            BlockPos pos = blockHit.getBlockPos();
                            if (!this.level.getBlockState(pos).isAir()) {
                                this.gameMode.startDestroyBlock(pos, blockHit.getDirection());
                                if (this.level.getBlockState(pos).isAir()) {
                                    endAttack = true;
                                }
                                break;
                            }
                        case MISS:
                            if (this.gameMode.hasMissTime()) {
                                this.missTime = 10;
                            }
 
                            this.player.resetAttackStrengthTicker();
                    }
 
                    this.player.swing(InteractionHand.MAIN_HAND);
                    return endAttack;
                }
            }
        }
    }
 
    private void startUseItem() {
        if (!this.gameMode.isDestroying()) {
            this.rightClickDelay = 4;
            if (!this.player.isHandsBusy()) {
                if (this.hitResult == null) {
                    LOGGER.warn("Null returned as 'hitResult', this shouldn't happen!");
                }
 
                for (InteractionHand hand : InteractionHand.values()) {
                    ItemStack heldItem = this.player.getItemInHand(hand);
                    if (!heldItem.isItemEnabled(this.level.enabledFeatures())) {
                        return;
                    }
 
                    if (this.hitResult != null) {
                        switch (this.hitResult.getType()) {
                            case ENTITY:
                                EntityHitResult entityHit = (EntityHitResult)this.hitResult;
                                Entity entity = entityHit.getEntity();
                                if (!this.level.getWorldBorder().isWithinBounds(entity.blockPosition())) {
                                    return;
                                }
 
                                if (this.player.isWithinEntityInteractionRange(entity, 0.0)
                                    && this.gameMode.interact(this.player, entity, entityHit, hand) instanceof InteractionResult.Success success) {
                                    if (success.swingSource() == InteractionResult.SwingSource.CLIENT) {
                                        this.player.swing(hand);
                                    }
 
                                    return;
                                }
                                break;
                            case BLOCK:
                                BlockHitResult blockHit = (BlockHitResult)this.hitResult;
                                int oldCount = heldItem.getCount();
                                InteractionResult useResult = this.gameMode.useItemOn(this.player, hand, blockHit);
                                if (useResult instanceof InteractionResult.Success success) {
                                    if (success.swingSource() == InteractionResult.SwingSource.CLIENT) {
                                        this.player.swing(hand);
                                        if (!heldItem.isEmpty() && (heldItem.getCount() != oldCount || this.player.hasInfiniteMaterials())) {
                                            this.gameRenderer.itemInHandRenderer.itemUsed(hand);
                                        }
                                    }
 
                                    return;
                                }
 
                                if (useResult instanceof InteractionResult.Fail) {
                                    return;
                                }
                        }
                    }
 
                    if (!heldItem.isEmpty() && this.gameMode.useItem(this.player, hand) instanceof InteractionResult.Success success) {
                        if (success.swingSource() == InteractionResult.SwingSource.CLIENT) {
                            this.player.swing(hand);
                        }
 
                        this.gameRenderer.itemInHandRenderer.itemUsed(hand);
                        return;
                    }
                }
            }
        }
    }
 
    public MusicManager getMusicManager() {
        return this.musicManager;
    }
 
    public void tick() {
        this.clientTickCount++;
        if (this.level != null && !this.pause) {
            this.level.tickRateManager().tick();
        }
 
        if (this.rightClickDelay > 0) {
            this.rightClickDelay--;
        }
 
        ProfilerFiller profiler = Profiler.get();
        profiler.push("gui");
        this.textInputManager.tick();
        this.chatListener.tick();
        this.gui.tick(this.pause);
        profiler.pop();
        this.pick(1.0F);
        this.tutorial.onLookAt(this.level, this.hitResult);
        profiler.push("gameMode");
        if (!this.pause && this.level != null) {
            this.gameMode.tick();
        }
 
        profiler.popPush("screen");
        if (this.screen != null || this.player == null) {
            if (this.screen instanceof InBedChatScreen inBedScreen && !this.player.isSleeping()) {
                inBedScreen.onPlayerWokeUp();
            }
        } else if (this.player.isDeadOrDying() && !(this.screen instanceof DeathScreen)) {
            this.setScreen(null);
        } else if (this.player.isSleeping() && this.level != null) {
            this.gui.getChat().openScreen(ChatComponent.ChatMethod.MESSAGE, InBedChatScreen::new);
        }
 
        if (this.screen != null) {
            this.missTime = 10000;
        }
 
        if (this.screen != null) {
            try {
                this.screen.tick();
            } catch (Throwable var5) {
                CrashReport report = CrashReport.forThrowable(var5, "Ticking screen");
                this.screen.fillCrashDetails(report);
                throw new ReportedException(report);
            }
        }
 
        if (this.overlay != null) {
            this.overlay.tick();
        }
 
        if (!this.getDebugOverlay().showDebugScreen()) {
            this.gui.clearCache();
        }
 
        if (this.overlay == null && this.screen == null) {
            profiler.popPush("Keybindings");
            this.handleKeybinds();
            if (this.missTime > 0) {
                this.missTime--;
            }
        }
 
        if (this.level != null) {
            if (!this.pause) {
                profiler.popPush("gameRenderer");
                this.gameRenderer.tick();
                profiler.popPush("entities");
                this.level.tickEntities();
                profiler.popPush("blockEntities");
                this.level.tickBlockEntities();
            }
        } else if (this.gameRenderer.currentPostEffect() != null) {
            this.gameRenderer.clearPostEffect();
        }
 
        this.musicManager.tick();
        this.soundManager.tick(this.pause);
        if (this.level != null) {
            if (!this.pause) {
                profiler.popPush("level");
                if (!this.options.joinedFirstServer && this.isMultiplayerServer()) {
                    Component title = Component.translatable("tutorial.socialInteractions.title");
                    Component message = Component.translatable("tutorial.socialInteractions.description", Tutorial.key("socialInteractions"));
                    this.socialInteractionsToast = new TutorialToast(this.font, TutorialToast.Icons.SOCIAL_INTERACTIONS, title, message, true, 8000);
                    this.toastManager.addToast(this.socialInteractionsToast);
                    this.options.joinedFirstServer = true;
                    this.options.save();
                }
 
                this.tutorial.tick();
 
                try {
                    this.level.tick(() -> true);
                } catch (Throwable var6) {
                    CrashReport report = CrashReport.forThrowable(var6, "Exception in world tick");
                    if (this.level == null) {
                        CrashReportCategory levelCategory = report.addCategory("Affected level");
                        levelCategory.setDetail("Problem", "Level is null!");
                    } else {
                        this.level.fillReportDetails(report);
                    }
 
                    throw new ReportedException(report);
                }
            }
 
            profiler.popPush("animateTick");
            if (!this.pause && this.isLevelRunningNormally()) {
                this.level.animateTick(this.player.getBlockX(), this.player.getBlockY(), this.player.getBlockZ());
            }
 
            profiler.popPush("particles");
            if (!this.pause && this.isLevelRunningNormally()) {
                this.particleEngine.tick();
            }
 
            ClientPacketListener connection = this.getConnection();
            if (connection != null && !this.pause) {
                connection.send(ServerboundClientTickEndPacket.INSTANCE);
            }
        } else if (this.pendingConnection != null) {
            profiler.popPush("pendingConnection");
            this.pendingConnection.tick();
        }
 
        profiler.popPush("keyboard");
        this.keyboardHandler.tick();
        profiler.pop();
    }
 
    private boolean isLevelRunningNormally() {
        return this.level == null || this.level.tickRateManager().runsNormally();
    }
 
    private boolean isMultiplayerServer() {
        return !this.isLocalServer || this.singleplayerServer != null && this.singleplayerServer.isPublished();
    }
 
    private void handleKeybinds() {
        while (this.options.keyTogglePerspective.consumeClick()) {
            CameraType previous = this.options.getCameraType();
            this.options.setCameraType(this.options.getCameraType().cycle());
            if (previous.isFirstPerson() != this.options.getCameraType().isFirstPerson()) {
                this.gameRenderer.checkEntityPostEffect(this.options.getCameraType().isFirstPerson() ? this.getCameraEntity() : null);
            }
 
            this.levelRenderer.needsUpdate();
        }
 
        while (this.options.keySmoothCamera.consumeClick()) {
            this.options.smoothCamera = !this.options.smoothCamera;
        }
 
        while (this.options.keyToggleGui.consumeClick()) {
            this.options.hideGui = !this.options.hideGui;
        }
 
        while (this.options.keyToggleSpectatorShaderEffects.consumeClick()) {
            this.gameRenderer.togglePostEffect();
        }
 
        for (int i = 0; i < 9; i++) {
            boolean savePressed = this.options.keySaveHotbarActivator.isDown();
            boolean loadPressed = this.options.keyLoadHotbarActivator.isDown();
            if (this.options.keyHotbarSlots[i].consumeClick()) {
                if (this.player.isSpectator()) {
                    this.gui.getSpectatorGui().onHotbarSelected(i);
                } else if (!this.player.hasInfiniteMaterials() || this.screen != null || !loadPressed && !savePressed) {
                    this.player.getInventory().setSelectedSlot(i);
                } else {
                    CreativeModeInventoryScreen.handleHotbarLoadOrSave(this, i, loadPressed, savePressed);
                }
            }
        }
 
        while (this.options.keySocialInteractions.consumeClick()) {
            if (!this.isMultiplayerServer() && !SharedConstants.DEBUG_SOCIAL_INTERACTIONS) {
                this.chatListener.handleOverlay(SOCIAL_INTERACTIONS_NOT_AVAILABLE);
                this.narrator.saySystemNow(SOCIAL_INTERACTIONS_NOT_AVAILABLE);
            } else {
                if (this.socialInteractionsToast != null) {
                    this.socialInteractionsToast.hide();
                    this.socialInteractionsToast = null;
                }
 
                this.setScreen(new SocialInteractionsScreen());
            }
        }
 
        while (this.options.keyInventory.consumeClick()) {
            if (this.gameMode.isServerControlledInventory()) {
                this.player.sendOpenInventory();
            } else {
                this.tutorial.onOpenInventory();
                this.setScreen(new InventoryScreen(this.player));
            }
        }
 
        while (this.options.keyAdvancements.consumeClick()) {
            this.setScreen(new AdvancementsScreen(this.player.connection.getAdvancements()));
        }
 
        while (this.options.keyQuickActions.consumeClick()) {
            this.getQuickActionsDialog().ifPresent(dialog -> this.player.connection.showDialog((Holder<Dialog>)dialog, this.screen));
        }
 
        while (this.options.keySwapOffhand.consumeClick()) {
            if (!this.player.isSpectator()) {
                this.getConnection()
                    .send(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.SWAP_ITEM_WITH_OFFHAND, BlockPos.ZERO, Direction.DOWN));
            }
        }
 
        while (this.options.keyDrop.consumeClick()) {
            if (!this.player.isSpectator() && this.player.drop(this.hasControlDown())) {
                this.player.swing(InteractionHand.MAIN_HAND);
            }
        }
 
        while (this.options.keyChat.consumeClick()) {
            this.openChatScreen(ChatComponent.ChatMethod.MESSAGE);
        }
 
        if (this.screen == null && this.overlay == null && this.options.keyCommand.consumeClick()) {
            this.openChatScreen(ChatComponent.ChatMethod.COMMAND);
        }
 
        boolean instantAttack = false;
        if (this.player.isUsingItem()) {
            if (!this.options.keyUse.isDown()) {
                this.gameMode.releaseUsingItem(this.player);
            }
 
            while (this.options.keyAttack.consumeClick()) {
            }
 
            while (this.options.keyUse.consumeClick()) {
            }
 
            while (this.options.keyPickItem.consumeClick()) {
            }
        } else {
            while (this.options.keyAttack.consumeClick()) {
                instantAttack |= this.startAttack();
            }
 
            while (this.options.keyUse.consumeClick()) {
                this.startUseItem();
            }
 
            while (this.options.keyPickItem.consumeClick()) {
                this.pickBlockOrEntity();
            }
 
            if (this.player.isSpectator()) {
                while (this.options.keySpectatorHotbar.consumeClick()) {
                    this.gui.getSpectatorGui().onHotbarActionKeyPressed();
                }
            }
        }
 
        if (this.options.keyUse.isDown() && this.rightClickDelay == 0 && !this.player.isUsingItem()) {
            this.startUseItem();
        }
 
        this.continueAttack(this.screen == null && !instantAttack && this.options.keyAttack.isDown() && this.mouseHandler.isMouseGrabbed());
    }
 
    private Optional<Holder<Dialog>> getQuickActionsDialog() {
        Registry<Dialog> dialogRegistry = this.player.connection.registryAccess().lookupOrThrow(Registries.DIALOG);
        return dialogRegistry.get(DialogTags.QUICK_ACTIONS).flatMap(quickActions -> {
            if (quickActions.size() == 0) {
                return Optional.empty();
            } else {
                return quickActions.size() == 1 ? Optional.of(quickActions.get(0)) : dialogRegistry.get(Dialogs.QUICK_ACTIONS);
            }
        });
    }
 
    public ClientTelemetryManager getTelemetryManager() {
        return this.telemetryManager;
    }
 
    public double getGpuUtilization() {
        return this.gpuUtilization;
    }
 
    public ProfileKeyPairManager getProfileKeyPairManager() {
        return this.profileKeyPairManager;
    }
 
    public WorldOpenFlows createWorldOpenFlows() {
        return new WorldOpenFlows(this, this.levelSource);
    }
 
    public void doWorldLoad(
        LevelStorageSource.LevelStorageAccess levelSourceAccess,
        PackRepository packRepository,
        WorldStem worldStem,
        Optional<GameRules> gameRules,
        boolean newWorld
    ) {
        this.disconnectWithProgressScreen();
        Instant worldLoadStart = Instant.now();
        LevelLoadTracker loadTracker = new LevelLoadTracker(newWorld ? 500L : 0L);
        LevelLoadingScreen screen = new LevelLoadingScreen(loadTracker, LevelLoadingScreen.Reason.OTHER);
        this.setScreen(screen);
        int chunkStatusViewRadius = Math.max(5, 3) + ChunkLevel.RADIUS_AROUND_FULL_CHUNK + 1;
 
        try {
            levelSourceAccess.saveDataTag(worldStem.worldDataAndGenSettings().data());
            LevelLoadListener loadListener = LevelLoadListener.compose(loadTracker, LoggingLevelLoadListener.forSingleplayer());
            this.singleplayerServer = MinecraftServer.spin(
                thread -> new IntegratedServer(thread, this, levelSourceAccess, packRepository, worldStem, gameRules, this.services, loadListener)
            );
            loadTracker.setServerChunkStatusView(this.singleplayerServer.createChunkLoadStatusView(chunkStatusViewRadius));
            this.isLocalServer = true;
            this.updateReportEnvironment(ReportEnvironment.local());
            this.quickPlayLog
                .setWorldData(QuickPlayLog.Type.SINGLEPLAYER, levelSourceAccess.getLevelId(), worldStem.worldDataAndGenSettings().data().getLevelName());
        } catch (Throwable var16) {
            CrashReport report = CrashReport.forThrowable(var16, "Starting integrated server");
            CrashReportCategory category = report.addCategory("Starting integrated server");
            category.setDetail("Level ID", levelSourceAccess.getLevelId());
            category.setDetail("Level Name", () -> worldStem.worldDataAndGenSettings().data().getLevelName());
            throw new ReportedException(report);
        }
 
        ProfilerFiller profiler = Profiler.get();
        profiler.push("waitForServer");
        long tickLengthNs = TimeUnit.SECONDS.toNanos(1L) / 60L;
 
        while (!this.singleplayerServer.isReady() || this.overlay != null) {
            long finishTime = Util.getNanos() + tickLengthNs;
            screen.tick();
            if (this.overlay != null) {
                this.overlay.tick();
            }
 
            this.renderFrame(false);
            this.runAllTasks();
            this.managedBlock(() -> Util.getNanos() > finishTime);
        }
 
        profiler.pop();
        Duration worldLoadDuration = Duration.between(worldLoadStart, Instant.now());
        SocketAddress socketAddress = this.singleplayerServer.getConnection().startMemoryChannel();
        Connection connection = Connection.connectToLocalServer(socketAddress);
        connection.initiateServerboundPlayConnection(
            socketAddress.toString(),
            0,
            new ClientHandshakePacketListenerImpl(connection, this, null, null, newWorld, worldLoadDuration, status -> {}, loadTracker, null)
        );
        connection.send(new ServerboundHelloPacket(this.getUser().getName(), this.getUser().getProfileId()));
        this.pendingConnection = connection;
    }
 
    public void setLevel(ClientLevel level) {
        this.level = level;
        this.updateLevelInEngines(level);
    }
 
    public void disconnectFromWorld(Component message) {
        boolean localServer = this.isLocalServer();
        ServerData currentServer = this.getCurrentServer();
        if (this.level != null) {
            this.level.disconnect(message);
        }
 
        if (localServer) {
            this.disconnectWithSavingScreen();
        } else {
            this.disconnectWithProgressScreen();
        }
 
        TitleScreen titleScreen = new TitleScreen();
        if (localServer) {
            this.setScreen(titleScreen);
        } else if (currentServer != null && currentServer.isRealm()) {
            this.setScreen(new RealmsMainScreen(titleScreen));
        } else {
            this.setScreen(new JoinMultiplayerScreen(titleScreen));
        }
    }
 
    public void disconnectWithSavingScreen() {
        this.disconnect(new GenericMessageScreen(SAVING_LEVEL), false);
    }
 
    public void disconnectWithProgressScreen() {
        this.disconnectWithProgressScreen(true);
    }
 
    public void disconnectWithProgressScreen(boolean stopSound) {
        this.disconnect(new ProgressScreen(true), false, stopSound);
    }
 
    public void disconnect(Screen screen, boolean keepResourcePacks) {
        this.disconnect(screen, keepResourcePacks, true);
    }
 
    public void disconnect(Screen screen, boolean keepResourcePacks, boolean stopSound) {
        ClientPacketListener connection = this.getConnection();
        if (connection != null) {
            this.dropAllTasks();
            connection.close();
            if (!keepResourcePacks) {
                this.clearDownloadedResourcePacks();
            }
        }
 
        this.playerSocialManager.stopOnlineMode();
        if (this.metricsRecorder.isRecording()) {
            this.debugClientMetricsCancel();
        }
 
        IntegratedServer server = this.singleplayerServer;
        this.singleplayerServer = null;
        this.gameRenderer.resetData();
        this.gameMode = null;
        this.narrator.clear();
        this.clientLevelTeardownInProgress = true;
 
        try {
            if (this.level != null) {
                this.gui.onDisconnected();
            }
 
            this.level = null;
            if (server != null) {
                server.halt(false);
                this.setScreen(new GenericMessageScreen(SAVING_LEVEL));
                ProfilerFiller profiler = Profiler.get();
                profiler.push("waitForServer");
 
                while (!server.isShutdown()) {
                    this.renderFrame(false);
                }
 
                profiler.pop();
            }
 
            this.setScreenAndShow(screen);
            this.isLocalServer = false;
            this.updateLevelInEngines(null, stopSound);
            this.player = null;
        } finally {
            this.clientLevelTeardownInProgress = false;
        }
    }
 
    public void clearDownloadedResourcePacks() {
        this.downloadedPackSource.cleanupAfterDisconnect();
        this.runAllTasks();
    }
 
    public void clearClientLevel(Screen screen) {
        ClientPacketListener connection = this.getConnection();
        if (connection != null) {
            connection.clearLevel();
        }
 
        if (this.metricsRecorder.isRecording()) {
            this.debugClientMetricsCancel();
        }
 
        this.gameRenderer.resetData();
        this.gameMode = null;
        this.narrator.clear();
        this.clientLevelTeardownInProgress = true;
 
        try {
            this.setScreenAndShow(screen);
            this.gui.onDisconnected();
            this.level = null;
            this.updateLevelInEngines(null);
            this.player = null;
        } finally {
            this.clientLevelTeardownInProgress = false;
        }
    }
 
    public void setScreenAndShow(Screen screen) {
        try (Zone ignored = Profiler.get().zone("forcedTick")) {
            this.setScreen(screen);
            this.renderFrame(false);
        }
    }
 
    private void updateLevelInEngines(@Nullable ClientLevel level) {
        this.updateLevelInEngines(level, true);
    }
 
    private void updateLevelInEngines(@Nullable ClientLevel level, boolean stopSound) {
        if (stopSound) {
            this.soundManager.stop();
        }
 
        this.setCameraEntity(null);
        this.pendingConnection = null;
        this.levelRenderer.setLevel(level);
        this.particleEngine.setLevel(level);
        this.gameRenderer.setLevel(level);
        this.updateTitle();
    }
 
    private UserProperties userProperties() {
        return this.userPropertiesFuture.join();
    }
 
    public boolean telemetryOptInExtra() {
        return this.extraTelemetryAvailable() && this.options.telemetryOptInExtra().get();
    }
 
    public boolean extraTelemetryAvailable() {
        return this.allowsTelemetry() && this.userProperties().flag(UserFlag.OPTIONAL_TELEMETRY_AVAILABLE);
    }
 
    public boolean allowsTelemetry() {
        return SharedConstants.IS_RUNNING_IN_IDE && !SharedConstants.DEBUG_FORCE_TELEMETRY ? false : this.userProperties().flag(UserFlag.TELEMETRY_ENABLED);
    }
 
    public boolean allowsMultiplayer() {
        return this.allowsMultiplayer && this.userProperties().flag(UserFlag.SERVERS_ALLOWED) && this.multiplayerBan() == null && !this.isNameBanned();
    }
 
    public boolean allowsRealms() {
        return this.userProperties().flag(UserFlag.REALMS_ALLOWED) && this.multiplayerBan() == null;
    }
 
    public @Nullable BanDetails multiplayerBan() {
        return this.userProperties().bannedScopes().get("MULTIPLAYER");
    }
 
    public boolean isNameBanned() {
        ProfileResult result = this.profileFuture.getNow(null);
        return result != null && result.actions().contains(ProfileActionType.FORCED_NAME_CHANGE);
    }
 
    public boolean isBlocked(UUID uuid) {
        return !this.isLocalOrUnknownPlayer(uuid) && this.playerSocialManager.shouldHideMessageFrom(uuid);
    }
 
    private boolean isLocalOrUnknownPlayer(UUID uuid) {
        return uuid.equals(Util.NIL_UUID) ? true : this.player != null && uuid.equals(this.player.getUUID());
    }
 
    public ChatAbilities computeChatAbilities() {
        ChatAbilities.Builder builder = new ChatAbilities.Builder();
        ChatVisiblity visiblityOption = this.options.chatVisibility().get();
        if (visiblityOption == ChatVisiblity.HIDDEN) {
            builder.addRestriction(ChatRestriction.CHAT_AND_COMMANDS_DISABLED_BY_OPTIONS);
        } else if (visiblityOption == ChatVisiblity.SYSTEM) {
            builder.addRestriction(ChatRestriction.CHAT_DISABLED_BY_OPTIONS);
        }
 
        if (this.isMultiplayerServer()) {
            if (!this.allowsChat) {
                builder.addRestriction(ChatRestriction.DISABLED_BY_LAUNCHER);
            }
 
            if (SharedConstants.DEBUG_CHAT_DISABLED || !this.userProperties().flag(UserFlag.CHAT_ALLOWED)) {
                builder.addRestriction(ChatRestriction.DISABLED_BY_PROFILE);
            }
        }
 
        return builder.build();
    }
 
    public final boolean isDemo() {
        return this.demo;
    }
 
    public final boolean canSwitchGameMode() {
        return this.player != null && this.gameMode != null;
    }
 
    public @Nullable ClientPacketListener getConnection() {
        return this.player == null ? null : this.player.connection;
    }
 
    public static boolean renderNames() {
        return !instance.options.hideGui;
    }
 
    public static boolean useShaderTransparency() {
        GameRenderState gameRenderState = instance.gameRenderer.getGameRenderState();
        return !gameRenderState.levelRenderState.cameraRenderState.isPanoramicMode && gameRenderState.optionsRenderState.improvedTransparency;
    }
 
    private void pickBlockOrEntity() {
        if (this.hitResult != null && this.hitResult.getType() != HitResult.Type.MISS) {
            boolean includeData = this.hasControlDown();
            switch (this.hitResult) {
                case BlockHitResult blockHitResult:
                    this.gameMode.handlePickItemFromBlock(blockHitResult.getBlockPos(), includeData);
                    break;
                case EntityHitResult entityHitResult:
                    this.gameMode.handlePickItemFromEntity(entityHitResult.getEntity(), includeData);
                    break;
                default:
            }
        }
    }
 
    public CrashReport fillReport(CrashReport report) {
        SystemReport systemReport = report.getSystemReport();
 
        try {
            fillSystemReport(systemReport, this, this.languageManager, this.launchedVersion, this.options);
            this.fillUptime(report.addCategory("Uptime"));
            if (this.level != null) {
                this.level.fillReportDetails(report);
            }
 
            if (this.singleplayerServer != null) {
                this.singleplayerServer.fillSystemReport(systemReport);
            }
 
            this.reloadStateTracker.fillCrashReport(report);
        } catch (Throwable var4) {
            LOGGER.error("Failed to collect details", var4);
        }
 
        return report;
    }
 
    public static void fillReport(
        @Nullable Minecraft minecraft, @Nullable LanguageManager languageManager, String launchedVersion, @Nullable Options options, CrashReport report
    ) {
        SystemReport system = report.getSystemReport();
        fillSystemReport(system, minecraft, languageManager, launchedVersion, options);
    }
 
    private static String formatSeconds(double timeInSeconds) {
        return String.format(Locale.ROOT, "%.3fs", timeInSeconds);
    }
 
    private void fillUptime(CrashReportCategory category) {
        category.setDetail("JVM uptime", () -> formatSeconds(ManagementFactory.getRuntimeMXBean().getUptime() / 1000.0));
        category.setDetail("Wall uptime", () -> formatSeconds((System.currentTimeMillis() - this.clientStartTimeMs) / 1000.0));
        category.setDetail("High-res time", () -> formatSeconds(Util.getMillis() / 1000.0));
        category.setDetail("Client ticks", () -> String.format(Locale.ROOT, "%d ticks / %.3fs", this.clientTickCount, this.clientTickCount / 20.0));
    }
 
    private static SystemReport fillSystemReport(
        SystemReport systemReport, @Nullable Minecraft minecraft, @Nullable LanguageManager languageManager, String launchedVersion, @Nullable Options options
    ) {
        systemReport.setDetail("Launched Version", () -> launchedVersion);
        String launcherBrand = getLauncherBrand();
        if (launcherBrand != null) {
            systemReport.setDetail("Launcher name", launcherBrand);
        }
 
        systemReport.setDetail("Backend library", RenderSystem::getBackendDescription);
        systemReport.setDetail("Backend API", RenderSystem::getApiDescription);
        systemReport.setDetail("Window size", () -> minecraft != null ? minecraft.window.getWidth() + "x" + minecraft.window.getHeight() : "<not initialized>");
        systemReport.setDetail("GFLW Platform", Window::getPlatform);
        systemReport.setDetail("Render Extensions", () -> String.join(", ", RenderSystem.getDevice().getEnabledExtensions()));
        systemReport.setDetail("GL debug messages", () -> {
            GpuDevice device = RenderSystem.tryGetDevice();
            if (device == null) {
                return "<no renderer available>";
            } else {
                return device.isDebuggingEnabled() ? String.join("\n", device.getLastDebugMessages()) : "<debugging unavailable>";
            }
        });
        systemReport.setDetail("Is Modded", () -> checkModStatus().fullDescription());
        systemReport.setDetail("Universe", () -> minecraft != null ? Long.toHexString(minecraft.canary) : "404");
        systemReport.setDetail("Type", "Client");
        if (options != null) {
            if (minecraft != null) {
                String gpuWarnings = minecraft.getGpuWarnlistManager().getAllWarnings();
                if (gpuWarnings != null) {
                    systemReport.setDetail("GPU Warnings", gpuWarnings);
                }
            }
 
            systemReport.setDetail("Transparency", options.improvedTransparency().get() ? "shader" : "regular");
            systemReport.setDetail("Render Distance", options.getEffectiveRenderDistance() + "/" + options.renderDistance().get() + " chunks");
        }
 
        if (minecraft != null) {
            systemReport.setDetail("Resource Packs", () -> PackRepository.displayPackList(minecraft.getResourcePackRepository().getSelectedPacks()));
            systemReport.setDetail("Sound Cache", () -> {
                SoundBufferLibrary.DebugOutput.Counter counter = new SoundBufferLibrary.DebugOutput.Counter();
                minecraft.getSoundManager().getSoundCacheDebugStats(counter);
                return String.format(Locale.ROOT, "%d bytes in %d buffers", counter.totalSize(), counter.totalCount());
            });
        }
 
        if (languageManager != null) {
            systemReport.setDetail("Current Language", () -> languageManager.getSelected());
        }
 
        systemReport.setDetail("Locale", String.valueOf(Locale.getDefault()));
        systemReport.setDetail("System encoding", () -> System.getProperty("sun.jnu.encoding", "<not set>"));
        systemReport.setDetail("File encoding", () -> System.getProperty("file.encoding", "<not set>"));
        systemReport.setDetail("CPU", GLX::_getCpuInfo);
        return systemReport;
    }
 
    public static Minecraft getInstance() {
        return instance;
    }
 
    public CompletableFuture<Void> delayTextureReload() {
        return this.<CompletableFuture<Void>>submit((java.util.function.Supplier<CompletableFuture<Void>>)this::reloadResourcePacks).thenCompose(result -> (CompletionStage<Void>)result);
    }
 
    public void updateReportEnvironment(ReportEnvironment environment) {
        if (!this.reportingContext.matches(environment)) {
            this.reportingContext = ReportingContext.create(environment, this.userApiService);
        }
    }
 
    public @Nullable ServerData getCurrentServer() {
        return Optionull.map(this.getConnection(), ClientPacketListener::getServerData);
    }
 
    public boolean isLocalServer() {
        return this.isLocalServer;
    }
 
    public boolean hasSingleplayerServer() {
        return this.isLocalServer && this.singleplayerServer != null;
    }
 
    public @Nullable IntegratedServer getSingleplayerServer() {
        return this.singleplayerServer;
    }
 
    public boolean isSingleplayer() {
        IntegratedServer singleplayerServer = this.getSingleplayerServer();
        return singleplayerServer != null && !singleplayerServer.isPublished();
    }
 
    public boolean isLocalPlayer(UUID profileId) {
        return profileId.equals(this.getUser().getProfileId());
    }
 
    public User getUser() {
        return this.user;
    }
 
    public GameProfile getGameProfile() {
        ProfileResult profileResult = this.profileFuture.join();
        return profileResult != null ? profileResult.profile() : new GameProfile(this.user.getProfileId(), this.user.getName());
    }
 
    public Proxy getProxy() {
        return this.proxy;
    }
 
    public TextureManager getTextureManager() {
        return this.textureManager;
    }
 
    public ShaderManager getShaderManager() {
        return this.shaderManager;
    }
 
    public ResourceManager getResourceManager() {
        return this.resourceManager;
    }
 
    public PackRepository getResourcePackRepository() {
        return this.resourcePackRepository;
    }
 
    public VanillaPackResources getVanillaPackResources() {
        return this.vanillaPackResources;
    }
 
    public DownloadedPackSource getDownloadedPackSource() {
        return this.downloadedPackSource;
    }
 
    public Path getResourcePackDirectory() {
        return this.resourcePackDirectory;
    }
 
    public LanguageManager getLanguageManager() {
        return this.languageManager;
    }
 
    public boolean isPaused() {
        return this.pause;
    }
 
    public GpuWarnlistManager getGpuWarnlistManager() {
        return this.gpuWarnlistManager;
    }
 
    public SoundManager getSoundManager() {
        return this.soundManager;
    }
 
    public @Nullable Music getSituationalMusic() {
        Music screenMusic = Optionull.map(this.screen, Screen::getBackgroundMusic);
        if (screenMusic != null) {
            return screenMusic;
        } else {
            Camera camera = this.gameRenderer.getMainCamera();
            if (this.player != null && camera != null) {
                Level playerLevel = this.player.level();
                if (playerLevel.dimension() == Level.END && this.gui.getBossOverlay().shouldPlayMusic()) {
                    return Musics.END_BOSS;
                } else {
                    BackgroundMusic backgroundMusic = camera.attributeProbe().getValue(EnvironmentAttributes.BACKGROUND_MUSIC, 1.0F);
                    boolean isCreative = this.player.getAbilities().instabuild && this.player.getAbilities().mayfly;
                    boolean isUnderwater = this.player.isUnderWater();
                    return backgroundMusic.select(isCreative, isUnderwater).orElse(null);
                }
            } else {
                return Musics.MENU;
            }
        }
    }
 
    public float getMusicVolume() {
        if (this.screen != null && this.screen.getBackgroundMusic() != null) {
            return 1.0F;
        } else {
            Camera camera = this.gameRenderer.getMainCamera();
            return camera != null ? camera.attributeProbe().getValue(EnvironmentAttributes.MUSIC_VOLUME, 1.0F) : 1.0F;
        }
    }
 
    public Services services() {
        return this.services;
    }
 
    public SkinManager getSkinManager() {
        return this.skinManager;
    }
 
    public @Nullable Entity getCameraEntity() {
        return this.gameRenderer.getMainCamera().entity();
    }
 
    public void setCameraEntity(@Nullable Entity cameraEntity) {
        this.gameRenderer.getMainCamera().setEntity(cameraEntity);
        this.gameRenderer.checkEntityPostEffect(cameraEntity);
    }
 
    public boolean shouldEntityAppearGlowing(Entity entity) {
        return entity.isCurrentlyGlowing()
            || this.player != null && this.player.isSpectator() && this.options.keySpectatorOutlines.isDown() && entity.is(EntityType.PLAYER);
    }
 
    @Override
    protected Thread getRunningThread() {
        return this.gameThread;
    }
 
    @Override
    public Runnable wrapRunnable(Runnable runnable) {
        return runnable;
    }
 
    @Override
    protected boolean shouldRun(Runnable task) {
        return true;
    }
 
    public EntityRenderDispatcher getEntityRenderDispatcher() {
        return this.entityRenderDispatcher;
    }
 
    public BlockEntityRenderDispatcher getBlockEntityRenderDispatcher() {
        return this.blockEntityRenderDispatcher;
    }
 
    public MapRenderer getMapRenderer() {
        return this.mapRenderer;
    }
 
    public DataFixer getFixerUpper() {
        return this.fixerUpper;
    }
 
    public DeltaTracker getDeltaTracker() {
        return this.deltaTracker;
    }
 
    public BlockColors getBlockColors() {
        return this.blockColors;
    }
 
    public boolean showOnlyReducedInfo() {
        return this.player != null && this.player.isReducedDebugInfo() || this.options.reducedDebugInfo().get();
    }
 
    public ToastManager getToastManager() {
        return this.toastManager;
    }
 
    public Tutorial getTutorial() {
        return this.tutorial;
    }
 
    public boolean isWindowActive() {
        return this.window.isFocused();
    }
 
    public HotbarManager getHotbarManager() {
        return this.hotbarManager;
    }
 
    public ModelManager getModelManager() {
        return this.modelManager;
    }
 
    public AtlasManager getAtlasManager() {
        return this.atlasManager;
    }
 
    public MapTextureManager getMapTextureManager() {
        return this.mapTextureManager;
    }
 
    public WaypointStyleManager getWaypointStyles() {
        return this.waypointStyles;
    }
 
    public Component grabPanoramixScreenshot(File folder) {
        int downscaleFactor = 4;
        int width = 4096;
        int height = 4096;
        int ow = this.window.getWidth();
        int oh = this.window.getHeight();
        RenderTarget target = this.getMainRenderTarget();
        float xRot = this.player.getXRot();
        float yRot = this.player.getYRot();
        float xRotO = this.player.xRotO;
        float yRotO = this.player.yRotO;
        this.gameRenderer.setRenderBlockOutline(false);
        Camera camera = this.gameRenderer.getMainCamera();
 
        MutableComponent var14;
        try {
            camera.enablePanoramicMode();
            this.window.setWidth(4096);
            this.window.setHeight(4096);
            target.resize(4096, 4096);
 
            for (int i = 0; i < 6; i++) {
                switch (i) {
                    case 0:
                        this.player.setYRot(yRot);
                        this.player.setXRot(0.0F);
                        break;
                    case 1:
                        this.player.setYRot((yRot + 90.0F) % 360.0F);
                        this.player.setXRot(0.0F);
                        break;
                    case 2:
                        this.player.setYRot((yRot + 180.0F) % 360.0F);
                        this.player.setXRot(0.0F);
                        break;
                    case 3:
                        this.player.setYRot((yRot - 90.0F) % 360.0F);
                        this.player.setXRot(0.0F);
                        break;
                    case 4:
                        this.player.setYRot(yRot);
                        this.player.setXRot(-90.0F);
                        break;
                    case 5:
                    default:
                        this.player.setYRot(yRot);
                        this.player.setXRot(90.0F);
                }
 
                this.player.yRotO = this.player.getYRot();
                this.player.xRotO = this.player.getXRot();
                this.gameRenderer.update(DeltaTracker.ONE, true);
                this.gameRenderer.extract(DeltaTracker.ONE, true);
                this.gameRenderer.renderLevel(DeltaTracker.ONE);
 
                try {
                    Thread.sleep(10L);
                } catch (InterruptedException var19) {
                }
 
                Screenshot.grab(folder, "panorama_" + i + ".png", target, 4, result -> {});
            }
 
            Component name = Component.literal(folder.getName())
                .withStyle(ChatFormatting.UNDERLINE)
                .withStyle(s -> s.withClickEvent(new ClickEvent.OpenFile(folder.getAbsoluteFile())));
            return Component.translatable("screenshot.success", name);
        } catch (Exception var20) {
            LOGGER.error("Couldn't save image", (Throwable)var20);
            var14 = Component.translatable("screenshot.failure", var20.getMessage());
        } finally {
            this.player.setXRot(xRot);
            this.player.setYRot(yRot);
            this.player.xRotO = xRotO;
            this.player.yRotO = yRotO;
            this.gameRenderer.setRenderBlockOutline(true);
            this.window.setWidth(ow);
            this.window.setHeight(oh);
            target.resize(ow, oh);
            camera.disablePanoramicMode();
        }
 
        return var14;
    }
 
    public SplashManager getSplashManager() {
        return this.splashManager;
    }
 
    public @Nullable Overlay getOverlay() {
        return this.overlay;
    }
 
    public PlayerSocialManager getPlayerSocialManager() {
        return this.playerSocialManager;
    }
 
    public Window getWindow() {
        return this.window;
    }
 
    public TextInputManager textInputManager() {
        return this.textInputManager;
    }
 
    public void onTextInputFocusChange(GuiEventListener element, boolean isFocused) {
        this.textInputManager.onTextInputFocusChange(isFocused);
        if (this.screen != null) {
            if (isFocused) {
                this.keyboardHandler.resubmitLastPreeditEvent(element);
            } else {
                KeyboardHandler.submitPreeditEvent(element, null);
            }
        }
    }
 
    public FramerateLimitTracker getFramerateLimitTracker() {
        return this.framerateLimitTracker;
    }
 
    public DebugScreenOverlay getDebugOverlay() {
        return this.gui.getDebugOverlay();
    }
 
    public RenderBuffers renderBuffers() {
        return this.renderBuffers;
    }
 
    public void updateMaxMipLevel(int mipmapLevels) {
        this.atlasManager.updateMaxMipLevel(mipmapLevels);
    }
 
    public EntityModelSet getEntityModels() {
        return this.modelManager.entityModels().get();
    }
 
    public boolean isTextFilteringEnabled() {
        return this.userProperties().flag(UserFlag.PROFANITY_FILTER_ENABLED);
    }
 
    public void prepareForMultiplayer() {
        this.playerSocialManager.startOnlineMode();
        this.getProfileKeyPairManager().prepareKeyPair();
    }
 
    public InputType getLastInputType() {
        return this.lastInputType;
    }
 
    public void setLastInputType(InputType lastInputType) {
        this.lastInputType = lastInputType;
    }
 
    public GameNarrator getNarrator() {
        return this.narrator;
    }
 
    public ChatListener getChatListener() {
        return this.chatListener;
    }
 
    public ReportingContext getReportingContext() {
        return this.reportingContext;
    }
 
    public RealmsDataFetcher realmsDataFetcher() {
        return this.realmsDataFetcher;
    }
 
    public QuickPlayLog quickPlayLog() {
        return this.quickPlayLog;
    }
 
    public CommandHistory commandHistory() {
        return this.commandHistory;
    }
 
    public DirectoryValidator directoryValidator() {
        return this.directoryValidator;
    }
 
    public PlayerSkinRenderCache playerSkinRenderCache() {
        return this.playerSkinRenderCache;
    }
 
    private float getTickTargetMillis(float defaultTickTargetMillis) {
        if (this.level != null) {
            TickRateManager manager = this.level.tickRateManager();
            if (manager.runsNormally()) {
                return Math.max(defaultTickTargetMillis, manager.millisecondsPerTick());
            }
        }
 
        return defaultTickTargetMillis;
    }
 
    public ItemModelResolver getItemModelResolver() {
        return this.itemModelResolver;
    }
 
    public boolean canInterruptScreen() {
        return (this.screen == null || this.screen.canInterruptWithAnotherScreen()) && !this.clientLevelTeardownInProgress;
    }
 
    public static @Nullable String getLauncherBrand() {
        return System.getProperty("minecraft.launcher.brand");
    }
 
    public PacketProcessor packetProcessor() {
        return this.packetProcessor;
    }
 
    public Gizmos.TemporaryCollection collectPerTickGizmos() {
        return Gizmos.withCollector(this.perTickGizmos);
    }
 
    public Collection<SimpleGizmoCollector.GizmoInstance> getPerTickGizmos() {
        return this.drainedLatestTickGizmos;
    }
 
    private void pick(float partialTicks) {
        Entity cameraEntity = this.getCameraEntity();
        if (cameraEntity != null) {
            if (this.level != null && this.player != null) {
                Profiler.get().push("pick");
                this.hitResult = this.player.raycastHitResult(partialTicks, cameraEntity);
                this.crosshairPickEntity = this.hitResult instanceof EntityHitResult entityHitResult ? entityHitResult.getEntity() : null;
                Profiler.get().pop();
            }
        }
    }
 
    @OnlyIn(Dist.CLIENT)
    private record GameLoadCookie(RealmsClient realmsClient, GameConfig.QuickPlayData quickPlayData) {
    }
}

引用的其他类

  • TracyFrameCapture

    • 引用位置: 字段/构造调用
    • 关联成员: TracyFrameCapture()
  • GlBackend

    • 引用位置: 构造调用
    • 关联成员: GlBackend()
  • MainTarget

    • 引用位置: 构造调用
    • 关联成员: MainTarget()
  • RenderTarget

    • 引用位置: 字段/返回值
  • BackendOptions

    • 引用位置: 构造调用
    • 关联成员: BackendOptions()
  • ClientShutdownWatchdog

    • 引用位置: 方法调用
    • 关联成员: ClientShutdownWatchdog.startShutdownWatchdog()
  • FramerateLimitTracker

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: FramerateLimitTracker()
  • InputConstants

    • 引用位置: 方法调用
    • 关联成员: InputConstants.isKeyDown()
  • MessageBox

    • 引用位置: 方法调用
    • 关联成员: MessageBox.error()
  • TextInputManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: TextInputManager()
  • Window

    • 引用位置: 字段/方法调用/构造调用/返回值
    • 关联成员: Window(), Window.WindowInitFailed(), WindowInitFailed()
  • WindowEventHandler

    • 引用位置: 实现
  • GpuDebugOptions

    • 引用位置: 构造调用
    • 关联成员: GpuDebugOptions()
  • RenderSystem

    • 引用位置: 方法调用
    • 关联成员: RenderSystem.executePendingTasks(), RenderSystem.flipFrame(), RenderSystem.getBackendDescription(), RenderSystem.getDevice(), RenderSystem.getSamplerCache(), RenderSystem.initBackendSystem(), RenderSystem.initRenderer(), RenderSystem.pollEvents(), RenderSystem.setErrorCallback(), RenderSystem.setupDefaultState(), RenderSystem.tryGetDevice()
  • TimerQuery

    • 引用位置: 字段/方法调用
    • 关联成员: TimerQuery.getInstance()
  • Tesselator

    • 引用位置: 方法调用
    • 关联成员: Tesselator.init()
  • RealmsMainScreen

    • 引用位置: 构造调用
    • 关联成员: RealmsMainScreen()
  • RealmsClient

    • 引用位置: 方法调用
    • 关联成员: RealmsClient.getOrCreate()
  • RealmsDataFetcher

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: RealmsDataFetcher()
  • CrashReport

    • 引用位置: 参数/方法调用/构造调用/返回值
    • 关联成员: CrashReport(), CrashReport.forThrowable()
  • CrashReportCategory

    • 引用位置: 参数
  • Optionull

    • 引用位置: 方法调用
    • 关联成员: Optionull.map()
  • ReportedException

    • 引用位置: 构造调用
    • 关联成员: ReportedException()
  • SharedConstants

    • 引用位置: 方法调用
    • 关联成员: SharedConstants.getCurrentVersion()
  • SystemReport

    • 引用位置: 参数/构造调用/返回值
    • 关联成员: SystemReport()
  • CommandHistory

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: CommandHistory()
  • DeltaTracker

    • 引用位置: 字段/方法调用/构造调用/返回值
    • 关联成员: DeltaTracker.Timer(), Timer()
  • FramerateLimiter

    • 引用位置: 方法调用
    • 关联成员: FramerateLimiter.limitDisplayFPS()
  • GameNarrator

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: GameNarrator()
  • HotbarManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: HotbarManager()
  • InputType

    • 引用位置: 参数/字段/返回值
  • KeyMapping

    • 引用位置: 方法调用
    • 关联成员: KeyMapping.releaseAll(), KeyMapping.restoreToggleStatesOnScreenClosed()
  • KeyboardHandler

    • 引用位置: 字段/方法调用/构造调用
    • 关联成员: KeyboardHandler(), KeyboardHandler.submitPreeditEvent()
  • MouseHandler

    • 引用位置: 字段/构造调用
    • 关联成员: MouseHandler()
  • Options

    • 引用位置: 参数/字段/构造调用
    • 关联成员: Options()
  • PeriodicNotificationManager

    • 引用位置: 字段/构造调用
    • 关联成员: PeriodicNotificationManager()
  • ResourceLoadStateTracker

    • 引用位置: 字段/构造调用
    • 关联成员: ResourceLoadStateTracker()
  • Screenshot

    • 引用位置: 方法调用
    • 关联成员: Screenshot.grab()
  • User

    • 引用位置: 字段/返回值
  • BlockColors

    • 引用位置: 字段/方法调用/返回值
    • 关联成员: BlockColors.createDefault()
  • ClientMannequin

    • 引用位置: 方法调用
    • 关联成员: ClientMannequin.registerOverrides()
  • Font

    • 引用位置: 字段
  • Gui

    • 引用位置: 字段/构造调用
    • 关联成员: Gui()
  • ChatComponent

    • 引用位置: 参数
  • DebugScreenOverlay

    • 引用位置: 返回值
  • LogoRenderer

    • 引用位置: 构造调用
    • 关联成员: LogoRenderer()
  • DebugScreenEntryList

    • 引用位置: 字段/构造调用
    • 关联成员: DebugScreenEntryList()
  • GuiEventListener

    • 引用位置: 参数
  • SystemToast

    • 引用位置: 方法调用
    • 关联成员: SystemToast.addOrUpdate(), SystemToast.onLowDiskSpace()
  • ToastManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: ToastManager()
  • TutorialToast

    • 引用位置: 字段/构造调用
    • 关联成员: TutorialToast()
  • FontManager

    • 引用位置: 字段/构造调用
    • 关联成员: FontManager()
  • FreeTypeUtil

    • 引用位置: 方法调用
    • 关联成员: FreeTypeUtil.destroy()
  • AccessibilityOnboardingScreen

    • 引用位置: 构造调用
    • 关联成员: AccessibilityOnboardingScreen()
  • BanNoticeScreens

    • 引用位置: 方法调用
    • 关联成员: BanNoticeScreens.create(), BanNoticeScreens.createNameBan()
  • DeathScreen

    • 引用位置: 构造调用
    • 关联成员: DeathScreen()
  • GenericMessageScreen

    • 引用位置: 构造调用
    • 关联成员: GenericMessageScreen()
  • LevelLoadingScreen

    • 引用位置: 构造调用
    • 关联成员: LevelLoadingScreen()
  • LoadingOverlay

    • 引用位置: 方法调用/构造调用
    • 关联成员: LoadingOverlay(), LoadingOverlay.registerTextures()
  • MenuScreens

    • 引用位置: 方法调用
    • 关联成员: MenuScreens.selfTest()
  • OutOfMemoryScreen

    • 引用位置: 构造调用
    • 关联成员: OutOfMemoryScreen()
  • Overlay

    • 引用位置: 参数/字段/返回值
  • PauseScreen

    • 引用位置: 构造调用
    • 关联成员: PauseScreen()
  • ProgressScreen

    • 引用位置: 构造调用
    • 关联成员: ProgressScreen()
  • Screen

    • 引用位置: 参数/字段
  • TitleScreen

    • 引用位置: 方法调用/构造调用
    • 关联成员: TitleScreen(), TitleScreen.registerTextures()
  • AdvancementsScreen

    • 引用位置: 构造调用
    • 关联成员: AdvancementsScreen()
  • CreativeModeInventoryScreen

    • 引用位置: 方法调用
    • 关联成员: CreativeModeInventoryScreen.handleHotbarLoadOrSave()
  • InventoryScreen

    • 引用位置: 构造调用
    • 关联成员: InventoryScreen()
  • JoinMultiplayerScreen

    • 引用位置: 构造调用
    • 关联成员: JoinMultiplayerScreen()
  • PlayerSocialManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: PlayerSocialManager()
  • SocialInteractionsScreen

    • 引用位置: 构造调用
    • 关联成员: SocialInteractionsScreen()
  • WorldOpenFlows

    • 引用位置: 构造调用/返回值
    • 关联成员: WorldOpenFlows()
  • GameConfig

    • 引用位置: 参数
  • SilentInitException

    • 引用位置: 构造调用
    • 关联成员: SilentInitException()
  • EntityModelSet

    • 引用位置: 返回值
  • ClientHandshakePacketListenerImpl

    • 引用位置: 构造调用
    • 关联成员: ClientHandshakePacketListenerImpl()
  • ClientLevel

    • 引用位置: 参数/字段
  • ClientPacketListener

    • 引用位置: 返回值
  • LevelLoadTracker

    • 引用位置: 构造调用
    • 关联成员: LevelLoadTracker()
  • MultiPlayerGameMode

    • 引用位置: 字段
  • ProfileKeyPairManager

    • 引用位置: 字段/方法调用/返回值
    • 关联成员: ProfileKeyPairManager.create()
  • ServerData

    • 引用位置: 返回值
  • ChatAbilities

    • 引用位置: 方法调用/构造调用/返回值
    • 关联成员: Builder(), ChatAbilities.Builder()
  • ChatListener

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: ChatListener()
  • LoggedChatMessage

    • 引用位置: 方法调用
    • 关联成员: System.currentTimeMillis(), System.exit(), System.gc(), System.getProperty()
  • ReportEnvironment

    • 引用位置: 参数/方法调用
    • 关联成员: ReportEnvironment.local()
  • ReportingContext

    • 引用位置: 字段/方法调用/返回值
    • 关联成员: ReportingContext.create()
  • ParticleEngine

    • 引用位置: 字段/构造调用
    • 关联成员: ParticleEngine()
  • ParticleResources

    • 引用位置: 字段/构造调用
    • 关联成员: ParticleResources()
  • LocalPlayer

    • 引用位置: 字段
  • LocalPlayerResolver

    • 引用位置: 构造调用
    • 关联成员: LocalPlayerResolver()
  • ClientMetricsSamplersProvider

    • 引用位置: 构造调用
    • 关联成员: ClientMetricsSamplersProvider()
  • QuickPlay

    • 引用位置: 方法调用
    • 关联成员: QuickPlay.connect()
  • QuickPlayLog

    • 引用位置: 字段/方法调用/返回值
    • 关联成员: QuickPlayLog.of()
  • GameRenderer

    • 引用位置: 字段/构造调用
    • 关联成员: GameRenderer()
  • GpuWarnlistManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: GpuWarnlistManager()
  • LevelRenderer

    • 引用位置: 字段/构造调用
    • 关联成员: LevelRenderer()
  • MapRenderer

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: MapRenderer()
  • PlayerSkinRenderCache

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: PlayerSkinRenderCache()
  • RenderBuffers

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: RenderBuffers()
  • ShaderManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: ShaderManager()
  • BlockModelResolver

    • 引用位置: 字段/构造调用
    • 关联成员: BlockModelResolver()
  • BlockEntityRenderDispatcher

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: BlockEntityRenderDispatcher()
  • EntityRenderDispatcher

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: EntityRenderDispatcher()
  • EntityRenderers

    • 引用位置: 方法调用
    • 关联成员: EntityRenderers.validateRegistrations()
  • ItemModelResolver

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: ItemModelResolver()
  • SkinTextureDownloader

    • 引用位置: 构造调用
    • 关联成员: SkinTextureDownloader()
  • TextureManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: TextureManager()
  • ClientPackSource

    • 引用位置: 构造调用
    • 关联成员: ClientPackSource()
  • DryFoliageColorReloadListener

    • 引用位置: 构造调用
    • 关联成员: DryFoliageColorReloadListener()
  • FoliageColorReloadListener

    • 引用位置: 构造调用
    • 关联成员: FoliageColorReloadListener()
  • GrassColorReloadListener

    • 引用位置: 构造调用
    • 关联成员: GrassColorReloadListener()
  • MapTextureManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: MapTextureManager()
  • SkinManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: SkinManager()
  • SplashManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: SplashManager()
  • WaypointStyleManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: WaypointStyleManager()
  • I18n

    • 引用位置: 方法调用
    • 关联成员: I18n.get()
  • LanguageManager

    • 引用位置: 参数/字段/构造调用/返回值
    • 关联成员: LanguageManager()
  • EquipmentAssetManager

    • 引用位置: 构造调用
    • 关联成员: EquipmentAssetManager()
  • ModelManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: ModelManager()
  • AtlasManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: AtlasManager()
  • DownloadedPackSource

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: DownloadedPackSource()
  • IntegratedServer

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: IntegratedServer()
  • MusicManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: MusicManager()
  • SoundBufferLibrary

    • 引用位置: 方法调用/构造调用
    • 关联成员: Counter(), SoundBufferLibrary.DebugOutput.Counter()
  • SoundManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: SoundManager()
  • ClientTelemetryManager

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: ClientTelemetryManager()
  • Tutorial

    • 引用位置: 字段/方法调用/构造调用/返回值
    • 关联成员: Tutorial(), Tutorial.key()
  • Holder

    • 引用位置: 返回值
  • Gizmos

    • 引用位置: 方法调用/返回值
    • 关联成员: Gizmos.withCollector()
  • SimpleGizmoCollector

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: SimpleGizmoCollector()
  • Connection

    • 引用位置: 字段/方法调用
    • 关联成员: Connection.connectToLocalServer()
  • PacketProcessor

    • 引用位置: 字段/构造调用/返回值
    • 关联成员: PacketProcessor()
  • ClickEvent

    • 引用位置: 方法调用/构造调用
    • 关联成员: ClickEvent.OpenFile(), OpenFile()
  • Component

    • 引用位置: 参数/字段/方法调用/返回值
    • 关联成员: Component.literal(), Component.translatable()
  • KeybindResolver

    • 引用位置: 方法调用
    • 关联成员: KeybindResolver.setKeyResolver()
  • ServerboundPlayerActionPacket

    • 引用位置: 构造调用
    • 关联成员: ServerboundPlayerActionPacket()
  • ServerboundHelloPacket

    • 引用位置: 构造调用
    • 关联成员: ServerboundHelloPacket()
  • Identifier

    • 引用位置: 字段/方法调用
    • 关联成员: Identifier.withDefaultNamespace()
  • Bootstrap

    • 引用位置: 方法调用
    • 关联成员: Bootstrap.realStdoutPrintln(), Bootstrap.shutdownStdout()
  • MinecraftServer

    • 引用位置: 方法调用
    • 关联成员: MinecraftServer.spin()
  • Services

    • 引用位置: 字段/方法调用/返回值
    • 关联成员: Services.create()
  • WorldStem

    • 引用位置: 参数
  • Dialog

    • 引用位置: 返回值
  • LevelLoadListener

    • 引用位置: 方法调用
    • 关联成员: LevelLoadListener.compose()
  • LoggingLevelLoadListener

    • 引用位置: 方法调用
    • 关联成员: LoggingLevelLoadListener.forSingleplayer()
  • VanillaPackResources

    • 引用位置: 字段/返回值
  • FolderRepositorySource

    • 引用位置: 构造调用
    • 关联成员: FolderRepositorySource()
  • PackRepository

    • 引用位置: 参数/字段/方法调用/构造调用/返回值
    • 关联成员: PackRepository(), PackRepository.displayPackList()
  • ReloadableResourceManager

    • 引用位置: 字段/构造调用
    • 关联成员: ReloadableResourceManager()
  • ResourceManager

    • 引用位置: 返回值
  • Music

    • 引用位置: 返回值
  • FileUtil

    • 引用位置: 方法调用
    • 关联成员: FileUtil.findAvailableName()
  • FileZipper

    • 引用位置: 构造调用
    • 关联成员: FileZipper()
  • MemoryReserve

    • 引用位置: 方法调用
    • 关联成员: MemoryReserve.release()
  • ModCheck

    • 引用位置: 方法调用/返回值
    • 关联成员: ModCheck.identify()
  • Unit

    • 引用位置: 字段
  • Util

    • 引用位置: 方法调用
    • 关联成员: Util.backgroundExecutor(), Util.getFilenameFormattedDateTime(), Util.getMillis(), Util.getNanos(), Util.getPlatform(), Util.ifElse(), Util.ioPool(), Util.nonCriticalIoPool(), Util.shutdownExecutors(), Util.throwAsRuntime()
  • DataFixers

    • 引用位置: 方法调用
    • 关联成员: DataFixers.getDataFixer()
  • EventLogDirectory

    • 引用位置: 参数/字段
  • ContinuousProfiler

    • 引用位置: 字段/构造调用
    • 关联成员: ContinuousProfiler()
  • Profiler

    • 引用位置: 方法调用
    • 关联成员: Profiler.get(), Profiler.use()
  • ProfilerFiller

    • 引用位置: 方法调用/返回值
    • 关联成员: ProfilerFiller.combine()
  • SingleTickProfiler

    • 引用位置: 参数/方法调用
    • 关联成员: SingleTickProfiler.createTickProfiler(), SingleTickProfiler.decorateFiller()
  • ActiveMetricsRecorder

    • 引用位置: 方法调用
    • 关联成员: ActiveMetricsRecorder.createStarted()
  • MetricsRecorder

    • 引用位置: 字段
  • MetricsPersister

    • 引用位置: 构造调用
    • 关联成员: MetricsPersister()
  • ReentrantBlockableEventLoop

    • 引用位置: 继承
  • InteractionHand

    • 引用位置: 方法调用
    • 关联成员: InteractionHand.values()
  • Entity

    • 引用位置: 参数/字段/返回值
  • GameRules

    • 引用位置: 参数
  • LevelStorageSource

    • 引用位置: 参数/字段/方法调用/构造调用/返回值
    • 关联成员: LevelStorageSource(), LevelStorageSource.parseValidator()
  • DirectoryValidator

    • 引用位置: 字段/返回值
  • HitResult

    • 引用位置: 字段