Package net.minecraft.client.server
Class IntegratedServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
net.minecraft.client.server.IntegratedServer
- All Implemented Interfaces:
AutoCloseable,Executor,CommandSource,ServerInfo,ProfilerMeasured,TaskScheduler<TickTask>,ChunkIOErrorReporter
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LanServerPingerprivate static final org.slf4j.Loggerprivate static final intprivate final Minecraftprivate booleanprivate intprivate GameTypeprivate intprivate UUIDFields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, storageSource, VANILLA_BRAND, worldDataFields inherited from class net.minecraft.util.thread.BlockableEventLoop
BLOCK_TIME_NANOSFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionIntegratedServer(Thread pServerThread, Minecraft pMinecraft, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, Services pServices, ChunkProgressListenerFactory pProgressListenerFactory) -
Method Summary
Modifier and TypeMethodDescriptionfillServerSystemReport(SystemReport pReport) booleanintintintgetPort()intintgetScaledTrackingDistance(int pTrackingDistance) protected LocalSampleLoggervoidhalt(boolean pWaitForServer) Sets the serverRunning variable to false, in order to get the server to shut down.booleanbooleanbooleanbooleanbooleanisPaused()booleanbooleanisSingleplayerOwner(com.mojang.authlib.GameProfile pProfile) booleanvoidonServerCrash(CrashReport pReport) Called on exit from the main run() loop.booleanpublishServer(GameType pGameMode, boolean pCheats, int pPort) voidreportChunkLoadFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) voidreportChunkSaveFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) booleansaveEverything(boolean pSuppressLog, boolean pFlush, boolean pForced) voidsetDefaultGameType(GameType pGameMode) Sets the game type for all worlds.voidbooleanbooleanvoidprivate voidvoidtickServer(BooleanSupplier pHasTimeLeft) Main function called by run() every loop.private voidMethods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, acceptsTransfers, addTickable, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceSecureProfile, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceDifficulty, forceTimeSynchronization, forgeGetWorldMap, fuelValues, getAbsoluteMaxWorldSize, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCommands, getCommandStorage, getCompressionThreshold, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getFunctions, getGameRules, getKeyPair, getLevel, getLocalIp, getMaxChainedNeighborUpdates, getMaxPlayers, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerIdleTimeout, getPlayerList, getPlayerNames, getPreventProxyConnections, getProfileCache, getProfileKeySignatureValidator, getProfilePermissions, getProfileRepository, getProxy, getRecipeManager, getResourceManager, getRunningThread, getScoreboard, getServerModName, getServerResourcePack, getServerResources, getServerVersion, getSessionService, getSingleplayerProfile, getSpawnProtectionRadius, getSpawnRadius, getStatus, getStatusJson, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, handleCustomClickAction, hasGui, hidesOnlinePlayers, initializeKeyPair, invalidateStatus, isCurrentlySaving, isDemo, isEnforceWhitelist, isFlightAllowed, isHardcore, isLevelEnabled, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isSpawningMonsters, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, markWorldsDirty, onServerExit, onTickRateChanged, overworld, pauseWhileEmptySeconds, pollTask, potionBrewing, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportPacketHandlingException, runServer, saveAllChunks, scheduleExecutables, sendSystemMessage, serverLinks, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFatalException, setFlightAllowed, setId, setLocalIp, setMotd, setPlayerIdleTimeout, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setSingleplayerProfile, setUsesAuthentication, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopTimeProfiler, subscribeToDebugSample, throwIfFatalException, tickChildren, tickConnection, tickRateManager, usesAuthentication, waitForTasks, waitUntilNextTick, wrapRunnableMethods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTaskMethods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isNonRecoverable, isSameThread, name, profiledMetrics, runAllTasks, schedule, submit, submit, submitAsyncMethods 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.TaskScheduler
scheduleWithResult
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
MIN_SIM_DISTANCE
private static final int MIN_SIM_DISTANCE- See Also:
-
minecraft
-
paused
private boolean paused -
publishedPort
private int publishedPort -
publishedGameType
-
lanPinger
-
uuid
-
previousSimulationDistance
private int previousSimulationDistance
-
-
Constructor Details
-
IntegratedServer
public IntegratedServer(Thread pServerThread, Minecraft pMinecraft, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, Services pServices, ChunkProgressListenerFactory pProgressListenerFactory)
-
-
Method Details
-
initServer
public boolean initServer()- Specified by:
initServerin classMinecraftServer
-
isPaused
public boolean isPaused()- Overrides:
isPausedin classMinecraftServer
-
tickServer
Main function called by run() every loop.- Overrides:
tickServerin classMinecraftServer
-
getTickTimeLogger
- Specified by:
getTickTimeLoggerin classMinecraftServer
-
isTickTimeLoggingEnabled
public boolean isTickTimeLoggingEnabled()- Specified by:
isTickTimeLoggingEnabledin classMinecraftServer
-
tickPaused
private void tickPaused() -
shouldRconBroadcast
public boolean shouldRconBroadcast()- Specified by:
shouldRconBroadcastin classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin interfaceCommandSource- Specified by:
shouldInformAdminsin classMinecraftServer
-
getServerDirectory
- Overrides:
getServerDirectoryin classMinecraftServer
-
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServerin classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()- Specified by:
getRateLimitPacketsPerSecondin classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()- Specified by:
isEpollEnabledin classMinecraftServer
-
onServerCrash
Called on exit from the main run() loop.- Overrides:
onServerCrashin classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReportin classMinecraftServer
-
getModdedStatus
- Overrides:
getModdedStatusin classMinecraftServer
-
publishServer
- Overrides:
publishServerin classMinecraftServer
-
stopServer
public void stopServer()- Overrides:
stopServerin classMinecraftServer
-
halt
public void halt(boolean pWaitForServer) Sets the serverRunning variable to false, in order to get the server to shut down.- Overrides:
haltin classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublishedin classMinecraftServer
-
getPort
public int getPort()- Overrides:
getPortin classMinecraftServer
-
setDefaultGameType
Sets the game type for all worlds.- Overrides:
setDefaultGameTypein classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()- Specified by:
isCommandBlockEnabledin classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevelin classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevelin classMinecraftServer
-
setUUID
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile pProfile) - Specified by:
isSingleplayerOwnerin classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int pTrackingDistance) - Overrides:
getScaledTrackingDistancein classMinecraftServer
-
forceSynchronousWrites
public boolean forceSynchronousWrites()- Overrides:
forceSynchronousWritesin classMinecraftServer
-
getForcedGameType
- Overrides:
getForcedGameTypein classMinecraftServer
-
saveEverything
public boolean saveEverything(boolean pSuppressLog, boolean pFlush, boolean pForced) - Overrides:
saveEverythingin classMinecraftServer
-
warnOnLowDiskSpace
private void warnOnLowDiskSpace() -
reportChunkLoadFailure
public void reportChunkLoadFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) - Specified by:
reportChunkLoadFailurein interfaceChunkIOErrorReporter- Overrides:
reportChunkLoadFailurein classMinecraftServer
-
reportChunkSaveFailure
public void reportChunkSaveFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) - Specified by:
reportChunkSaveFailurein interfaceChunkIOErrorReporter- Overrides:
reportChunkSaveFailurein classMinecraftServer
-