Package net.minecraft.client
Class Minecraft
- All Implemented Interfaces:
WindowEventHandler
,AutoCloseable
,Executor
,ProfilerMeasured
,ProcessorHandle<Runnable>
,SnooperPopulator
,IForgeMinecraft
public class Minecraft
extends ReentrantBlockableEventLoop<Runnable>
implements SnooperPopulator, WindowEventHandler, IForgeMinecraft
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
(package private) static class
static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private boolean
static ResourceLocation
private BlockColors
private BlockEntityRenderDispatcher
private BlockRenderDispatcher
boolean
boolean
private ClientPackSource
private boolean
private ServerData
private String
static ResourceLocation
private CrashReport
private boolean
private EntityModelSet
private EntityRenderDispatcher
private com.mojang.datafixers.DataFixer
private FontManager
private static int
private ContinuousProfiler
private int
private ProfileResults
private int
private Game
private Thread
private GpuWarnlistManager
private HotbarManager
private static Minecraft
private boolean
private boolean
private ItemColors
private ItemInHandRenderer
private ItemRenderer
private LanguageManager
private long
private long
private String
private LevelStorageSource
private static org.apache.logging.log4j.Logger
private RenderTarget
private static int
private MetricsRecorder
private com.mojang.authlib.minecraft.MinecraftSessionService
protected int
private MobEffectTextureManager
private ModelManager
private MusicManager
boolean
static boolean
private Overlay
private PaintingTextureManager
private boolean
private float
private Connection
private CompletableFuture<Void>
private PlayerSocialManager
private com.mojang.authlib.properties.PropertyMap
private ProfilerFiller
private Proxy
private ResourceLoadStateTracker
private RenderBuffers
private static CompletableFuture<Unit>
private ReloadableResourceManager
private File
private PackRepository
private int
private boolean
private SearchRegistry
private IntegratedServer
private SkinManager
boolean
private Snooper
private static Component
private com.mojang.authlib.minecraft.SocialInteractionsService
private TutorialToast
private SoundManager
private SplashManager
private Timer
private ToastComponent
private Tutorial
static ResourceLocation
static String
private User
private String
private VirtualScreen
private Window
private boolean
boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static Supplier<PackResources>
adaptV3(Supplier<PackResources> p_91331_)
private static Supplier<PackResources>
adaptV4(Supplier<PackResources> p_91353_)
addCustomNbtData(ItemStack p_91123_, BlockEntity p_91124_)
boolean
boolean
private Path
archiveProfilingReport(SystemReport p_167857_, List<Path> p_167858_)
private static boolean
void
void
clearLevel(Screen p_91321_)
void
clearResourcePacksOnError(Throwable p_91242_, Component p_91243_)
void
close()
private ProfilerFiller
constructProfiler(boolean p_167971_, SingleTickProfiler p_167972_)
private void
continueAttack(boolean p_91387_)
static void
crash(CrashReport p_91333_)
private static Pack
createClientPackAdapter(String p_167934_, Component p_167935_, boolean p_167936_, Supplier<PackResources> p_167937_, PackMetadataSection p_167938_, Pack.Position p_167939_, PackSource p_167940_, boolean hidden)
void
createLevel(String p_91203_, LevelSettings p_91204_, RegistryAccess.RegistryHolder p_91205_, WorldGenSettings p_91206_)
void
private com.mojang.authlib.minecraft.SocialInteractionsService
createSocialInteractions(com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService p_91131_, GameConfig p_91132_)
private String
void
boolean
debugClientMetricsStart(Consumer<TranslatableComponent> p_167947_)
private void
void
debugFpsMeterKeyPress(int p_91112_)
void
delayCrash(CrashReport p_91254_)
void
destroy()
private void
displayExperimentalConfirmationDialog(Minecraft.ExperimentalDialogType p_91144_, String p_91145_, boolean p_91146_, Runnable p_91147_)
private void
doLoadLevel(String p_91220_, RegistryAccess.RegistryHolder p_91221_, Function<LevelStorageSource.LevelStorageAccess,DataPackConfig> p_91222_, com.mojang.datafixers.util.Function4<LevelStorageSource.LevelStorageAccess,RegistryAccess.RegistryHolder,ResourceManager,DataPackConfig,WorldData> p_91223_, boolean p_91224_, Minecraft.ExperimentalDialogType p_91225_, boolean creating)
void
static void
fillReport(Minecraft p_167873_, LanguageManager p_167874_, String p_167875_, Options p_167876_, CrashReport p_167877_)
fillReport(CrashReport p_91355_)
private static SystemReport
fillSystemReport(SystemReport p_167851_, Minecraft p_167852_, LanguageManager p_167853_, String p_167854_, Options p_167855_)
private void
finishProfilers(boolean p_91339_, SingleTickProfiler p_91340_)
void
forceSetScreen(Screen p_91347_)
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> MutableSearchTree<T>
getSearchTree(SearchRegistry.Key<T> p_91172_)
getTextureAtlas(ResourceLocation p_91259_)
getUser()
private Component
grabHugeScreenshot(File p_167904_, int p_167905_, int p_167906_, int p_167907_, int p_167908_)
grabPanoramixScreenshot(File p_167900_, int p_167901_, int p_167902_)
private void
boolean
boolean
is64Bit()
boolean
boolean
boolean
isDemo()
boolean
boolean
private boolean
boolean
isPaused()
boolean
boolean
boolean
boolean
boolean
static DataPackConfig
void
static WorldData
loadWorldData(LevelStorageSource.LevelStorageAccess p_91136_, RegistryAccess.RegistryHolder p_91137_, ResourceManager p_91138_, DataPackConfig p_91139_)
makeServerStem(RegistryAccess.RegistryHolder p_91191_, Function<LevelStorageSource.LevelStorageAccess,DataPackConfig> p_91192_, com.mojang.datafixers.util.Function4<LevelStorageSource.LevelStorageAccess,RegistryAccess.RegistryHolder,ResourceManager,DataPackConfig,WorldData> p_91193_, boolean p_91194_, LevelStorageSource.LevelStorageAccess p_91195_)
private void
onFullscreenError(int p_91114_, long p_91115_)
private void
openChatScreen(String p_91327_)
void
pauseGame(boolean p_91359_)
private void
void
populateSnooper(Snooper p_91117_)
void
populateSnooperInitial(Snooper p_167985_)
private static void
populateSnooperWithOpenGL(Snooper p_168002_)
private CompletableFuture<Void>
reloadResourcePacks(boolean p_168020_)
private void
renderFpsMeter(PoseStack p_91141_, ProfileResults p_91142_)
static boolean
boolean
void
private void
rollbackResourcePacks(Throwable p_91240_)
void
run()
private void
runTick(boolean p_91384_)
(package private) void
selectMainFont(boolean p_91337_)
private void
selfTest()
void
setCameraEntity(Entity p_91119_)
void
setConnectedToRealms(boolean p_91373_)
void
setCurrentServer(ServerData p_91159_)
void
setLevel(ClientLevel p_91157_)
void
setOverlay(Overlay p_91151_)
void
void
setWindowActive(boolean p_91261_)
boolean
shouldEntityAppearGlowing(Entity p_91315_)
private boolean
protected boolean
boolean
private void
private void
void
stop()
void
tick()
private void
updateLevelInEngines(ClientLevel p_91325_)
void
updateMaxMipLevel(int p_91313_)
private void
updateScreenAndTick(Screen p_91363_)
void
static boolean
static boolean
static boolean
protected Runnable
wrapRunnable(Runnable p_91376_)
Methods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
doRunTask, runningTask, scheduleExecutables
Methods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, managedBlock, name, pollTask, profiledMetrics, 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
popGuiLayer, pushGuiLayer
Methods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither
-
Field Details
-
instance
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
ON_OSX
public static final boolean ON_OSX -
MAX_TICKS_PER_UPDATE
private static final int MAX_TICKS_PER_UPDATE- See Also:
- Constant Field Values
-
DEFAULT_FONT
-
UNIFORM_FONT
-
ALT_FONT
-
RESOURCE_RELOAD_INITIAL_TASK
-
SOCIAL_INTERACTIONS_NOT_AVAILABLE
-
UPDATE_DRIVERS_ADVICE
- See Also:
- Constant Field Values
-
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
-
entityModels
-
blockEntityRenderDispatcher
-
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
-
wireframe
public boolean wireframe -
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
-
metricsRecorder
-
reloadStateTracker
-
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_91131_, GameConfig p_91132_) -
isProbablyModded
public boolean isProbablyModded() -
rollbackResourcePacks
-
clearResourcePacksOnError
-
run
public void run() -
selectMainFont
void selectMainFont(boolean p_91337_) -
createSearchTrees
public void createSearchTrees() -
onFullscreenError
private void onFullscreenError(int p_91114_, long p_91115_) -
checkIs64Bit
private static boolean checkIs64Bit() -
getMainRenderTarget
-
getLaunchedVersion
-
getVersionType
-
delayCrash
-
crash
-
isEnforceUnicode
public boolean isEnforceUnicode() -
reloadResourcePacks
-
reloadResourcePacks
-
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 interfaceProcessorHandle<Runnable>
-
runTick
private void runTick(boolean p_91384_) -
shouldRenderFpsPie
private boolean shouldRenderFpsPie() -
constructProfiler
private ProfilerFiller constructProfiler(boolean p_167971_, @Nullable SingleTickProfiler p_167972_) -
finishProfilers
-
resizeDisplay
public void resizeDisplay()- Specified by:
resizeDisplay
in interfaceWindowEventHandler
-
cursorEntered
public void cursorEntered()- Specified by:
cursorEntered
in interfaceWindowEventHandler
-
getFramerateLimit
private int getFramerateLimit() -
emergencySave
public void emergencySave() -
debugClientMetricsStart
-
debugClientMetricsStop
private void debugClientMetricsStop() -
archiveProfilingReport
-
debugFpsMeterKeyPress
public void debugFpsMeterKeyPress(int p_91112_) -
renderFpsMeter
-
stop
public void stop() -
isRunning
public boolean isRunning() -
pauseGame
public void pauseGame(boolean p_91359_) -
continueAttack
private void continueAttack(boolean p_91387_) -
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 WorldData loadWorldData(LevelStorageSource.LevelStorageAccess p_91136_, RegistryAccess.RegistryHolder p_91137_, ResourceManager p_91138_, DataPackConfig p_91139_) -
loadLevel
-
createLevel
public void createLevel(String p_91203_, LevelSettings p_91204_, RegistryAccess.RegistryHolder p_91205_, WorldGenSettings p_91206_) -
doLoadLevel
private void doLoadLevel(String p_91220_, RegistryAccess.RegistryHolder p_91221_, Function<LevelStorageSource.LevelStorageAccess,DataPackConfig> p_91222_, com.mojang.datafixers.util.Function4<LevelStorageSource.LevelStorageAccess,RegistryAccess.RegistryHolder,ResourceManager,DataPackConfig,WorldData> p_91223_, boolean p_91224_, Minecraft.ExperimentalDialogType p_91225_, boolean creating) -
displayExperimentalConfirmationDialog
private void displayExperimentalConfirmationDialog(Minecraft.ExperimentalDialogType p_91144_, String p_91145_, boolean p_91146_, Runnable p_91147_) -
makeServerStem
public Minecraft.ServerStem makeServerStem(RegistryAccess.RegistryHolder p_91191_, Function<LevelStorageSource.LevelStorageAccess,DataPackConfig> p_91192_, com.mojang.datafixers.util.Function4<LevelStorageSource.LevelStorageAccess,RegistryAccess.RegistryHolder,ResourceManager,DataPackConfig,WorldData> p_91193_, boolean p_91194_, LevelStorageSource.LevelStorageAccess p_91195_) throws InterruptedException, ExecutionException -
setLevel
-
clearLevel
public void clearLevel() -
clearLevel
-
updateScreenAndTick
-
forceSetScreen
-
updateLevelInEngines
-
allowsMultiplayer
public boolean allowsMultiplayer() -
allowsRealms
public boolean allowsRealms() -
isBlocked
-
getChatStatus
-
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 Minecraft p_167873_, @Nullable LanguageManager p_167874_, String p_167875_, @Nullable Options p_167876_, CrashReport p_167877_) -
fillSystemReport
private static SystemReport fillSystemReport(SystemReport p_167851_, @Nullable Minecraft p_167852_, @Nullable LanguageManager p_167853_, String p_167854_, Options p_167855_) -
getInstance
-
delayTextureReload
-
populateSnooper
- Specified by:
populateSnooper
in interfaceSnooperPopulator
-
getCurrentSnooperAction
-
populateSnooperInitial
- Specified by:
populateSnooperInitial
in interfaceSnooperPopulator
-
populateSnooperWithOpenGL
-
isSnooperEnabled
public boolean isSnooperEnabled()- Specified by:
isSnooperEnabled
in interfaceSnooperPopulator
-
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 classBlockableEventLoop<Runnable>
-
wrapRunnable
- Specified by:
wrapRunnable
in classBlockableEventLoop<Runnable>
-
shouldRun
- Specified by:
shouldRun
in classBlockableEventLoop<Runnable>
-
getBlockRenderer
-
getEntityRenderDispatcher
-
getBlockEntityRenderDispatcher
-
getItemRenderer
-
getItemInHandRenderer
-
getSearchTree
-
getFrameTimer
-
isConnectedToRealms
public boolean isConnectedToRealms() -
setConnectedToRealms
public void setConnectedToRealms(boolean p_91373_) -
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_91261_)- Specified by:
setWindowActive
in interfaceWindowEventHandler
-
grabPanoramixScreenshot
-
grabHugeScreenshot
-
getProfiler
-
getGame
-
getProgressListener
-
getSplashManager
-
getOverlay
-
getPlayerSocialManager
-
renderOnThread
public boolean renderOnThread() -
getWindow
-
renderBuffers
-
createClientPackAdapter
private static Pack createClientPackAdapter(String p_167934_, Component p_167935_, boolean p_167936_, Supplier<PackResources> p_167937_, PackMetadataSection p_167938_, Pack.Position p_167939_, PackSource p_167940_, boolean hidden) -
adaptV3
-
adaptV4
-
updateMaxMipLevel
public void updateMaxMipLevel(int p_91313_) -
getItemColors
-
getSearchTreeManager
-
getEntityModels
-
isTextFilteringEnabled
public boolean isTextFilteringEnabled()
-
socialInteractionsService