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 final SimpleGizmoCollectorprivate @Nullable LanServerPingerprivate List<SimpleGizmoCollector.GizmoInstance> private static final org.slf4j.Loggerstatic final intprivate static final intprivate final Minecraftprivate booleanprivate intprivate @Nullable GameTypeprivate intprivate @Nullable UUIDFields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, SPAWN_POSITION_SEARCH_RADIUS, 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 serverThread, Minecraft minecraft, LevelStorageSource.LevelStorageAccess storageSource, PackRepository packRepository, WorldStem worldStem, Services services, LevelLoadListener levelLoadListener) -
Method Summary
Modifier and TypeMethodDescriptionfillServerSystemReport(SystemReport p_174970_) boolean@Nullable GameTypeintintgetPort()intintgetScaledTrackingDistance(int p_120056_) protected LocalSampleLoggervoidhalt(boolean waitForShutdown) Sets the running variable tofalse, in order to get the server to shut down.booleanbooleanbooleanisPaused()booleanbooleanisSingleplayerOwner(NameAndId p_433537_) booleanvoidonServerCrash(CrashReport report) Called on exit from the main run() loop.voidprocessPacketsAndTick(boolean p_470835_) booleanpublishServer(@Nullable GameType gameMode, boolean cheats, int port) voidreportChunkLoadFailure(Throwable p_352390_, RegionStorageInfo p_352401_, ChunkPos p_330829_) voidreportChunkSaveFailure(Throwable p_352264_, RegionStorageInfo p_352355_, ChunkPos p_331440_) booleansaveEverything(boolean p_332035_, boolean p_331844_, boolean p_330847_) voidsetDefaultGameType(GameType gameMode) Sets the game type for all worlds.voidbooleanbooleanvoidprivate voidvoidtickServer(BooleanSupplier haveTime) Main function called by runServer() every loop.booleanprivate voidMethods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, acceptsTransfers, addTickable, allowFlight, cancelRecordingMetrics, close, configurePackRepository, createChunkLoadStatusView, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, debugSubscribers, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceGameTypeForPlayers, enforceSecureProfile, executeIfPossible, fillSystemReport, findRespawnDimension, finishRecordingMetrics, forceDifficulty, forceTimeSynchronization, forgeGetWorldMap, fuelValues, getAbsoluteMaxWorldSize, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCodeOfConducts, getCommands, getCommandStorage, getCompressionThreshold, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getFunctions, getKeyPair, getLevel, getLevelLoadListener, getLocalIp, getMaxChainedNeighborUpdates, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerList, getPlayerNames, getPreventProxyConnections, getProfilePermissions, getProxy, getRecipeManager, getResourceManager, getRespawnData, getRunningThread, getScoreboard, getServerActivityMonitor, getServerModName, getServerResourcePack, getServerResources, getServerVersion, getSingleplayerProfile, getStatus, getStatusJson, getStopwatches, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, handleCustomClickAction, hidesOnlinePlayers, initializeKeyPair, invalidateStatus, isAutoSave, isCurrentlySaving, isDemo, isEnforceWhitelist, isHardcore, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, isUsingWhitelist, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, markWorldsDirty, notificationManager, onGameRuleChanged, onServerExit, onTickRateChanged, overworld, packetProcessor, pauseWhenEmptySeconds, playerIdleTimeout, pollTask, potionBrewing, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportPacketHandlingException, runServer, saveAllChunks, scheduleExecutables, sendSystemMessage, serverLinks, services, setAutoSave, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFatalException, setId, setLocalIp, setMotd, setPlayerIdleTimeout, setPlayerList, setPort, setPreventProxyConnections, setRespawnData, setSingleplayerProfile, setUsesAuthentication, setUsingWhitelist, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopTimeProfiler, throwIfFatalException, tickChildren, tickConnection, tickRateManager, updateEffectiveRespawnData, updateMobSpawningFlags, 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, shouldRunAllTasks, 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:
-
MAX_PLAYERS
public static final int MAX_PLAYERS- See Also:
-
minecraft
-
paused
private boolean paused -
publishedPort
private int publishedPort -
publishedGameType
-
lanPinger
-
uuid
-
previousSimulationDistance
private int previousSimulationDistance -
latestTicksGizmos
-
gizmoCollector
-
-
Constructor Details
-
IntegratedServer
public IntegratedServer(Thread serverThread, Minecraft minecraft, LevelStorageSource.LevelStorageAccess storageSource, PackRepository packRepository, WorldStem worldStem, Services services, LevelLoadListener levelLoadListener)
-
-
Method Details
-
initServer
public boolean initServer()- Specified by:
initServerin classMinecraftServer
-
isPaused
public boolean isPaused()- Overrides:
isPausedin classMinecraftServer
-
processPacketsAndTick
public void processPacketsAndTick(boolean p_470835_) - Overrides:
processPacketsAndTickin classMinecraftServer
-
tickServer
Main function called by runServer() 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
-
useNativeTransport
public boolean useNativeTransport()- Specified by:
useNativeTransportin 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 waitForShutdown) Sets the running variable tofalse, 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
-
operatorUserPermissions
- Specified by:
operatorUserPermissionsin classMinecraftServer
-
getFunctionCompilationPermissions
- Specified by:
getFunctionCompilationPermissionsin classMinecraftServer
-
setUUID
-
isSingleplayerOwner
- Specified by:
isSingleplayerOwnerin classMinecraftServer
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int p_120056_) - Overrides:
getScaledTrackingDistancein classMinecraftServer
-
forceSynchronousWrites
public boolean forceSynchronousWrites()- Overrides:
forceSynchronousWritesin classMinecraftServer
-
getForcedGameType
- Overrides:
getForcedGameTypein classMinecraftServer
-
selectLevelLoadFocusPos
- Overrides:
selectLevelLoadFocusPosin classMinecraftServer
-
saveEverything
public boolean saveEverything(boolean p_332035_, boolean p_331844_, boolean p_330847_) - Overrides:
saveEverythingin classMinecraftServer
-
warnOnLowDiskSpace
private void warnOnLowDiskSpace() -
reportChunkLoadFailure
public void reportChunkLoadFailure(Throwable p_352390_, RegionStorageInfo p_352401_, ChunkPos p_330829_) - Specified by:
reportChunkLoadFailurein interfaceChunkIOErrorReporter- Overrides:
reportChunkLoadFailurein classMinecraftServer
-
reportChunkSaveFailure
public void reportChunkSaveFailure(Throwable p_352264_, RegionStorageInfo p_352355_, ChunkPos p_331440_) - Specified by:
reportChunkSaveFailurein interfaceChunkIOErrorReporter- Overrides:
reportChunkSaveFailurein classMinecraftServer
-
getMaxPlayers
public int getMaxPlayers() -
getPerTickGizmos
-