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
Modifier and TypeClassDescriptionstatic final class
(package private) static enum
-
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
private final boolean
static final ResourceLocation
private final BlockColors
private final BlockRendererDispatcher
boolean
boolean
private final DownloadingPackFinder
private boolean
private ServerData
private String
final DebugRenderer
static final ResourceLocation
private CrashReport
private final boolean
private final EntityRendererManager
private final com.mojang.datafixers.DataFixer
final FontRenderer
private final FontResourceManager
private static int
private final TimeTracker
private int
private IProfileResult
private int
final FrameTimer
private final MinecraftGame
final File
final GameRenderer
private Thread
private final GPUWarning
final IngameGui
private final CreativeSettings
private static Minecraft
private final boolean
private boolean
private final ItemColors
private final FirstPersonRenderer
private final ItemRenderer
final KeyboardListener
private final LanguageManager
private long
private long
private final String
final WorldRenderer
private final SaveFormat
private static final org.apache.logging.log4j.Logger
private final Framebuffer
private final com.mojang.authlib.minecraft.MinecraftSessionService
protected int
private final PotionSpriteUploader
private final ModelManager
final MouseHelper
private final MusicTicker
boolean
static final boolean
final GameSettings
private final PaintingSpriteUploader
final ParticleManager
private boolean
private float
private NetworkManager
private CompletableFuture<Void>
private final FilterManager
private final com.mojang.authlib.properties.PropertyMap
private IProfiler
private final AtomicReference<TrackingChunkStatusListener>
private final Proxy
private final RenderTypeBuffers
static byte[]
private static final CompletableFuture<Unit>
private final IReloadableResourceManager
private final File
private final ResourcePackList
private int
private boolean
private final SearchTreeManager
private IntegratedServer
private final SkinManager
boolean
private final Snooper
private static final ITextComponent
private final com.mojang.authlib.minecraft.SocialInteractionsService
private TutorialToast
private final SoundHandler
private final Splashes
final TextureManager
private final Timer
private final ToastGui
private final Tutorial
static final ResourceLocation
private final Session
private final String
private final VirtualScreen
private final MainWindow
private boolean
-
Constructor Summary
-
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_) boolean
boolean
private static boolean
void
void
clearLevel
(Screen p_213231_1_) void
clearResourcePacksOnError
(Throwable p_243208_1_, ITextComponent p_243208_2_) void
close()
private void
continueAttack
(boolean p_147115_1_) static void
crash
(CrashReport p_71377_0_) 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_) void
createLevel
(String p_238192_1_, WorldSettings p_238192_2_, DynamicRegistries.Impl p_238192_3_, DimensionGeneratorSettings p_238192_4_) void
private com.mojang.authlib.minecraft.SocialInteractionsService
createSocialInteractions
(com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService p_244735_1_, GameConfiguration p_244735_2_) private String
void
(package private) void
debugFpsMeterKeyPress
(int p_71383_1_) void
delayCrash
(CrashReport p_71404_1_) Deprecated.void
destroy()
private void
displayExperimentalConfirmationDialog
(Minecraft.WorldSelectionType p_241559_1_, String p_241559_2_, boolean p_241559_3_, Runnable p_241559_4_) void
static void
fillReport
(LanguageManager p_228009_0_, String p_228009_1_, GameSettings p_228009_2_, CrashReport p_228009_3_) fillReport
(CrashReport p_71396_1_) private void
finishProfilers
(boolean p_238210_1_, LongTickDetector p_238210_2_) void
forceSetScreen
(Screen p_241562_1_) private String
float
com.mojang.datafixers.DataFixer
private int
float
getGame()
static Minecraft
com.mojang.authlib.minecraft.MinecraftSessionService
com.mojang.authlib.properties.PropertyMap
getProxy()
protected Thread
<T> IMutableSearchTree<T>
getSearchTree
(SearchTreeManager.Key<T> p_213253_1_) getTextureAtlas
(ResourceLocation p_228015_1_) getUser()
private void
boolean
boolean
is64Bit()
boolean
boolean
final boolean
isDemo()
boolean
boolean
private boolean
boolean
isPaused()
boolean
boolean
boolean
static DatapackCodec
loadDataPacks
(SaveFormat.LevelSave p_238180_0_) void
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) static IServerConfiguration
loadWorldData
(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 void
onFullscreenError
(int p_195545_1_, long p_195545_2_) private void
openChatScreen
(String p_238207_1_) void
pauseGame
(boolean p_71385_1_) private void
void
populateSnooper
(Snooper p_70000_1_) Deprecated.private void
renderFpsMeter
(MatrixStack p_238183_1_, IProfileResult p_238183_2_) static boolean
boolean
void
private void
rollbackResourcePacks
(Throwable p_229988_1_) void
run()
private void
runTick
(boolean p_195542_1_) (package private) void
selectMainFont
(boolean p_238209_1_) private void
selfTest()
void
setCameraEntity
(Entity p_175607_1_) void
setConnectedToRealms
(boolean p_181537_1_) void
setCurrentServer
(ServerData p_71351_1_) void
setLevel
(ClientWorld p_71403_1_) void
setOverlay
(LoadingGui p_213268_1_) void
void
setWindowActive
(boolean p_213228_1_) boolean
shouldEntityAppearGlowing
(Entity p_238206_1_) private boolean
protected boolean
boolean
private void
private void
startProfilers
(boolean p_238201_1_, LongTickDetector p_238201_2_) private void
void
stop()
void
tick()
private void
updateLevelInEngines
(ClientWorld p_213257_1_) void
updateMaxMipLevel
(int p_228020_1_) private void
updateScreenAndTick
(Screen p_213241_1_) void
static boolean
static boolean
static boolean
protected Runnable
wrapRunnable
(Runnable p_212875_1_) Methods inherited from class net.minecraft.util.concurrent.RecursiveEventLoop
doRunTask, runningTask, scheduleExecutables
Methods inherited from class net.minecraft.util.concurrent.ThreadTaskExecutor
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, pollTask, runAllTasks, submit, submit, submitAsync, tell, waitForTasks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraftforge.client.extensions.IForgeMinecraft
getSelf, popGuiLayer, pushGuiLayer
Methods 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:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceITaskExecutor<Runnable>
-
runTick
private void runTick(boolean p_195542_1_) -
shouldRenderFpsPie
private boolean shouldRenderFpsPie() -
startProfilers
-
finishProfilers
-
resizeDisplay
public void resizeDisplay()- Specified by:
resizeDisplay
in interfaceIWindowEventListener
-
cursorEntered
public void cursorEntered()- Specified by:
cursorEntered
in 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:
populateSnooper
in 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:
getRunningThread
in classThreadTaskExecutor<Runnable>
-
wrapRunnable
- Specified by:
wrapRunnable
in classThreadTaskExecutor<Runnable>
-
shouldRun
- Specified by:
shouldRun
in 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:
setWindowActive
in 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