Package net.minecraft.client
Class Minecraft
- java.lang.Object
-
- net.minecraft.util.concurrent.ThreadTaskExecutor<R>
-
- net.minecraft.util.concurrent.RecursiveEventLoop<java.lang.Runnable>
-
- net.minecraft.client.Minecraft
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,java.util.concurrent.Executor
,IWindowEventListener
,ISnooperInfo
,ITaskExecutor<java.lang.Runnable>
,IForgeMinecraft
public class Minecraft extends RecursiveEventLoop<java.lang.Runnable> implements ISnooperInfo, IWindowEventListener, IForgeMinecraft
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Minecraft.PackManager
(package private) static class
Minecraft.WorldSelectionType
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Minecraft(GameConfiguration p_i45547_1_)
-
Method Summary
-
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 Detail
-
instance
private static Minecraft instance
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
ON_OSX
public static final boolean ON_OSX
-
DEFAULT_FONT
public static final ResourceLocation DEFAULT_FONT
-
UNIFORM_FONT
public static final ResourceLocation UNIFORM_FONT
-
ALT_FONT
public static final ResourceLocation ALT_FONT
-
RESOURCE_RELOAD_INITIAL_TASK
private static final java.util.concurrent.CompletableFuture<Unit> RESOURCE_RELOAD_INITIAL_TASK
-
SOCIAL_INTERACTIONS_NOT_AVAILABLE
private static final ITextComponent SOCIAL_INTERACTIONS_NOT_AVAILABLE
-
resourcePackDirectory
private final java.io.File resourcePackDirectory
-
profileProperties
private final com.mojang.authlib.properties.PropertyMap profileProperties
-
textureManager
public final TextureManager textureManager
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper
-
virtualScreen
private final VirtualScreen virtualScreen
-
window
private final MainWindow window
-
timer
private final Timer timer
-
snooper
private final Snooper snooper
-
renderBuffers
private final RenderTypeBuffers renderBuffers
-
levelRenderer
public final WorldRenderer levelRenderer
-
entityRenderDispatcher
private final EntityRendererManager entityRenderDispatcher
-
itemRenderer
private final ItemRenderer itemRenderer
-
itemInHandRenderer
private final FirstPersonRenderer itemInHandRenderer
-
particleEngine
public final ParticleManager particleEngine
-
searchRegistry
private final SearchTreeManager searchRegistry
-
user
private final Session user
-
font
public final FontRenderer font
-
gameRenderer
public final GameRenderer gameRenderer
-
debugRenderer
public final DebugRenderer debugRenderer
-
progressListener
private final java.util.concurrent.atomic.AtomicReference<TrackingChunkStatusListener> progressListener
-
gui
public final IngameGui gui
-
options
public final GameSettings options
-
hotbarManager
private final CreativeSettings hotbarManager
-
mouseHandler
public final MouseHelper mouseHandler
-
keyboardHandler
public final KeyboardListener keyboardHandler
-
gameDirectory
public final java.io.File gameDirectory
-
launchedVersion
private final java.lang.String launchedVersion
-
versionType
private final java.lang.String versionType
-
proxy
private final java.net.Proxy proxy
-
levelSource
private final SaveFormat levelSource
-
frameTimer
public final FrameTimer frameTimer
-
is64bit
private final boolean is64bit
-
demo
private final boolean demo
-
allowsMultiplayer
private final boolean allowsMultiplayer
-
allowsChat
private final boolean allowsChat
-
resourceManager
private final IReloadableResourceManager resourceManager
-
clientPackSource
private final DownloadingPackFinder clientPackSource
-
resourcePackRepository
private final ResourcePackList resourcePackRepository
-
languageManager
private final LanguageManager languageManager
-
blockColors
private final BlockColors blockColors
-
itemColors
private final ItemColors itemColors
-
mainRenderTarget
private final Framebuffer mainRenderTarget
-
soundManager
private final SoundHandler soundManager
-
musicManager
private final MusicTicker musicManager
-
fontManager
private final FontResourceManager fontManager
-
splashManager
private final Splashes splashManager
-
gpuWarnlistManager
private final GPUWarning gpuWarnlistManager
-
minecraftSessionService
private final com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService
-
socialInteractionsService
private final com.mojang.authlib.minecraft.SocialInteractionsService socialInteractionsService
-
skinManager
private final SkinManager skinManager
-
modelManager
private final ModelManager modelManager
-
blockRenderer
private final BlockRendererDispatcher blockRenderer
-
paintingTextures
private final PaintingSpriteUploader paintingTextures
-
mobEffectTextures
private final PotionSpriteUploader mobEffectTextures
-
toast
private final ToastGui toast
-
game
private final MinecraftGame game
-
tutorial
private final Tutorial tutorial
-
playerSocialManager
private final FilterManager playerSocialManager
-
reserve
public static byte[] reserve
-
gameMode
@Nullable public PlayerController gameMode
-
level
@Nullable public ClientWorld level
-
player
@Nullable public ClientPlayerEntity player
-
singleplayerServer
@Nullable private IntegratedServer singleplayerServer
-
currentServer
@Nullable private ServerData currentServer
-
pendingConnection
@Nullable private NetworkManager pendingConnection
-
isLocalServer
private boolean isLocalServer
-
cameraEntity
@Nullable public Entity cameraEntity
-
crosshairPickEntity
@Nullable public Entity crosshairPickEntity
-
hitResult
@Nullable public RayTraceResult 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
@Nullable public Screen screen
-
overlay
@Nullable public LoadingGui overlay
-
connectedToRealms
private boolean connectedToRealms
-
gameThread
private java.lang.Thread gameThread
-
running
private volatile boolean running
-
delayedCrash
@Nullable private CrashReport delayedCrash
-
fps
private static int fps
-
fpsString
public java.lang.String fpsString
-
chunkPath
public boolean chunkPath
-
chunkVisibility
public boolean chunkVisibility
-
smartCull
public boolean smartCull
-
windowActive
private boolean windowActive
-
progressTasks
private final java.util.Queue<java.lang.Runnable> progressTasks
-
pendingReload
@Nullable private java.util.concurrent.CompletableFuture<java.lang.Void> pendingReload
-
socialInteractionsToast
@Nullable private TutorialToast socialInteractionsToast
-
profiler
private IProfiler profiler
-
fpsPieRenderTicks
private int fpsPieRenderTicks
-
fpsPieProfiler
private final TimeTracker fpsPieProfiler
-
fpsPieResults
@Nullable private IProfileResult fpsPieResults
-
debugPath
private java.lang.String debugPath
-
-
Constructor Detail
-
Minecraft
public Minecraft(GameConfiguration p_i45547_1_)
-
-
Method Detail
-
updateTitle
public void updateTitle()
-
createTitle
private java.lang.String 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
private void rollbackResourcePacks(java.lang.Throwable p_229988_1_)
-
clearResourcePacksOnError
public void clearResourcePacksOnError(java.lang.Throwable p_243208_1_, @Nullable ITextComponent p_243208_2_)
-
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
public Framebuffer getMainRenderTarget()
-
getLaunchedVersion
public java.lang.String getLaunchedVersion()
-
getVersionType
public java.lang.String getVersionType()
-
delayCrash
public void delayCrash(CrashReport p_71404_1_)
-
crash
public static void crash(CrashReport p_71377_0_)
-
isEnforceUnicode
public boolean isEnforceUnicode()
-
reloadResourcePacks
@Deprecated public java.util.concurrent.CompletableFuture<java.lang.Void> reloadResourcePacks()
Deprecated.
-
selfTest
private void selfTest()
-
getLevelSource
public SaveFormat getLevelSource()
-
openChatScreen
private void openChatScreen(java.lang.String p_238207_1_)
-
setScreen
public void setScreen(@Nullable Screen p_147108_1_)
-
setOverlay
public void setOverlay(@Nullable LoadingGui p_213268_1_)
-
destroy
public void destroy()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceITaskExecutor<java.lang.Runnable>
-
runTick
private void runTick(boolean p_195542_1_)
-
shouldRenderFpsPie
private boolean shouldRenderFpsPie()
-
startProfilers
private void startProfilers(boolean p_238201_1_, @Nullable LongTickDetector p_238201_2_)
-
finishProfilers
private void finishProfilers(boolean p_238210_1_, @Nullable LongTickDetector p_238210_2_)
-
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
private void renderFpsMeter(MatrixStack p_238183_1_, IProfileResult p_238183_2_)
-
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
public MusicTicker getMusicManager()
-
tick
public void tick()
-
isMultiplayerServer
private boolean isMultiplayerServer()
-
handleKeybinds
private void handleKeybinds()
-
loadDataPacks
public static DatapackCodec loadDataPacks(SaveFormat.LevelSave p_238180_0_)
-
loadWorldData
public static IServerConfiguration loadWorldData(SaveFormat.LevelSave p_238181_0_, DynamicRegistries.Impl p_238181_1_, IResourceManager p_238181_2_, DatapackCodec p_238181_3_)
-
loadLevel
public void loadLevel(java.lang.String p_238191_1_)
-
createLevel
public void createLevel(java.lang.String p_238192_1_, WorldSettings p_238192_2_, DynamicRegistries.Impl p_238192_3_, DimensionGeneratorSettings p_238192_4_)
-
loadWorld
private void loadWorld(java.lang.String p_238195_1_, DynamicRegistries.Impl p_238195_2_, java.util.function.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_, java.lang.String p_241559_2_, boolean p_241559_3_, java.lang.Runnable p_241559_4_)
-
makeServerStem
public Minecraft.PackManager makeServerStem(DynamicRegistries.Impl p_238189_1_, java.util.function.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_) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
- Throws:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
-
setLevel
public void setLevel(ClientWorld p_71403_1_)
-
clearLevel
public void clearLevel()
-
clearLevel
public void clearLevel(Screen p_213231_1_)
-
updateScreenAndTick
private void updateScreenAndTick(Screen p_213241_1_)
-
forceSetScreen
public void forceSetScreen(Screen p_241562_1_)
-
updateLevelInEngines
private void updateLevelInEngines(@Nullable ClientWorld p_213257_1_)
-
allowsMultiplayer
public boolean allowsMultiplayer()
-
isBlocked
public boolean isBlocked(java.util.UUID p_238198_1_)
-
allowsChat
public boolean allowsChat()
-
isDemo
public final boolean isDemo()
-
getConnection
@Nullable public ClientPlayNetHandler 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
public ItemStack addCustomNbtData(ItemStack p_184119_1_, TileEntity p_184119_2_)
-
fillReport
public CrashReport fillReport(CrashReport p_71396_1_)
-
fillReport
public static void fillReport(@Nullable LanguageManager p_228009_0_, java.lang.String p_228009_1_, @Nullable GameSettings p_228009_2_, CrashReport p_228009_3_)
-
getInstance
public static Minecraft getInstance()
-
delayTextureReload
@Deprecated public java.util.concurrent.CompletableFuture<java.lang.Void> delayTextureReload()
Deprecated.
-
populateSnooper
public void populateSnooper(Snooper p_70000_1_)
- Specified by:
populateSnooper
in interfaceISnooperInfo
-
getCurrentSnooperAction
private java.lang.String getCurrentSnooperAction()
-
setCurrentServer
public void setCurrentServer(@Nullable ServerData p_71351_1_)
-
getCurrentServer
@Nullable public ServerData getCurrentServer()
-
isLocalServer
public boolean isLocalServer()
-
hasSingleplayerServer
public boolean hasSingleplayerServer()
-
getSingleplayerServer
@Nullable public IntegratedServer getSingleplayerServer()
-
getSnooper
public Snooper getSnooper()
-
getUser
public Session getUser()
-
getProfileProperties
public com.mojang.authlib.properties.PropertyMap getProfileProperties()
-
getProxy
public java.net.Proxy getProxy()
-
getTextureManager
public TextureManager getTextureManager()
-
getResourceManager
public IResourceManager getResourceManager()
-
getResourcePackRepository
public ResourcePackList getResourcePackRepository()
-
getClientPackSource
public DownloadingPackFinder getClientPackSource()
-
getResourcePackDirectory
public java.io.File getResourcePackDirectory()
-
getLanguageManager
public LanguageManager getLanguageManager()
-
getTextureAtlas
public java.util.function.Function<ResourceLocation,TextureAtlasSprite> getTextureAtlas(ResourceLocation p_228015_1_)
-
is64Bit
public boolean is64Bit()
-
isPaused
public boolean isPaused()
-
getGpuWarnlistManager
public GPUWarning getGpuWarnlistManager()
-
getSoundManager
public SoundHandler getSoundManager()
-
getSituationalMusic
public BackgroundMusicSelector getSituationalMusic()
-
getMinecraftSessionService
public com.mojang.authlib.minecraft.MinecraftSessionService getMinecraftSessionService()
-
getSkinManager
public SkinManager getSkinManager()
-
getCameraEntity
@Nullable public Entity getCameraEntity()
-
setCameraEntity
public void setCameraEntity(Entity p_175607_1_)
-
shouldEntityAppearGlowing
public boolean shouldEntityAppearGlowing(Entity p_238206_1_)
-
getRunningThread
protected java.lang.Thread getRunningThread()
- Specified by:
getRunningThread
in classThreadTaskExecutor<java.lang.Runnable>
-
wrapRunnable
protected java.lang.Runnable wrapRunnable(java.lang.Runnable p_212875_1_)
- Specified by:
wrapRunnable
in classThreadTaskExecutor<java.lang.Runnable>
-
shouldRun
protected boolean shouldRun(java.lang.Runnable p_212874_1_)
- Specified by:
shouldRun
in classThreadTaskExecutor<java.lang.Runnable>
-
getBlockRenderer
public BlockRendererDispatcher getBlockRenderer()
-
getEntityRenderDispatcher
public EntityRendererManager getEntityRenderDispatcher()
-
getItemRenderer
public ItemRenderer getItemRenderer()
-
getItemInHandRenderer
public FirstPersonRenderer getItemInHandRenderer()
-
getSearchTree
public <T> IMutableSearchTree<T> getSearchTree(SearchTreeManager.Key<T> p_213253_1_)
-
getFrameTimer
public FrameTimer 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
public BlockColors getBlockColors()
-
showOnlyReducedInfo
public boolean showOnlyReducedInfo()
-
getToasts
public ToastGui getToasts()
-
getTutorial
public Tutorial getTutorial()
-
isWindowActive
public boolean isWindowActive()
-
getHotbarManager
public CreativeSettings getHotbarManager()
-
getModelManager
public ModelManager getModelManager()
-
getPaintingTextures
public PaintingSpriteUploader getPaintingTextures()
-
getMobEffectTextures
public PotionSpriteUploader getMobEffectTextures()
-
setWindowActive
public void setWindowActive(boolean p_213228_1_)
- Specified by:
setWindowActive
in interfaceIWindowEventListener
-
getProfiler
public IProfiler getProfiler()
-
getGame
public MinecraftGame getGame()
-
getSplashManager
public Splashes getSplashManager()
-
getOverlay
@Nullable public LoadingGui getOverlay()
-
getPlayerSocialManager
public FilterManager getPlayerSocialManager()
-
renderOnThread
public boolean renderOnThread()
-
getWindow
public MainWindow getWindow()
-
renderBuffers
public RenderTypeBuffers renderBuffers()
-
createClientPackAdapter
private static ResourcePackInfo createClientPackAdapter(java.lang.String p_228011_0_, boolean p_228011_1_, java.util.function.Supplier<IResourcePack> p_228011_2_, IResourcePack p_228011_3_, PackMetadataSection p_228011_4_, ResourcePackInfo.Priority p_228011_5_, IPackNameDecorator p_228011_6_)
-
adaptV3
private static java.util.function.Supplier<IResourcePack> adaptV3(java.util.function.Supplier<IResourcePack> p_228021_0_)
-
adaptV4
private static java.util.function.Supplier<IResourcePack> adaptV4(java.util.function.Supplier<IResourcePack> p_228022_0_)
-
updateMaxMipLevel
public void updateMaxMipLevel(int p_228020_1_)
-
getItemColors
public ItemColors getItemColors()
-
getSearchTreeManager
public SearchTreeManager getSearchTreeManager()
-
-