Package net.minecraft.server
Class MinecraftServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
- All Implemented Interfaces:
AutoCloseable,Executor,CommandSource,ServerInfo,ProfilerMeasured,ProcessorHandle<TickTask>,ChunkIOErrorReporter
- Direct Known Subclasses:
DedicatedServer,GameTestServer,IntegratedServer
public abstract class MinecraftServer
extends ReentrantBlockableEventLoop<TickTask>
implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intprivate longprivate booleanstatic final com.mojang.authlib.GameProfileprivate static final intprivate static final floatprivate Stringprivate CommandStorageprivate final ServerConnectionListenerprivate final CustomBossEventsprivate MinecraftServer.TimeProfilerprivate booleanprivate longstatic final LevelSettingsprivate booleanprivate final Executorprivate static final AtomicReference<RuntimeException> private final com.mojang.datafixers.DataFixerprivate final ServerFunctionManagerprivate static final com.google.gson.Gsonprivate longprivate booleanprivate booleanprivate booleanprivate KeyPairprivate longprivate longprivate longprivate final Map<ResourceKey<Level>, ServerLevel> private Stringprivate static final org.slf4j.Loggerprivate static final intprivate static final intprivate booleanprivate MetricsRecorderprivate static final intprivate Stringprotected longprivate booleanprivate Consumer<ProfileResults> private static final longprivate static final intprivate static final intprivate static final longprivate final PackRepositoryprivate Map<ResourceKey<Level>, long[]> protected final PlayerDataStorageprivate intprivate PlayerListprivate intprivate final PotionBrewingprivate static final longprivate booleanprivate ProfilerFillerprivate final ChunkProgressListenerFactoryprotected final Proxyprivate booleanprivate final RandomSourceprivate final LayeredRegistryAccess<RegistryLayer> private booleanprivate final ServerScoreboardprivate Stringprivate final Threadprotected final Servicesprivate com.mojang.authlib.GameProfileprivate floatprivate static final intprivate ServerStatusprivate static final longprivate ServerStatus.Faviconprivate booleanprotected final LevelStorageSource.LevelStorageAccessprivate final StructureTemplateManagerprivate longprivate static final intprivate intprivate final ServerTickRateManagerprivate intprivate final long[]static final Stringprivate booleanprivate ServerLevel[]private intprivate intprotected final WorldDataFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionMinecraftServer(Thread serverThread, LevelStorageSource.LevelStorageAccess storageSource, PackRepository packRepository, WorldStem worldStem, Proxy proxy, com.mojang.datafixers.DataFixer fixerUpper, Services services, ChunkProgressListenerFactory progressListenerFactory) -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanvoidaddTickable(Runnable tickable) booleanprivate ServerStatus.Playersprivate ServerStatusvoidvoidclose()private intstatic WorldDataConfigurationconfigurePackRepository(PackRepository packRepository, WorldDataConfiguration initialDataConfig, boolean initMode, boolean safeMode) private static WorldDataConfigurationconfigureRepositoryWithSelection(PackRepository packRepository, Collection<String> selectedPacks, FeatureFlagSet enabledFeatures, boolean safeMode) private static CrashReportcreateGameModeForPlayer(ServerPlayer player) protected voidcreateLevels(ChunkProgressListener listener) voidprivate voiddumpClasspath(Path path) private voiddumpGameRules(Path path) private voiddumpMiscStats(Path path) private voiddumpNativeModules(Path path) voiddumpServerProperties(Path path) private voiddumpThreads(Path path) private static voidenableForcedFeaturePacks(PackRepository packRepository, FeatureFlagSet enabledFeatures) voidbooleanvoidexecuteIfPossible(Runnable task) abstract SystemReportfillServerSystemReport(SystemReport report) fillSystemReport(SystemReport systemReport) private voidvoidprotected voidbooleanvoidDeprecated.intlongintfloatcom.mojang.datafixers.DataFixerabstract intgetLevel(ResourceKey<Level> dimension) Gets the worldServer by the given dimension.intintgetMotd()longabstract intintintString[]intgetPort()booleanintgetProfilePermissions(com.mojang.authlib.GameProfile profile) com.mojang.authlib.GameProfileRepositorygetProxy()abstract intintgetScaledTrackingDistance(int trackingDistance) private static DataPackConfiggetSelectedPacks(PackRepository packRepository, boolean safeMode) com.mojang.authlib.minecraft.MinecraftSessionServicecom.mojang.authlib.GameProfileintintgetSpawnRadius(ServerLevel level) intlong[]getTickTime(ResourceKey<Level> dim) protected abstract SampleLoggerlong[]private ServerLevel[]getWorldPath(LevelResource levelResource) voidhalt(boolean waitForServer) Sets the serverRunning variable to false, in order to get the server to shut down.booleanhasGui()private booleanhaveTime()booleanprotected voidprotected abstract booleanvoidabstract booleanbooleanabstract booleanbooleanisDemo()booleanabstract booleanbooleanbooleanbooleanisLevelEnabled(Level level) booleanisPaused()abstract booleanbooleanbooleanisReady()booleanbooleanbooleanbooleanbooleanabstract booleanisSingleplayerOwner(com.mojang.authlib.GameProfile profile) booleanbooleanbooleanabstract booleanbooleanbooleanisUnderSpawnProtection(ServerLevel level, BlockPos pos, Player player) voidkickUnlistedPlayers(CommandSourceStack commandSource) protected voidprivate Optional<ServerStatus.Favicon> voidlogChatMessage(Component content, ChatType.Bound boundChatType, String header) private voidbooleanlogIPs()private voidlogTickMethodTime(long startTime) voidmanagedBlock(BooleanSupplier isDone) Drive the executor until the given BooleanSupplier returns truevoidDeprecated.voidonServerCrash(CrashReport report) Called on exit from the main run() loop.voidvoidfinal ServerLevelbooleanpollTask()private booleanprivate voidprepareLevels(ChunkProgressListener listener) Loads the spawn chunks and any forced chunksbooleanpublishServer(GameType gameMode, boolean commands, int port) private voidreadScoreboard(DimensionDataStorage dataStorage) reloadResources(Collection<String> selectedIds) Replaces currently selected list of datapacks, reloads them, and sends new data to players.booleanvoidreportChunkLoadFailure(Throwable throwable, RegionStorageInfo regionStorageInfo, ChunkPos chunkPos) voidreportChunkSaveFailure(Throwable throwable, RegionStorageInfo regionStorageInfo, ChunkPos chunkPos) private voidresetStatusCache(ServerStatus status) protected voidbooleansaveAllChunks(boolean suppressLog, boolean flush, boolean forced) private voidsaveDebugReport(Path p_path) booleansaveEverything(boolean suppressLog, boolean flush, boolean forced) booleanprivate voidsendDifficultyUpdate(ServerPlayer player) voidsendSystemMessage(Component component) voidsetDefaultGameType(GameType gameMode) Sets the game type for all worlds.voidsetDemo(boolean demo) Sets whether this is a demo or not.voidsetDifficulty(Difficulty difficulty, boolean forced) voidsetDifficultyLocked(boolean locked) voidsetEnforceWhitelist(boolean whitelistEnabled) static voidsetFatalException(RuntimeException p_fatalException) voidsetFlightAllowed(boolean allow) protected voidprivate static voidsetInitialSpawn(ServerLevel level, ServerLevelData levelData, boolean generateBonusChest, boolean debug) voidsetLocalIp(String localIp) voidvoidsetPlayerIdleTimeout(int idleTimeout) voidsetPlayerList(PlayerList list) voidsetPort(int port) voidsetPreventProxyConnections(boolean preventProxyConnections) voidsetPvpAllowed(boolean allowPvp) voidsetSingleplayerProfile(com.mojang.authlib.GameProfile singleplayerProfile) private voidsetupDebugLevel(WorldData worldData) voidsetUsesAuthentication(boolean online) abstract booleanabstract booleanprotected booleanstatic <S extends MinecraftServer>
Sprivate voidprivate voidvoidstartRecordingMetrics(Consumer<ProfileResults> output, Consumer<Path> onMetricsRecordingFinished) voidvoidvoidprivate voidstoreChunkIoError(CrashReport crashReport, ChunkPos chunkPos, RegionStorageInfo regionStorageInfo) voidsubscribeToDebugSample(ServerPlayer player, RemoteDebugSampleType sampleType) private voidsynchronizeTime(ServerLevel level) static booleanvoidtickChildren(BooleanSupplier hasTimeLeft) voidtickServer(BooleanSupplier hasTimeLeft) Main function called by run() every loop.private voidbooleanvoidprotected voidprotected TickTaskwrapRunnable(Runnable runnable) Methods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTaskMethods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tellMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter
reportMisplacedChunkMethods inherited from interface net.minecraft.commands.CommandSource
alwaysAcceptsMethods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
VANILLA_BRAND
- See Also:
-
AVERAGE_TICK_TIME_SMOOTHING
private static final float AVERAGE_TICK_TIME_SMOOTHING- See Also:
-
TICK_STATS_SPAN
private static final int TICK_STATS_SPAN- See Also:
-
OVERLOADED_THRESHOLD_NANOS
private static final long OVERLOADED_THRESHOLD_NANOS -
OVERLOADED_TICKS_THRESHOLD
private static final int OVERLOADED_TICKS_THRESHOLD- See Also:
-
OVERLOADED_WARNING_INTERVAL_NANOS
private static final long OVERLOADED_WARNING_INTERVAL_NANOS -
OVERLOADED_TICKS_WARNING_INTERVAL
private static final int OVERLOADED_TICKS_WARNING_INTERVAL- See Also:
-
STATUS_EXPIRE_TIME_NANOS
private static final long STATUS_EXPIRE_TIME_NANOS -
PREPARE_LEVELS_DEFAULT_DELAY_NANOS
private static final long PREPARE_LEVELS_DEFAULT_DELAY_NANOS -
MAX_STATUS_PLAYER_SAMPLE
private static final int MAX_STATUS_PLAYER_SAMPLE- See Also:
-
SPAWN_POSITION_SEARCH_RADIUS
private static final int SPAWN_POSITION_SEARCH_RADIUS- See Also:
-
AUTOSAVE_INTERVAL
private static final int AUTOSAVE_INTERVAL- See Also:
-
MIMINUM_AUTOSAVE_TICKS
private static final int MIMINUM_AUTOSAVE_TICKS- See Also:
-
MAX_TICK_LATENCY
private static final int MAX_TICK_LATENCY- See Also:
-
ABSOLUTE_MAX_WORLD_SIZE
public static final int ABSOLUTE_MAX_WORLD_SIZE- See Also:
-
DEMO_SETTINGS
-
ANONYMOUS_PLAYER_PROFILE
public static final com.mojang.authlib.GameProfile ANONYMOUS_PLAYER_PROFILE -
storageSource
-
playerDataStorage
-
tickables
-
metricsRecorder
-
profiler
-
onMetricsRecordingStopped
-
onMetricsRecordingFinished
-
willStartRecordingMetrics
private boolean willStartRecordingMetrics -
debugCommandProfiler
-
debugCommandProfilerDelayStart
private boolean debugCommandProfilerDelayStart -
connection
-
progressListenerFactory
-
status
-
statusIcon
-
random
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
localIp
-
port
private int port -
registries
-
levels
-
playerList
-
running
private volatile boolean running -
stopped
private boolean stopped -
tickCount
private int tickCount -
ticksUntilAutosave
private int ticksUntilAutosave -
proxy
-
onlineMode
private boolean onlineMode -
preventProxyConnections
private boolean preventProxyConnections -
pvp
private boolean pvp -
allowFlight
private boolean allowFlight -
motd
-
playerIdleTimeout
private int playerIdleTimeout -
tickTimesNanos
private final long[] tickTimesNanos -
aggregatedTickTimesNanos
private long aggregatedTickTimesNanos -
keyPair
-
singleplayerProfile
@Nullable private com.mojang.authlib.GameProfile singleplayerProfile -
isDemo
private boolean isDemo -
isReady
private volatile boolean isReady -
lastOverloadWarningNanos
private long lastOverloadWarningNanos -
services
-
lastServerStatus
private long lastServerStatus -
serverThread
-
lastTickNanos
private long lastTickNanos -
taskExecutionStartNanos
private long taskExecutionStartNanos -
idleTimeNanos
private long idleTimeNanos -
nextTickTimeNanos
protected long nextTickTimeNanos -
delayedTasksMaxNextTickTimeNanos
private long delayedTasksMaxNextTickTimeNanos -
mayHaveDelayedTasks
private boolean mayHaveDelayedTasks -
packRepository
-
scoreboard
-
commandStorage
-
customBossEvents
-
functionManager
-
enforceWhitelist
private boolean enforceWhitelist -
smoothedTickTimeMillis
private float smoothedTickTimeMillis -
executor
-
serverId
-
resources
-
structureTemplateManager
-
tickRateManager
-
worldData
-
potionBrewing
-
isSaving
private volatile boolean isSaving -
fatalException
-
GSON
private static final com.google.gson.Gson GSON -
cachedServerStatus
-
perWorldTickTimes
-
worldArrayMarker
private int worldArrayMarker -
worldArrayLast
private int worldArrayLast -
worldArray
-
-
Constructor Details
-
MinecraftServer
public MinecraftServer(Thread serverThread, LevelStorageSource.LevelStorageAccess storageSource, PackRepository packRepository, WorldStem worldStem, Proxy proxy, com.mojang.datafixers.DataFixer fixerUpper, Services services, ChunkProgressListenerFactory progressListenerFactory)
-
-
Method Details
-
spin
-
readScoreboard
-
initServer
- Throws:
IOException
-
loadLevel
protected void loadLevel() -
forceDifficulty
protected void forceDifficulty() -
createLevels
-
setInitialSpawn
private static void setInitialSpawn(ServerLevel level, ServerLevelData levelData, boolean generateBonusChest, boolean debug) -
setupDebugLevel
-
prepareLevels
Loads the spawn chunks and any forced chunks -
getDefaultGameType
-
isHardcore
public boolean isHardcore() -
getOperatorUserPermissionLevel
public abstract int getOperatorUserPermissionLevel() -
getFunctionCompilationLevel
public abstract int getFunctionCompilationLevel() -
shouldRconBroadcast
public abstract boolean shouldRconBroadcast() -
saveAllChunks
public boolean saveAllChunks(boolean suppressLog, boolean flush, boolean forced) -
saveEverything
public boolean saveEverything(boolean suppressLog, boolean flush, boolean forced) -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceProcessorHandle<TickTask>
-
stopServer
public void stopServer() -
getLocalIp
-
setLocalIp
-
isRunning
public boolean isRunning() -
halt
public void halt(boolean waitForServer) Sets the serverRunning variable to false, in order to get the server to shut down. -
runServer
protected void runServer() -
logFullTickTime
private void logFullTickTime() -
startMeasuringTaskExecutionTime
private void startMeasuringTaskExecutionTime() -
finishMeasuringTaskExecutionTime
private void finishMeasuringTaskExecutionTime() -
constructOrExtractCrashReport
-
haveTime
private boolean haveTime() -
throwIfFatalException
public static boolean throwIfFatalException() -
setFatalException
-
managedBlock
Drive the executor until the given BooleanSupplier returns true- Overrides:
managedBlockin classBlockableEventLoop<TickTask>
-
waitUntilNextTick
protected void waitUntilNextTick() -
waitForTasks
public void waitForTasks()- Overrides:
waitForTasksin classBlockableEventLoop<TickTask>
-
wrapRunnable
- Specified by:
wrapRunnablein classBlockableEventLoop<TickTask>
-
shouldRun
- Specified by:
shouldRunin classBlockableEventLoop<TickTask>
-
pollTask
public boolean pollTask()- Overrides:
pollTaskin classBlockableEventLoop<TickTask>
-
pollTaskInternal
private boolean pollTaskInternal() -
doRunTask
- Overrides:
doRunTaskin classReentrantBlockableEventLoop<TickTask>
-
loadStatusIcon
-
getWorldScreenshotFile
-
getServerDirectory
-
onServerCrash
Called on exit from the main run() loop. -
onServerExit
public void onServerExit() -
isPaused
public boolean isPaused() -
tickServer
Main function called by run() every loop. -
logTickMethodTime
private void logTickMethodTime(long startTime) -
resetStatusCache
-
getStatusJson
-
computeNextAutosaveInterval
private int computeNextAutosaveInterval() -
onTickRateChanged
public void onTickRateChanged() -
getTickTimeLogger
-
isTickTimeLoggingEnabled
public abstract boolean isTickTimeLoggingEnabled() -
buildServerStatus
-
buildPlayerStatus
-
tickChildren
-
synchronizeTime
-
forceTimeSynchronization
public void forceTimeSynchronization() -
isLevelEnabled
-
addTickable
-
setId
-
isShutdown
public boolean isShutdown() -
getFile
-
overworld
-
getLevel
Gets the worldServer by the given dimension. -
levelKeys
-
getAllLevels
-
getServerVersion
- Specified by:
getServerVersionin interfaceServerInfo
-
getPlayerCount
public int getPlayerCount()- Specified by:
getPlayerCountin interfaceServerInfo
-
getMaxPlayers
public int getMaxPlayers()- Specified by:
getMaxPlayersin interfaceServerInfo
-
getPlayerNames
-
getServerModName
-
fillSystemReport
-
fillServerSystemReport
-
getModdedStatus
-
sendSystemMessage
- Specified by:
sendSystemMessagein interfaceCommandSource
-
getKeyPair
-
getPort
public int getPort() -
setPort
public void setPort(int port) -
getSingleplayerProfile
@Nullable public com.mojang.authlib.GameProfile getSingleplayerProfile() -
setSingleplayerProfile
public void setSingleplayerProfile(@Nullable com.mojang.authlib.GameProfile singleplayerProfile) -
isSingleplayer
public boolean isSingleplayer() -
initializeKeyPair
protected void initializeKeyPair() -
setDifficulty
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int trackingDistance) -
updateMobSpawningFlags
private void updateMobSpawningFlags() -
setDifficultyLocked
public void setDifficultyLocked(boolean locked) -
sendDifficultyUpdate
-
isSpawningMonsters
public boolean isSpawningMonsters() -
isDemo
public boolean isDemo() -
setDemo
public void setDemo(boolean demo) Sets whether this is a demo or not. -
getServerResourcePack
-
isResourcePackRequired
public boolean isResourcePackRequired() -
isDedicatedServer
public abstract boolean isDedicatedServer() -
getRateLimitPacketsPerSecond
public abstract int getRateLimitPacketsPerSecond() -
usesAuthentication
public boolean usesAuthentication() -
setUsesAuthentication
public void setUsesAuthentication(boolean online) -
getPreventProxyConnections
public boolean getPreventProxyConnections() -
setPreventProxyConnections
public void setPreventProxyConnections(boolean preventProxyConnections) -
isSpawningAnimals
public boolean isSpawningAnimals() -
areNpcsEnabled
public boolean areNpcsEnabled() -
isEpollEnabled
public abstract boolean isEpollEnabled() -
isPvpAllowed
public boolean isPvpAllowed() -
setPvpAllowed
public void setPvpAllowed(boolean allowPvp) -
isFlightAllowed
public boolean isFlightAllowed() -
setFlightAllowed
public void setFlightAllowed(boolean allow) -
isCommandBlockEnabled
public abstract boolean isCommandBlockEnabled() -
getMotd
- Specified by:
getMotdin interfaceServerInfo
-
setMotd
-
isStopped
public boolean isStopped() -
getPlayerList
-
setPlayerList
-
isPublished
public abstract boolean isPublished() -
setDefaultGameType
Sets the game type for all worlds. -
getConnection
-
isReady
public boolean isReady() -
hasGui
public boolean hasGui() -
publishServer
-
getTickCount
public int getTickCount() -
getSpawnProtectionRadius
public int getSpawnProtectionRadius() -
isUnderSpawnProtection
-
repliesToStatus
public boolean repliesToStatus() -
hidesOnlinePlayers
public boolean hidesOnlinePlayers() -
getProxy
-
getPlayerIdleTimeout
public int getPlayerIdleTimeout() -
setPlayerIdleTimeout
public void setPlayerIdleTimeout(int idleTimeout) -
getSessionService
public com.mojang.authlib.minecraft.MinecraftSessionService getSessionService() -
getProfileKeySignatureValidator
-
getProfileRepository
public com.mojang.authlib.GameProfileRepository getProfileRepository() -
getProfileCache
-
getStatus
-
invalidateStatus
public void invalidateStatus() -
getAbsoluteMaxWorldSize
public int getAbsoluteMaxWorldSize() -
scheduleExecutables
public boolean scheduleExecutables()- Overrides:
scheduleExecutablesin classReentrantBlockableEventLoop<TickTask>
-
executeIfPossible
- Overrides:
executeIfPossiblein classBlockableEventLoop<TickTask>
-
getRunningThread
- Specified by:
getRunningThreadin classBlockableEventLoop<TickTask>
-
getCompressionThreshold
public int getCompressionThreshold() -
enforceSecureProfile
public boolean enforceSecureProfile() -
getNextTickTime
public long getNextTickTime() -
getFixerUpper
public com.mojang.datafixers.DataFixer getFixerUpper() -
getSpawnRadius
-
getAdvancements
-
getFunctions
-
reloadResources
Replaces currently selected list of datapacks, reloads them, and sends new data to players. -
configurePackRepository
public static WorldDataConfiguration configurePackRepository(PackRepository packRepository, WorldDataConfiguration initialDataConfig, boolean initMode, boolean safeMode) -
configureRepositoryWithSelection
private static WorldDataConfiguration configureRepositoryWithSelection(PackRepository packRepository, Collection<String> selectedPacks, FeatureFlagSet enabledFeatures, boolean safeMode) -
enableForcedFeaturePacks
private static void enableForcedFeaturePacks(PackRepository packRepository, FeatureFlagSet enabledFeatures) -
getSelectedPacks
-
kickUnlistedPlayers
-
getPackRepository
-
getCommands
-
createCommandSourceStack
-
acceptsSuccess
public boolean acceptsSuccess()- Specified by:
acceptsSuccessin interfaceCommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailurein interfaceCommandSource
-
shouldInformAdmins
public abstract boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin interfaceCommandSource
-
getRecipeManager
-
getScoreboard
-
getCommandStorage
-
getGameRules
-
getCustomBossEvents
-
isEnforceWhitelist
public boolean isEnforceWhitelist() -
setEnforceWhitelist
public void setEnforceWhitelist(boolean whitelistEnabled) -
getCurrentSmoothedTickTime
public float getCurrentSmoothedTickTime() -
tickRateManager
-
getAverageTickTimeNanos
public long getAverageTickTimeNanos() -
getTickTimesNanos
public long[] getTickTimesNanos() -
getProfilePermissions
public int getProfilePermissions(com.mojang.authlib.GameProfile profile) -
getProfiler
-
isSingleplayerOwner
public abstract boolean isSingleplayerOwner(com.mojang.authlib.GameProfile profile) -
getTickTime
-
forgeGetWorldMap
Deprecated. -
markWorldsDirty
Deprecated. -
getWorldArray
-
dumpServerProperties
- Throws:
IOException
-
saveDebugReport
-
dumpMiscStats
- Throws:
IOException
-
dumpGameRules
- Throws:
IOException
-
dumpClasspath
- Throws:
IOException
-
dumpThreads
- Throws:
IOException
-
dumpNativeModules
- Throws:
IOException
-
startMetricsRecordingTick
private void startMetricsRecordingTick() -
endMetricsRecordingTick
public void endMetricsRecordingTick() -
isRecordingMetrics
public boolean isRecordingMetrics() -
startRecordingMetrics
public void startRecordingMetrics(Consumer<ProfileResults> output, Consumer<Path> onMetricsRecordingFinished) -
stopRecordingMetrics
public void stopRecordingMetrics() -
finishRecordingMetrics
public void finishRecordingMetrics() -
cancelRecordingMetrics
public void cancelRecordingMetrics() -
getWorldPath
-
forceSynchronousWrites
public boolean forceSynchronousWrites() -
getStructureManager
-
getWorldData
-
getServerResources
-
registryAccess
-
registries
-
reloadableRegistries
-
createTextFilterForPlayer
-
createGameModeForPlayer
-
getForcedGameType
-
getResourceManager
-
isCurrentlySaving
public boolean isCurrentlySaving() -
isTimeProfilerRunning
public boolean isTimeProfilerRunning() -
startTimeProfiler
public void startTimeProfiler() -
stopTimeProfiler
-
getMaxChainedNeighborUpdates
public int getMaxChainedNeighborUpdates() -
logChatMessage
public void logChatMessage(Component content, ChatType.Bound boundChatType, @Nullable String header) -
getChatDecorator
-
logIPs
public boolean logIPs() -
subscribeToDebugSample
-
acceptsTransfers
public boolean acceptsTransfers() -
storeChunkIoError
private void storeChunkIoError(CrashReport crashReport, ChunkPos chunkPos, RegionStorageInfo regionStorageInfo) -
reportChunkLoadFailure
public void reportChunkLoadFailure(Throwable throwable, RegionStorageInfo regionStorageInfo, ChunkPos chunkPos) - Specified by:
reportChunkLoadFailurein interfaceChunkIOErrorReporter
-
reportChunkSaveFailure
public void reportChunkSaveFailure(Throwable throwable, RegionStorageInfo regionStorageInfo, ChunkPos chunkPos) - Specified by:
reportChunkSaveFailurein interfaceChunkIOErrorReporter
-
potionBrewing
-
serverLinks
-