Package net.minecraft.client
Class Minecraft
- All Implemented Interfaces:
AutoCloseable,Executor,IWindowEventListener,ISnooperInfo,ITaskExecutor<Runnable>,IForgeMinecraft
public class Minecraft
extends RecursiveEventLoop<Runnable>
implements ISnooperInfo, IWindowEventListener, IForgeMinecraft
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class(package private) static enum -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final booleanprivate final booleanstatic final ResourceLocationprivate final BlockColorsprivate final BlockRendererDispatcherbooleanbooleanprivate final DownloadingPackFinderprivate booleanprivate ServerDataprivate Stringfinal DebugRendererstatic final ResourceLocationprivate CrashReportprivate final booleanprivate final EntityRendererManagerprivate final com.mojang.datafixers.DataFixerfinal FontRendererprivate final FontResourceManagerprivate static intprivate final TimeTrackerprivate intprivate IProfileResultprivate intfinal FrameTimerprivate final MinecraftGamefinal Filefinal GameRendererprivate Threadprivate final GPUWarningfinal IngameGuiprivate final CreativeSettingsprivate static Minecraftprivate final booleanprivate booleanprivate final ItemColorsprivate final FirstPersonRendererprivate final ItemRendererfinal KeyboardListenerprivate final LanguageManagerprivate longprivate longprivate final Stringfinal WorldRendererprivate final SaveFormatprivate static final org.apache.logging.log4j.Loggerprivate final Framebufferprivate final com.mojang.authlib.minecraft.MinecraftSessionServiceprotected intprivate final PotionSpriteUploaderprivate final ModelManagerfinal MouseHelperprivate final MusicTickerbooleanstatic final booleanfinal GameSettingsprivate final PaintingSpriteUploaderfinal ParticleManagerprivate booleanprivate floatprivate NetworkManagerprivate CompletableFuture<Void>private final FilterManagerprivate final com.mojang.authlib.properties.PropertyMapprivate IProfilerprivate final AtomicReference<TrackingChunkStatusListener>private final Proxyprivate final RenderTypeBuffersstatic byte[]private static final CompletableFuture<Unit>private final IReloadableResourceManagerprivate final Fileprivate final ResourcePackListprivate intprivate booleanprivate final SearchTreeManagerprivate IntegratedServerprivate final SkinManagerbooleanprivate final Snooperprivate static final ITextComponentprivate final com.mojang.authlib.minecraft.SocialInteractionsServiceprivate TutorialToastprivate final SoundHandlerprivate final Splashesfinal TextureManagerprivate final Timerprivate final ToastGuiprivate final Tutorialstatic final ResourceLocationprivate final Sessionprivate final Stringprivate final VirtualScreenprivate final MainWindowprivate boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static Supplier<IResourcePack>adaptV3(Supplier<IResourcePack> p_228021_0_) private static Supplier<IResourcePack>adaptV4(Supplier<IResourcePack> p_228022_0_) addCustomNbtData(ItemStack p_184119_1_, TileEntity p_184119_2_) booleanbooleanprivate static booleanvoidvoidclearLevel(Screen p_213231_1_) voidclearResourcePacksOnError(Throwable p_243208_1_, ITextComponent p_243208_2_) voidclose()private voidcontinueAttack(boolean p_147115_1_) static voidcrash(CrashReport p_71377_0_) private static ResourcePackInfocreateClientPackAdapter(String p_228011_0_, boolean p_228011_1_, Supplier<IResourcePack> p_228011_2_, IResourcePack p_228011_3_, PackMetadataSection p_228011_4_, ResourcePackInfo.Priority p_228011_5_, IPackNameDecorator p_228011_6_) voidcreateLevel(String p_238192_1_, WorldSettings p_238192_2_, DynamicRegistries.Impl p_238192_3_, DimensionGeneratorSettings p_238192_4_) voidprivate com.mojang.authlib.minecraft.SocialInteractionsServicecreateSocialInteractions(com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService p_244735_1_, GameConfiguration p_244735_2_) private Stringvoid(package private) voiddebugFpsMeterKeyPress(int p_71383_1_) voiddelayCrash(CrashReport p_71404_1_) Deprecated.voiddestroy()private voiddisplayExperimentalConfirmationDialog(Minecraft.WorldSelectionType p_241559_1_, String p_241559_2_, boolean p_241559_3_, Runnable p_241559_4_) voidstatic voidfillReport(LanguageManager p_228009_0_, String p_228009_1_, GameSettings p_228009_2_, CrashReport p_228009_3_) fillReport(CrashReport p_71396_1_) private voidfinishProfilers(boolean p_238210_1_, LongTickDetector p_238210_2_) voidforceSetScreen(Screen p_241562_1_) private Stringfloatcom.mojang.datafixers.DataFixerprivate intfloatgetGame()static Minecraftcom.mojang.authlib.minecraft.MinecraftSessionServicecom.mojang.authlib.properties.PropertyMapgetProxy()protected Thread<T> IMutableSearchTree<T>getSearchTree(SearchTreeManager.Key<T> p_213253_1_) getTextureAtlas(ResourceLocation p_228015_1_) getUser()private voidbooleanbooleanis64Bit()booleanbooleanfinal booleanisDemo()booleanbooleanprivate booleanbooleanisPaused()booleanbooleanbooleanstatic DatapackCodecloadDataPacks(SaveFormat.LevelSave p_238180_0_) voidprivate voidloadWorld(String p_238195_1_, DynamicRegistries.Impl p_238195_2_, Function<SaveFormat.LevelSave, DatapackCodec> p_238195_3_, com.mojang.datafixers.util.Function4<SaveFormat.LevelSave, DynamicRegistries.Impl, IResourceManager, DatapackCodec, IServerConfiguration> p_238195_4_, boolean p_238195_5_, Minecraft.WorldSelectionType p_238195_6_, boolean creating) static IServerConfigurationloadWorldData(SaveFormat.LevelSave p_238181_0_, DynamicRegistries.Impl p_238181_1_, IResourceManager p_238181_2_, DatapackCodec p_238181_3_) makeServerStem(DynamicRegistries.Impl p_238189_1_, Function<SaveFormat.LevelSave, DatapackCodec> p_238189_2_, com.mojang.datafixers.util.Function4<SaveFormat.LevelSave, DynamicRegistries.Impl, IResourceManager, DatapackCodec, IServerConfiguration> p_238189_3_, boolean p_238189_4_, SaveFormat.LevelSave p_238189_5_) private voidonFullscreenError(int p_195545_1_, long p_195545_2_) private voidopenChatScreen(String p_238207_1_) voidpauseGame(boolean p_71385_1_) private voidvoidpopulateSnooper(Snooper p_70000_1_) Deprecated.private voidrenderFpsMeter(MatrixStack p_238183_1_, IProfileResult p_238183_2_) static booleanbooleanvoidprivate voidrollbackResourcePacks(Throwable p_229988_1_) voidrun()private voidrunTick(boolean p_195542_1_) (package private) voidselectMainFont(boolean p_238209_1_) private voidselfTest()voidsetCameraEntity(Entity p_175607_1_) voidsetConnectedToRealms(boolean p_181537_1_) voidsetCurrentServer(ServerData p_71351_1_) voidsetLevel(ClientWorld p_71403_1_) voidsetOverlay(LoadingGui p_213268_1_) voidvoidsetWindowActive(boolean p_213228_1_) booleanshouldEntityAppearGlowing(Entity p_238206_1_) private booleanprotected booleanbooleanprivate voidprivate voidstartProfilers(boolean p_238201_1_, LongTickDetector p_238201_2_) private voidvoidstop()voidtick()private voidupdateLevelInEngines(ClientWorld p_213257_1_) voidupdateMaxMipLevel(int p_228020_1_) private voidupdateScreenAndTick(Screen p_213241_1_) voidstatic booleanstatic booleanstatic booleanprotected RunnablewrapRunnable(Runnable p_212875_1_) Methods inherited from class net.minecraft.util.concurrent.RecursiveEventLoop
doRunTask, runningTask, scheduleExecutablesMethods inherited from class net.minecraft.util.concurrent.ThreadTaskExecutor
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, pollTask, runAllTasks, submit, submit, submitAsync, tell, waitForTasksMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraftforge.client.extensions.IForgeMinecraft
getSelf, popGuiLayer, pushGuiLayerMethods inherited from interface net.minecraft.util.concurrent.ITaskExecutor
ask, askEither
-
Field Details
-
instance
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ON_OSX
public static final boolean ON_OSX -
DEFAULT_FONT
-
UNIFORM_FONT
-
ALT_FONT
-
RESOURCE_RELOAD_INITIAL_TASK
-
SOCIAL_INTERACTIONS_NOT_AVAILABLE
-
resourcePackDirectory
-
profileProperties
private final com.mojang.authlib.properties.PropertyMap profileProperties -
textureManager
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
virtualScreen
-
window
-
timer
-
snooper
-
renderBuffers
-
levelRenderer
-
entityRenderDispatcher
-
itemRenderer
-
itemInHandRenderer
-
particleEngine
-
searchRegistry
-
user
-
font
-
gameRenderer
-
debugRenderer
-
progressListener
-
gui
-
options
-
hotbarManager
-
mouseHandler
-
keyboardHandler
-
gameDirectory
-
launchedVersion
-
versionType
-
proxy
-
levelSource
-
frameTimer
-
is64bit
private final boolean is64bit -
demo
private final boolean demo -
allowsMultiplayer
private final boolean allowsMultiplayer -
allowsChat
private final boolean allowsChat -
resourceManager
-
clientPackSource
-
resourcePackRepository
-
languageManager
-
blockColors
-
itemColors
-
mainRenderTarget
-
soundManager
-
musicManager
-
fontManager
-
splashManager
-
gpuWarnlistManager
-
minecraftSessionService
private final com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService -
skinManager
-
modelManager
-
blockRenderer
-
paintingTextures
-
mobEffectTextures
-
toast
-
game
-
tutorial
-
playerSocialManager
-
reserve
public static byte[] reserve -
gameMode
-
level
-
player
-
singleplayerServer
-
currentServer
-
pendingConnection
-
isLocalServer
private boolean isLocalServer -
cameraEntity
-
crosshairPickEntity
-
hitResult
-
rightClickDelay
private int rightClickDelay -
missTime
protected int missTime -
pause
private boolean pause -
pausePartialTick
private float pausePartialTick -
lastNanoTime
private long lastNanoTime -
lastTime
private long lastTime -
frames
private int frames -
noRender
public boolean noRender -
screen
-
overlay
-
connectedToRealms
private boolean connectedToRealms -
gameThread
-
running
private volatile boolean running -
delayedCrash
-
fps
private static int fps -
fpsString
-
chunkPath
public boolean chunkPath -
chunkVisibility
public boolean chunkVisibility -
smartCull
public boolean smartCull -
windowActive
private boolean windowActive -
progressTasks
-
pendingReload
-
socialInteractionsToast
-
profiler
-
fpsPieRenderTicks
private int fpsPieRenderTicks -
fpsPieProfiler
-
fpsPieResults
-
debugPath
-
-
Constructor Details
-
Minecraft
-
-
Method Details
-
updateTitle
public void updateTitle() -
createTitle
-
createSocialInteractions
private com.mojang.authlib.minecraft.SocialInteractionsService createSocialInteractions(com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService p_244735_1_, GameConfiguration p_244735_2_) -
isProbablyModded
public boolean isProbablyModded() -
rollbackResourcePacks
-
clearResourcePacksOnError
-
run
public void run() -
selectMainFont
void selectMainFont(boolean p_238209_1_) -
createSearchTrees
public void createSearchTrees() -
onFullscreenError
private void onFullscreenError(int p_195545_1_, long p_195545_2_) -
checkIs64Bit
private static boolean checkIs64Bit() -
getMainRenderTarget
-
getLaunchedVersion
-
getVersionType
-
delayCrash
-
crash
-
isEnforceUnicode
public boolean isEnforceUnicode() -
reloadResourcePacks
Deprecated. -
selfTest
private void selfTest() -
getLevelSource
-
openChatScreen
-
setScreen
-
setOverlay
-
destroy
public void destroy() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceITaskExecutor<Runnable>
-
runTick
private void runTick(boolean p_195542_1_) -
shouldRenderFpsPie
private boolean shouldRenderFpsPie() -
startProfilers
-
finishProfilers
-
resizeDisplay
public void resizeDisplay()- Specified by:
resizeDisplayin interfaceIWindowEventListener
-
cursorEntered
public void cursorEntered()- Specified by:
cursorEnteredin interfaceIWindowEventListener
-
getFramerateLimit
private int getFramerateLimit() -
emergencySave
public void emergencySave() -
debugFpsMeterKeyPress
void debugFpsMeterKeyPress(int p_71383_1_) -
renderFpsMeter
-
stop
public void stop() -
isRunning
public boolean isRunning() -
pauseGame
public void pauseGame(boolean p_71385_1_) -
continueAttack
private void continueAttack(boolean p_147115_1_) -
startAttack
private void startAttack() -
startUseItem
private void startUseItem() -
getMusicManager
-
tick
public void tick() -
isMultiplayerServer
private boolean isMultiplayerServer() -
handleKeybinds
private void handleKeybinds() -
loadDataPacks
-
loadWorldData
public static IServerConfiguration loadWorldData(SaveFormat.LevelSave p_238181_0_, DynamicRegistries.Impl p_238181_1_, IResourceManager p_238181_2_, DatapackCodec p_238181_3_) -
loadLevel
-
createLevel
public void createLevel(String p_238192_1_, WorldSettings p_238192_2_, DynamicRegistries.Impl p_238192_3_, DimensionGeneratorSettings p_238192_4_) -
loadWorld
private void loadWorld(String p_238195_1_, DynamicRegistries.Impl p_238195_2_, Function<SaveFormat.LevelSave, DatapackCodec> p_238195_3_, com.mojang.datafixers.util.Function4<SaveFormat.LevelSave, DynamicRegistries.Impl, IResourceManager, DatapackCodec, IServerConfiguration> p_238195_4_, boolean p_238195_5_, Minecraft.WorldSelectionType p_238195_6_, boolean creating) -
displayExperimentalConfirmationDialog
private void displayExperimentalConfirmationDialog(Minecraft.WorldSelectionType p_241559_1_, String p_241559_2_, boolean p_241559_3_, Runnable p_241559_4_) -
makeServerStem
public Minecraft.PackManager makeServerStem(DynamicRegistries.Impl p_238189_1_, Function<SaveFormat.LevelSave, DatapackCodec> p_238189_2_, com.mojang.datafixers.util.Function4<SaveFormat.LevelSave, throws InterruptedException, ExecutionExceptionDynamicRegistries.Impl, IResourceManager, DatapackCodec, IServerConfiguration> p_238189_3_, boolean p_238189_4_, SaveFormat.LevelSave p_238189_5_) -
setLevel
-
clearLevel
public void clearLevel() -
clearLevel
-
updateScreenAndTick
-
forceSetScreen
-
updateLevelInEngines
-
allowsMultiplayer
public boolean allowsMultiplayer() -
isBlocked
-
allowsChat
public boolean allowsChat() -
isDemo
public final boolean isDemo() -
getConnection
-
renderNames
public static boolean renderNames() -
useFancyGraphics
public static boolean useFancyGraphics() -
useShaderTransparency
public static boolean useShaderTransparency() -
useAmbientOcclusion
public static boolean useAmbientOcclusion() -
pickBlock
private void pickBlock() -
addCustomNbtData
-
fillReport
-
fillReport
public static void fillReport(@Nullable LanguageManager p_228009_0_, String p_228009_1_, @Nullable GameSettings p_228009_2_, CrashReport p_228009_3_) -
getInstance
-
delayTextureReload
Deprecated. -
populateSnooper
- Specified by:
populateSnooperin interfaceISnooperInfo
-
getCurrentSnooperAction
-
setCurrentServer
-
getCurrentServer
-
isLocalServer
public boolean isLocalServer() -
hasSingleplayerServer
public boolean hasSingleplayerServer() -
getSingleplayerServer
-
getSnooper
-
getUser
-
getProfileProperties
public com.mojang.authlib.properties.PropertyMap getProfileProperties() -
getProxy
-
getTextureManager
-
getResourceManager
-
getResourcePackRepository
-
getClientPackSource
-
getResourcePackDirectory
-
getLanguageManager
-
getTextureAtlas
-
is64Bit
public boolean is64Bit() -
isPaused
public boolean isPaused() -
getGpuWarnlistManager
-
getSoundManager
-
getSituationalMusic
-
getMinecraftSessionService
public com.mojang.authlib.minecraft.MinecraftSessionService getMinecraftSessionService() -
getSkinManager
-
getCameraEntity
-
setCameraEntity
-
shouldEntityAppearGlowing
-
getRunningThread
- Specified by:
getRunningThreadin classThreadTaskExecutor<Runnable>
-
wrapRunnable
- Specified by:
wrapRunnablein classThreadTaskExecutor<Runnable>
-
shouldRun
- Specified by:
shouldRunin classThreadTaskExecutor<Runnable>
-
getBlockRenderer
-
getEntityRenderDispatcher
-
getItemRenderer
-
getItemInHandRenderer
-
getSearchTree
-
getFrameTimer
-
isConnectedToRealms
public boolean isConnectedToRealms() -
setConnectedToRealms
public void setConnectedToRealms(boolean p_181537_1_) -
getFixerUpper
public com.mojang.datafixers.DataFixer getFixerUpper() -
getFrameTime
public float getFrameTime() -
getDeltaFrameTime
public float getDeltaFrameTime() -
getBlockColors
-
showOnlyReducedInfo
public boolean showOnlyReducedInfo() -
getToasts
-
getTutorial
-
isWindowActive
public boolean isWindowActive() -
getHotbarManager
-
getModelManager
-
getPaintingTextures
-
getMobEffectTextures
-
setWindowActive
public void setWindowActive(boolean p_213228_1_) - Specified by:
setWindowActivein interfaceIWindowEventListener
-
getProfiler
-
getGame
-
getSplashManager
-
getOverlay
-
getPlayerSocialManager
-
renderOnThread
public boolean renderOnThread() -
getWindow
-
renderBuffers
-
createClientPackAdapter
private static ResourcePackInfo createClientPackAdapter(String p_228011_0_, boolean p_228011_1_, Supplier<IResourcePack> p_228011_2_, IResourcePack p_228011_3_, PackMetadataSection p_228011_4_, ResourcePackInfo.Priority p_228011_5_, IPackNameDecorator p_228011_6_) -
adaptV3
-
adaptV4
-
updateMaxMipLevel
public void updateMaxMipLevel(int p_228020_1_) -
getItemColors
-
getSearchTreeManager
-
socialInteractionsService