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
,ProcessorHandle<TickTask>
,ChunkIOErrorReporter
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LanServerPinger
private static final org.slf4j.Logger
private static final int
private final Minecraft
private boolean
private int
private GameType
private int
private UUID
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, storageSource, VANILLA_BRAND, worldData
Fields 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) boolean
int
int
int
getPort()
int
int
getScaledTrackingDistance
(int pTrackingDistance) protected LocalSampleLogger
void
halt
(boolean pWaitForServer) Sets the serverRunning variable to false, in order to get the server to shut down.boolean
boolean
boolean
boolean
boolean
isPaused()
boolean
boolean
isSingleplayerOwner
(com.mojang.authlib.GameProfile p_120045_) boolean
void
onServerCrash
(CrashReport pReport) Called on exit from the main run() loop.boolean
publishServer
(GameType pGameMode, boolean pCheats, int pPort) void
reportChunkLoadFailure
(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) void
reportChunkSaveFailure
(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) boolean
saveEverything
(boolean pSuppressLog, boolean pFlush, boolean pForced) void
setDefaultGameType
(GameType pGameMode) Sets the game type for all worlds.void
boolean
boolean
void
private void
void
tickServer
(BooleanSupplier pHasTimeLeft) Main function called by run() every loop.private void
Methods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, acceptsTransfers, addTickable, areNpcsEnabled, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceSecureProfile, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceDifficulty, forceTimeSynchronization, forgeGetWorldMap, 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, getProfiler, getProfileRepository, getProxy, getRecipeManager, getResourceManager, getRunningThread, getScoreboard, getServerModName, getServerResourcePack, getServerResources, getServerVersion, getSessionService, getSingleplayerProfile, getSpawnProtectionRadius, getSpawnRadius, getStatus, getStatusJson, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, hasGui, hidesOnlinePlayers, initializeKeyPair, invalidateStatus, isCurrentlySaving, isDemo, isEnforceWhitelist, isFlightAllowed, isHardcore, isLevelEnabled, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isSpawningAnimals, isSpawningMonsters, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, markWorldsDirty, onServerExit, onTickRateChanged, overworld, pollTask, potionBrewing, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, 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, tickRateManager, usesAuthentication, waitForTasks, waitUntilNextTick, wrapRunnable
Methods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTask
Methods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter
reportMisplacedChunk
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither
-
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:
initServer
in classMinecraftServer
-
isPaused
public boolean isPaused()- Overrides:
isPaused
in classMinecraftServer
-
tickServer
Main function called by run() every loop.- Overrides:
tickServer
in classMinecraftServer
-
getTickTimeLogger
- Specified by:
getTickTimeLogger
in classMinecraftServer
-
isTickTimeLoggingEnabled
public boolean isTickTimeLoggingEnabled()- Specified by:
isTickTimeLoggingEnabled
in classMinecraftServer
-
tickPaused
private void tickPaused() -
shouldRconBroadcast
public boolean shouldRconBroadcast()- Specified by:
shouldRconBroadcast
in classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceCommandSource
- Specified by:
shouldInformAdmins
in classMinecraftServer
-
getServerDirectory
- Overrides:
getServerDirectory
in classMinecraftServer
-
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServer
in classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()- Specified by:
getRateLimitPacketsPerSecond
in classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()- Specified by:
isEpollEnabled
in classMinecraftServer
-
onServerCrash
Called on exit from the main run() loop.- Overrides:
onServerCrash
in classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReport
in classMinecraftServer
-
getModdedStatus
- Overrides:
getModdedStatus
in classMinecraftServer
-
publishServer
- Overrides:
publishServer
in classMinecraftServer
-
stopServer
public void stopServer()- Overrides:
stopServer
in classMinecraftServer
-
halt
public void halt(boolean pWaitForServer) Sets the serverRunning variable to false, in order to get the server to shut down.- Overrides:
halt
in classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublished
in classMinecraftServer
-
getPort
public int getPort()- Overrides:
getPort
in classMinecraftServer
-
setDefaultGameType
Sets the game type for all worlds.- Overrides:
setDefaultGameType
in classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()- Specified by:
isCommandBlockEnabled
in classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevel
in classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevel
in classMinecraftServer
-
setUUID
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_120045_) - Specified by:
isSingleplayerOwner
in classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int pTrackingDistance) - Overrides:
getScaledTrackingDistance
in classMinecraftServer
-
forceSynchronousWrites
public boolean forceSynchronousWrites()- Overrides:
forceSynchronousWrites
in classMinecraftServer
-
getForcedGameType
- Overrides:
getForcedGameType
in classMinecraftServer
-
saveEverything
public boolean saveEverything(boolean pSuppressLog, boolean pFlush, boolean pForced) - Overrides:
saveEverything
in classMinecraftServer
-
warnOnLowDiskSpace
private void warnOnLowDiskSpace() -
reportChunkLoadFailure
public void reportChunkLoadFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) - Specified by:
reportChunkLoadFailure
in interfaceChunkIOErrorReporter
- Overrides:
reportChunkLoadFailure
in classMinecraftServer
-
reportChunkSaveFailure
public void reportChunkSaveFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) - Specified by:
reportChunkSaveFailure
in interfaceChunkIOErrorReporter
- Overrides:
reportChunkSaveFailure
in classMinecraftServer
-