Package net.minecraft.client
Class MinecraftClient
- All Implemented Interfaces:
AutoCloseable,Executor,WindowEventHandler,SnooperListener,MessageListener<Runnable>
@Environment(CLIENT) public class MinecraftClient extends ReentrantThreadExecutor<Runnable> implements SnooperListener, WindowEventHandler
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMinecraftClient.IntegratedResourceManager(package private) static classMinecraftClient.WorldLoadAction -
Field Summary
-
Constructor Summary
Constructors Constructor Description MinecraftClient(RunArgs args) -
Method Summary
Methods inherited from class net.minecraft.util.thread.ReentrantThreadExecutor
executeTask, hasRunningTasks, shouldExecuteAsyncMethods inherited from class net.minecraft.util.thread.ThreadExecutor
cancelTasks, execute, getName, getTaskCount, isOnThread, runTask, runTasks, runTasks, send, submit, submit, submitAndJoin, waitForTasks
-
Field Details
-
instance
-
LOGGER
-
IS_SYSTEM_MAC
public static final boolean IS_SYSTEM_MAC -
DEFAULT_FONT_ID
-
UNICODE_FONT_ID
-
ALT_TEXT_RENDERER_ID
-
COMPLETED_UNIT_FUTURE
-
memoryReservedForCrash
public static byte[] memoryReservedForCrash -
currentFps
private static int currentFps -
resourcePackDir
-
sessionPropertyMap
private final com.mojang.authlib.properties.PropertyMap sessionPropertyMap -
textureManager
-
dataFixer
private final com.mojang.datafixers.DataFixer dataFixer -
windowProvider
-
window
-
renderTickCounter
-
snooper
-
bufferBuilders
-
worldRenderer
-
entityRenderDispatcher
-
itemRenderer
-
heldItemRenderer
-
particleManager
-
searchManager
-
session
-
textRenderer
-
gameRenderer
-
debugRenderer
-
worldGenProgressTracker
-
inGameHud
-
options
-
creativeHotbarStorage
-
mouse
-
keyboard
-
runDirectory
-
gameVersion
-
versionType
-
netProxy
-
levelStorage
-
metricsData
-
is64Bit
private final boolean is64Bit -
isDemo
private final boolean isDemo -
multiplayerEnabled
private final boolean multiplayerEnabled -
onlineChatEnabled
private final boolean onlineChatEnabled -
resourceManager
-
builtinPackProvider
-
resourcePackManager
-
languageManager
-
blockColors
-
itemColors
-
framebuffer
-
soundManager
-
musicTracker
-
fontManager
-
splashTextLoader
-
field_25671
-
sessionService
private final com.mojang.authlib.minecraft.MinecraftSessionService sessionService -
skinProvider
-
bakedModelManager
-
blockRenderManager
-
paintingManager
-
statusEffectSpriteManager
-
toastManager
-
game
-
tutorialManager
-
interactionManager
-
world
-
player
-
server
-
currentServerEntry
-
connection
-
isIntegratedServerRunning
private boolean isIntegratedServerRunning -
cameraEntity
-
targetedEntity
-
crosshairTarget
-
itemUseCooldown
private int itemUseCooldown -
attackCooldown
protected int attackCooldown -
paused
private boolean paused -
pausedTickDelta
private float pausedTickDelta -
lastMetricsSampleTime
private long lastMetricsSampleTime -
nextDebugInfoUpdateTime
private long nextDebugInfoUpdateTime -
fpsCounter
private int fpsCounter -
skipGameRender
public boolean skipGameRender -
currentScreen
-
overlay
-
connectedToRealms
private boolean connectedToRealms -
thread
-
running
private volatile boolean running -
crashReport
-
fpsDebugString
-
debugChunkInfo
public boolean debugChunkInfo -
debugChunkOcculsion
public boolean debugChunkOcculsion -
chunkCullingEnabled
public boolean chunkCullingEnabled -
windowFocused
private boolean windowFocused -
renderTaskQueue
-
resourceReloadFuture
-
profiler
-
trackingTick
private int trackingTick -
tickTimeTracker
-
tickProfilerResult
-
openProfilerSection
-
-
Constructor Details
-
Method Details
-
updateWindowTitle
public void updateWindowTitle() -
getWindowTitle
-
isModded
public boolean isModded()Checks if this client is modded.This checks the client's brand and if the MinecraftClient's class is still signed.
-
handleResourceReloadExecption
-
run
public void run() -
initFont
void initFont(boolean forcesUnicode) -
initializeSearchableContainers
private void initializeSearchableContainers() -
handleGlErrorByDisableVsync
private void handleGlErrorByDisableVsync(int error, long description) -
checkIs64Bit
private static boolean checkIs64Bit() -
getFramebuffer
-
getGameVersion
-
getVersionType
-
setCrashReport
-
printCrashReport
-
forcesUnicodeFont
public boolean forcesUnicodeFont() -
reloadResources
-
checkGameData
private void checkGameData() -
getLevelStorage
-
method_29041
-
openScreen
-
setOverlay
-
stop
public void stop() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceMessageListener<Runnable>
-
render
private void render(boolean tick) -
shouldMonitorTickDuration
private boolean shouldMonitorTickDuration() -
startMonitor
-
endMonitor
-
onResolutionChanged
public void onResolutionChanged()- Specified by:
onResolutionChangedin interfaceWindowEventHandler
-
method_30133
public void method_30133()- Specified by:
method_30133in interfaceWindowEventHandler
-
getFramerateLimit
private int getFramerateLimit() -
cleanUpAfterCrash
public void cleanUpAfterCrash() -
handleProfilerKeyPress
void handleProfilerKeyPress(int digit) -
drawProfilerResults
-
scheduleStop
public void scheduleStop() -
isRunning
public boolean isRunning() -
openPauseMenu
public void openPauseMenu(boolean pause) -
handleBlockBreaking
private void handleBlockBreaking(boolean bool) -
doAttack
private void doAttack() -
doItemUse
private void doItemUse() -
getMusicTracker
-
tick
public void tick() -
handleInputEvents
private void handleInputEvents() -
method_29598
-
createSaveProperties
public static SaveProperties createSaveProperties(LevelStorage.Session session, RegistryTracker.Modifiable registryTracker, ResourceManager resourceManager, DataPackSettings dataPackSettings) -
startIntegratedServer
-
method_29607
public void method_29607(String worldName, LevelInfo levelInfo, RegistryTracker.Modifiable registryTracker, GeneratorOptions generatorOptions) -
startIntegratedServer
private void startIntegratedServer(String worldName, RegistryTracker.Modifiable registryTracker, Function<LevelStorage.Session,DataPackSettings> function, com.mojang.datafixers.util.Function4<LevelStorage.Session,RegistryTracker.Modifiable,ResourceManager,DataPackSettings,SaveProperties> function4, boolean safemode, MinecraftClient.WorldLoadAction worldLoadAction) -
method_29601
private void method_29601(MinecraftClient.WorldLoadAction worldLoadAction, String string, boolean bool, Runnable runnable) -
method_29604
public MinecraftClient.IntegratedResourceManager method_29604(RegistryTracker.Modifiable modifiable, Function<LevelStorage.Session,DataPackSettings> function, com.mojang.datafixers.util.Function4<LevelStorage.Session,RegistryTracker.Modifiable,ResourceManager,DataPackSettings,SaveProperties> function4, boolean bool, LevelStorage.Session session) -
joinWorld
-
disconnect
public void disconnect() -
disconnect
-
reset
-
method_29970
-
setWorld
-
isMultiplayerEnabled
public boolean isMultiplayerEnabled() -
shouldBlockMessages
Checks if the client should block messages from thesender.If true, messages will not be displayed in chat and narrator will not process them.
-
isOnlineChatEnabled
public boolean isOnlineChatEnabled() -
isDemo
public final boolean isDemo() -
getNetworkHandler
-
isHudEnabled
public static boolean isHudEnabled() -
isFancyGraphicsOrBetter
public static boolean isFancyGraphicsOrBetter() -
isFabulousGraphicsOrBetter
public static boolean isFabulousGraphicsOrBetter() -
isAmbientOcclusionEnabled
public static boolean isAmbientOcclusionEnabled() -
doItemPick
private void doItemPick() -
addBlockEntityNbt
-
addDetailsToCrashReport
-
addSystemDetailsToCrashReport
public static void addSystemDetailsToCrashReport(@Nullable LanguageManager languageManager, String version, @Nullable GameOptions options, CrashReport report) -
getInstance
-
reloadResourcesConcurrently
-
addSnooperInfo
- Specified by:
addSnooperInfoin interfaceSnooperListener
-
getCurrentAction
-
setCurrentServerEntry
-
getCurrentServerEntry
-
isInSingleplayer
public boolean isInSingleplayer() -
isIntegratedServerRunning
public boolean isIntegratedServerRunning() -
getServer
Gets this client's own integrated server.The integrated server is only present when a local single player world is open.
-
getSnooper
-
getSession
-
getSessionProperties
public com.mojang.authlib.properties.PropertyMap getSessionProperties() -
getNetworkProxy
-
getTextureManager
-
getResourceManager
-
getResourcePackManager
-
getResourcePackDownloader
-
getResourcePackDir
-
getLanguageManager
-
getSpriteAtlas
-
is64Bit
public boolean is64Bit() -
isPaused
public boolean isPaused() -
method_30049
-
getSoundManager
-
getMusicType
-
getSessionService
public com.mojang.authlib.minecraft.MinecraftSessionService getSessionService() -
getSkinProvider
-
getCameraEntity
-
setCameraEntity
-
method_27022
-
getThread
- Specified by:
getThreadin classThreadExecutor<Runnable>
-
createTask
- Specified by:
createTaskin classThreadExecutor<Runnable>
-
canExecute
- Specified by:
canExecutein classThreadExecutor<Runnable>
-
getBlockRenderManager
-
getEntityRenderManager
-
getItemRenderer
-
getHeldItemRenderer
-
getSearchableContainer
-
getMetricsData
-
isConnectedToRealms
public boolean isConnectedToRealms() -
setConnectedToRealms
public void setConnectedToRealms(boolean connectedToRealms) -
getDataFixer
public com.mojang.datafixers.DataFixer getDataFixer() -
getTickDelta
public float getTickDelta() -
getLastFrameDuration
public float getLastFrameDuration() -
getBlockColors
-
hasReducedDebugInfo
public boolean hasReducedDebugInfo() -
getToastManager
-
getTutorialManager
-
isWindowFocused
public boolean isWindowFocused() -
getCreativeHotbarStorage
-
getBakedModelManager
-
getPaintingManager
-
getStatusEffectSpriteManager
-
onWindowFocusChanged
public void onWindowFocusChanged(boolean focused)- Specified by:
onWindowFocusChangedin interfaceWindowEventHandler
-
getProfiler
-
getGame
-
getSplashTextLoader
-
getOverlay
-
shouldRenderAsync
public boolean shouldRenderAsync() -
getWindow
-
getBufferBuilders
-
createResourcePackProfile
private static ClientResourcePackProfile createResourcePackProfile(String string, boolean bool, Supplier<ResourcePack> supplier, ResourcePack resourcePack, PackResourceMetadata packResourceMetadata, ResourcePackProfile.InsertionPosition insertionPosition, ResourcePackSource resourcePackSource) -
createV3ResoucePackFactory
-
createV4ResourcePackFactory
-
resetMipmapLevels
public void resetMipmapLevels(int mipmapLevels)
-