类 Minecraft
- 所有已实现的接口:
WindowEventHandler
,AutoCloseable
,Executor
,ProfilerMeasured
,ProcessorHandle<Runnable>
,IForgeMinecraft
public class Minecraft
extends ReentrantBlockableEventLoop<Runnable>
implements WindowEventHandler, IForgeMinecraft
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private final boolean
private final boolean
static final ResourceLocation
private final com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService
private final BlockColors
private final BlockEntityRenderDispatcher
private final BlockRenderDispatcher
private final ChatListener
boolean
boolean
private boolean
private TimerQuery.FrameProfile
private String
final DebugRenderer
static final ResourceLocation
private Supplier<CrashReport>
private final boolean
private final DownloadedPackSource
private final EntityModelSet
private final EntityRenderDispatcher
private final com.mojang.datafixers.DataFixer
final Font
final Font
private final FontManager
private static int
private final ContinuousProfiler
private int
private ProfileResults
private int
private long
final FrameTimer
final File
final GameRenderer
private Thread
private double
private final GpuWarnlistManager
final Gui
private final HotbarManager
(专用程序包) static Minecraft
private final boolean
private boolean
private final ItemColors
private final ItemRenderer
final KeyboardHandler
private final LanguageManager
private InputType
private long
private long
private final String
final LevelRenderer
private final LevelStorageSource
private static final org.slf4j.Logger
private final RenderTarget
private static final int
private MetricsRecorder
private final com.mojang.authlib.minecraft.MinecraftSessionService
protected int
private final MobEffectTextureManager
private final ModelManager
final MouseHandler
private final MusicManager
private final GameNarrator
boolean
static final boolean
final Options
private Overlay
private final PaintingTextureManager
final ParticleEngine
private boolean
private float
private Connection
private CompletableFuture<Void>
private final PlayerSocialManager
private final ProfileKeyPairManager
private final com.mojang.authlib.properties.PropertyMap
private ProfilerFiller
private final AtomicReference<StoringChunkProgressListener>
private final Proxy
private final QuickPlayLog
private final Realms32BitWarningStatus
private final RealmsDataFetcher
private float
private static final ResourceLocation
private final PeriodicNotificationManager
private final ResourceLoadStateTracker
private final RenderBuffers
private ReportingContext
private static final CompletableFuture<Unit>
private final ReloadableResourceManager
private final Path
private final PackRepository
private int
private boolean
private long
private final SearchRegistry
private IntegratedServer
private final SkinManager
boolean
private static final Component
private TutorialToast
private final SoundManager
private final SplashManager
private final ClientTelemetryManager
final TextureManager
private final Timer
private final ToastComponent
private final Tutorial
static final ResourceLocation
static final String
private final User
private final com.mojang.authlib.minecraft.UserApiService
private final VanillaPackResources
private final String
private final VirtualScreen
private final Window
private boolean
boolean
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明private void
private void
addCustomNbtData
(ItemStack pStack, BlockEntity pBe) private void
addResourcePackLoadFailToast
(Component pMessage) boolean
boolean
boolean
private Path
archiveProfilingReport
(SystemReport pReport, List<Path> pPaths) private static boolean
static ModCheck
void
void
clearLevel
(Screen pScreen) void
clearResourcePacksOnError
(Throwable pThrowable, Component pErrorMessage) void
close()
private ProfilerFiller
constructProfiler
(boolean pRenderFpsPie, SingleTickProfiler pSingleTickProfiler) private void
continueAttack
(boolean pLeftClick) private static boolean
countryEqualsISO3
(Object p_210783_) static void
crash
(CrashReport pReport) void
private String
private com.mojang.authlib.minecraft.UserApiService
createUserApiService
(com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService pAuthenticationService, GameConfig pGameConfig) void
private void
boolean
debugClientMetricsStart
(Consumer<Component> p_167947_) private void
void
debugFpsMeterKeyPress
(int pKeyCount) void
delayCrash
(CrashReport pReport) void
delayCrashRaw
(CrashReport pReport) void
destroy()
void
doWorldLoad
(String pLevelId, LevelStorageSource.LevelStorageAccess pLevel, PackRepository pPackRepository, WorldStem pWorldStem, boolean pNewWorld) void
boolean
static void
fillReport
(Minecraft pMinecraft, LanguageManager pLanguageManager, String pLaunchVersion, Options pOptions, CrashReport pReport) fillReport
(CrashReport pTheCrash) private static SystemReport
fillSystemReport
(SystemReport pReport, Minecraft pMinecraft, LanguageManager pLanguageManager, String pLaunchVersion, Options pOptions) private void
finishProfilers
(boolean pRenderFpsPie, SingleTickProfiler pProfiler) void
forceSetScreen
(Screen pScreen) float
com.mojang.datafixers.DataFixer
int
getFps()
private int
float
long
double
static Minecraft
com.mojang.authlib.minecraft.MinecraftSessionService
float
com.mojang.authlib.properties.PropertyMap
getProxy()
protected Thread
<T> SearchTree<T>
getSearchTree
(SearchRegistry.Key<T> pKey) getTextureAtlas
(ResourceLocation pLocation) getUser()
private Component
grabHugeScreenshot
(File pGameDirectory, int pColumnWidth, int pRowHeight, int pWidth, int pHeight) grabPanoramixScreenshot
(File pGameDirectory, int pWidth, int pHeight) private void
boolean
boolean
is64Bit()
boolean
boolean
final boolean
isDemo()
boolean
boolean
private boolean
boolean
isPaused()
boolean
boolean
boolean
boolean
com.mojang.authlib.minecraft.BanDetails
private void
onFullscreenError
(int p_91114_, long p_91115_) private void
private void
openChatScreen
(String pDefaultText) void
pauseGame
(boolean pPauseOnly) private void
<T> void
populateSearchTree
(SearchRegistry.Key<T> pKey, List<T> pValues) void
private CompletableFuture<Void>
reloadResourcePacks
(boolean p_168020_) private void
renderFpsMeter
(GuiGraphics pGuiGraphics, ProfileResults pProfileResults) static boolean
boolean
void
private void
rollbackResourcePacks
(Throwable p_91240_) void
run()
private void
runTick
(boolean pRenderLevel) (专用程序包) void
selectMainFont
(boolean pForced) private void
selfTest()
void
setCameraEntity
(Entity pViewingEntity) void
setConnectedToRealms
(boolean pIsConnected) private void
setInitialScreen
(RealmsClient pRealmsClient, ReloadInstance pReloadInstance, GameConfig.QuickPlayData pQuickPlayData) void
setLastInputType
(InputType pLastInputType) void
setLevel
(ClientLevel pLevelClient) void
setOverlay
(Overlay pLoadingGui) void
void
setWindowActive
(boolean pFocused) boolean
shouldEntityAppearGlowing
(Entity pEntity) private boolean
protected boolean
boolean
boolean
private boolean
private void
void
stop()
boolean
void
tick()
private void
updateLevelInEngines
(ClientLevel pLevel) void
updateMaxMipLevel
(int pMipMapLevel) void
updateReportEnvironment
(ReportEnvironment pReportEnvironment) private void
updateScreenAndTick
(Screen pScreen) void
static boolean
static boolean
static boolean
protected Runnable
wrapRunnable
(Runnable pRunnable) 从类继承的方法 net.minecraft.util.thread.ReentrantBlockableEventLoop
doRunTask, runningTask, scheduleExecutables
从类继承的方法 net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, executeIfPossible, getPendingTasksCount, isSameThread, managedBlock, name, pollTask, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell, waitForTasks
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraftforge.client.extensions.IForgeMinecraft
getLocale, popGuiLayer, pushGuiLayer
从接口继承的方法 net.minecraft.util.thread.ProcessorHandle
ask, askEither
-
字段详细资料
-
instance
-
LOGGER
private static final org.slf4j.Logger LOGGER -
ON_OSX
public static final boolean ON_OSX -
MAX_TICKS_PER_UPDATE
private static final int MAX_TICKS_PER_UPDATE- 另请参阅:
-
DEFAULT_FONT
-
UNIFORM_FONT
-
ALT_FONT
-
REGIONAL_COMPLIANCIES
-
RESOURCE_RELOAD_INITIAL_TASK
-
SOCIAL_INTERACTIONS_NOT_AVAILABLE
-
UPDATE_DRIVERS_ADVICE
- 另请参阅:
-
resourcePackDirectory
-
profileProperties
private final com.mojang.authlib.properties.PropertyMap profileProperties -
textureManager
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
virtualScreen
-
window
-
timer
-
renderBuffers
-
levelRenderer
-
entityRenderDispatcher
-
itemRenderer
-
particleEngine
-
searchRegistry
-
user
-
font
-
fontFilterFishy
-
gameRenderer
-
debugRenderer
-
progressListener
-
gui
-
options
-
hotbarManager
-
mouseHandler
-
keyboardHandler
-
lastInputType
-
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
-
vanillaPackResources
-
downloadedPackSource
-
resourcePackRepository
-
languageManager
-
blockColors
-
itemColors
-
mainRenderTarget
-
soundManager
-
musicManager
-
fontManager
-
splashManager
-
gpuWarnlistManager
-
regionalCompliancies
-
authenticationService
private final com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService authenticationService -
minecraftSessionService
private final com.mojang.authlib.minecraft.MinecraftSessionService minecraftSessionService -
userApiService
private final com.mojang.authlib.minecraft.UserApiService userApiService -
skinManager
-
modelManager
-
blockRenderer
-
paintingTextures
-
mobEffectTextures
-
toast
-
tutorial
-
playerSocialManager
-
entityModels
-
blockEntityRenderDispatcher
-
telemetryManager
-
profileKeyPairManager
-
realmsDataFetcher
-
quickPlayLog
-
gameMode
-
level
-
player
-
singleplayerServer
-
pendingConnection
-
isLocalServer
private boolean isLocalServer -
cameraEntity
-
crosshairPickEntity
-
hitResult
-
rightClickDelay
private int rightClickDelay -
missTime
protected int missTime -
pause
private volatile 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
-
frameTimeNs
private long frameTimeNs -
wireframe
public boolean wireframe -
chunkPath
public boolean chunkPath -
chunkVisibility
public boolean chunkVisibility -
smartCull
public boolean smartCull -
windowActive
private boolean windowActive -
progressTasks
-
pendingReload
-
profiler
-
fpsPieRenderTicks
private int fpsPieRenderTicks -
fpsPieProfiler
-
fpsPieResults
-
metricsRecorder
-
reloadStateTracker
-
savedCpuDuration
private long savedCpuDuration -
gpuUtilization
private double gpuUtilization -
currentFrameProfile
-
realms32BitWarningStatus
-
narrator
-
chatListener
-
reportingContext
-
debugPath
-
realPartialTick
private float realPartialTick
-
-
构造器详细资料
-
Minecraft
-
-
方法详细资料
-
onGameLoadFinished
private void onGameLoadFinished() -
setInitialScreen
private void setInitialScreen(RealmsClient pRealmsClient, ReloadInstance pReloadInstance, GameConfig.QuickPlayData pQuickPlayData) -
countryEqualsISO3
-
updateTitle
public void updateTitle() -
createTitle
-
createUserApiService
private com.mojang.authlib.minecraft.UserApiService createUserApiService(com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService pAuthenticationService, GameConfig pGameConfig) -
checkModStatus
-
rollbackResourcePacks
-
clearResourcePacksOnError
-
abortResourcePackRecovery
private void abortResourcePackRecovery() -
addResourcePackLoadFailToast
-
run
public void run() -
selectMainFont
void selectMainFont(boolean pForced) -
createSearchTrees
public void createSearchTrees() -
onFullscreenError
private void onFullscreenError(int p_91114_, long p_91115_) -
checkIs64Bit
private static boolean checkIs64Bit() -
getMainRenderTarget
-
getLaunchedVersion
-
getVersionType
-
delayCrash
-
delayCrashRaw
-
crash
-
isEnforceUnicode
public boolean isEnforceUnicode() -
reloadResourcePacks
-
reloadResourcePacks
-
selfTest
private void selfTest() -
getLevelSource
-
openChatScreen
-
setScreen
-
setOverlay
-
destroy
public void destroy() -
close
public void close()- 指定者:
close
在接口中AutoCloseable
- 指定者:
close
在接口中ProcessorHandle<Runnable>
-
runTick
private void runTick(boolean pRenderLevel) -
shouldRenderFpsPie
private boolean shouldRenderFpsPie() -
constructProfiler
private ProfilerFiller constructProfiler(boolean pRenderFpsPie, @Nullable SingleTickProfiler pSingleTickProfiler) -
finishProfilers
-
resizeDisplay
public void resizeDisplay()- 指定者:
resizeDisplay
在接口中WindowEventHandler
-
cursorEntered
public void cursorEntered()- 指定者:
cursorEntered
在接口中WindowEventHandler
-
getFps
public int getFps() -
getFrameTimeNs
public long getFrameTimeNs() -
getFramerateLimit
private int getFramerateLimit() -
emergencySave
public void emergencySave() -
debugClientMetricsStart
-
debugClientMetricsStop
private void debugClientMetricsStop() -
debugClientMetricsCancel
private void debugClientMetricsCancel() -
archiveProfilingReport
-
debugFpsMeterKeyPress
public void debugFpsMeterKeyPress(int pKeyCount) -
renderFpsMeter
-
stop
public void stop() -
isRunning
public boolean isRunning() -
pauseGame
public void pauseGame(boolean pPauseOnly) -
continueAttack
private void continueAttack(boolean pLeftClick) -
startAttack
private boolean startAttack() -
startUseItem
private void startUseItem() -
getMusicManager
-
tick
public void tick() -
isMultiplayerServer
private boolean isMultiplayerServer() -
handleKeybinds
private void handleKeybinds() -
getTelemetryManager
-
getGpuUtilization
public double getGpuUtilization() -
getProfileKeyPairManager
-
createWorldOpenFlows
-
doWorldLoad
public void doWorldLoad(String pLevelId, LevelStorageSource.LevelStorageAccess pLevel, PackRepository pPackRepository, WorldStem pWorldStem, boolean pNewWorld) -
setLevel
-
clearLevel
public void clearLevel() -
clearLevel
-
updateScreenAndTick
-
forceSetScreen
-
updateLevelInEngines
-
telemetryOptInExtra
public boolean telemetryOptInExtra() -
extraTelemetryAvailable
public boolean extraTelemetryAvailable() -
allowsTelemetry
public boolean allowsTelemetry() -
allowsMultiplayer
public boolean allowsMultiplayer() -
allowsRealms
public boolean allowsRealms() -
shouldShowBanNotice
public boolean shouldShowBanNotice() -
multiplayerBan
@Nullable public com.mojang.authlib.minecraft.BanDetails multiplayerBan() -
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 pMinecraft, @Nullable LanguageManager pLanguageManager, String pLaunchVersion, @Nullable Options pOptions, CrashReport pReport) -
fillSystemReport
private static SystemReport fillSystemReport(SystemReport pReport, @Nullable Minecraft pMinecraft, @Nullable LanguageManager pLanguageManager, String pLaunchVersion, Options pOptions) -
getInstance
-
delayTextureReload
-
updateReportEnvironment
-
getCurrentServer
-
isLocalServer
public boolean isLocalServer() -
hasSingleplayerServer
public boolean hasSingleplayerServer() -
getSingleplayerServer
-
isSingleplayer
public boolean isSingleplayer() -
getUser
-
getProfileProperties
public com.mojang.authlib.properties.PropertyMap getProfileProperties() -
getProxy
-
getTextureManager
-
getResourceManager
-
getResourcePackRepository
-
getVanillaPackResources
-
getDownloadedPackSource
-
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
- 指定者:
getRunningThread
在类中BlockableEventLoop<Runnable>
-
wrapRunnable
- 指定者:
wrapRunnable
在类中BlockableEventLoop<Runnable>
-
shouldRun
- 指定者:
shouldRun
在类中BlockableEventLoop<Runnable>
-
getBlockRenderer
-
getEntityRenderDispatcher
-
getBlockEntityRenderDispatcher
-
getItemRenderer
-
getSearchTree
-
populateSearchTree
-
getFrameTimer
-
isConnectedToRealms
public boolean isConnectedToRealms() -
setConnectedToRealms
public void setConnectedToRealms(boolean pIsConnected) -
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 pFocused) - 指定者:
setWindowActive
在接口中WindowEventHandler
-
grabPanoramixScreenshot
-
grabHugeScreenshot
-
getProfiler
-
getProgressListener
-
getSplashManager
-
getOverlay
-
getPlayerSocialManager
-
renderOnThread
public boolean renderOnThread() -
getWindow
-
renderBuffers
-
updateMaxMipLevel
public void updateMaxMipLevel(int pMipMapLevel) -
getItemColors
-
getSearchTreeManager
-
getPartialTick
public float getPartialTick() -
getEntityModels
-
isTextFilteringEnabled
public boolean isTextFilteringEnabled() -
prepareForMultiplayer
public void prepareForMultiplayer() -
getRealms32BitWarningStatus
-
getProfileKeySignatureValidator
-
getLastInputType
-
setLastInputType
-
getNarrator
-
getChatListener
-
getReportingContext
-
realmsDataFetcher
-
quickPlayLog
-
socialInteractionsToast