Package net.minecraft.server.integrated
Class IntegratedServer
java.lang.Object
net.minecraft.util.thread.ThreadExecutor<ServerTask>
net.minecraft.util.thread.ReentrantThreadExecutor<ServerTask>
net.minecraft.server.MinecraftServer
net.minecraft.server.integrated.IntegratedServer
- All Implemented Interfaces:
AutoCloseable,Executor,QueryableServer,CommandOutput,MessageListener<ServerTask>,SampleableExecutor
- Mappings:
Namespace Name official gndintermediary net/minecraft/class_1132named net/minecraft/server/integrated/IntegratedServer
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ServerResourcePackProperties -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final MinecraftClientprivate static final intprivate @Nullable LanServerPingerprivate intprivate static final Loggerprivate booleanprivate intFields inherited from class net.minecraft.server.MinecraftServer
ANONYMOUS_PLAYER_PROFILE, apiServices, DEMO_LEVEL_INFO, MAX_WORLD_BORDER_RADIUS, proxy, saveHandler, saveProperties, session, VANILLAFields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY -
Constructor Summary
ConstructorsConstructorDescriptionIntegratedServer(Thread serverThread, MinecraftClient client, LevelStorage.Session session, ResourcePackManager dataPackManager, SaveLoader saveLoader, ApiServices apiServices, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) -
Method Summary
Modifier and TypeMethodDescriptionaddExtraSystemDetails(SystemDetails details) intadjustTrackingDistance(int initialDistance) booleanSpecifies whether command blocks can execute commands on the server.protected MultiValueDebugSampleLogImplReturns the game mode a player should be set to when connecting to the server, ornullif none is set.intintintintprivate voidbooleanChecks whether this server is a dedicated server.booleanisHost(com.mojang.authlib.GameProfile profile) booleanisPaused()booleanisRemote()booleanbooleanOpens a server for LAN connections.voidsetCrashReport(CrashReport report) voidsetDefaultGameMode(GameMode gameMode) voidsetLocalPlayerUuid(UUID localPlayerUuid) booleanSetups a Minecraft server to be ready for players to connect.booleanbooleanbooleanvoidshutdown()voidstop(boolean waitForShutdown) Stops this server.booleanvoidtick(BooleanSupplier shouldKeepTicking) Methods inherited from class net.minecraft.server.MinecraftServer
acceptsStatusQuery, acceptsTransfers, addServerGuiTickable, addSystemDetails, canExecute, close, createFilterer, createTask, createWorlds, dumpProperties, endTickMetrics, executeSync, executeTask, exit, forcePlayerSampleUpdate, forceStopRecorder, generateKeyPair, getAdvancementLoader, getAverageNanosPerTick, getAverageTickTime, getBossBarManager, getCombinedDynamicRegistries, getCommandFunctionManager, getCommandManager, getCommandSource, getCurrentPlayerCount, getDataCommandStorage, getDataFixer, getDataPackManager, getDefaultGameMode, getFile, getGameProfileRepo, getGameRules, getHostProfile, getIconFile, getKeyPair, getLootManager, getMaxChainedNeighborUpdates, getMaxPlayerCount, getMaxWorldBorderRadius, getMessageDecorator, getNetworkCompressionThreshold, getNetworkIo, getOverworld, getPermissionLevel, getPlayerIdleTimeout, getPlayerInteractionManager, getPlayerManager, getPlayerNames, getProfiler, getProxy, getRecipeManager, getRegistryManager, getResourceManager, getResourcePackProperties, getSavePath, getSaveProperties, getScoreboard, getServerIp, getServerMetadata, getServerModName, getServerMotd, getServicesSignatureVerifier, getSessionService, getSpawnProtectionRadius, getSpawnRadius, getStructureTemplateManager, getThread, getTickManager, getTicks, getTickTimes, getTimeReference, getUserCache, getVersion, getWorld, getWorldRegistryKeys, getWorlds, hasGui, hideOnlinePlayers, isDebugRunning, isDemo, isEnforceWhitelist, isFlightEnabled, isHardcore, isLoading, isMonsterSpawningEnabled, isNetherAllowed, isOnlineMode, isPvpEnabled, isRecorderActive, isRunning, isSaving, isSingleplayer, isSpawnProtected, isStopped, isStopping, kickNonWhitelistedPlayers, loadDataPacks, loadWorld, logChatMessage, reloadResources, requireResourcePack, resetRecorder, runServer, runTask, runTasksTillTickEnd, save, saveAll, sendMessage, sendTimeUpdatePackets, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightEnabled, setHostProfile, setMotd, setOnlineMode, setPlayerIdleTimeout, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setServerId, setServerIp, setServerPort, setupRecorder, shouldEnforceSecureProfile, shouldExecuteAsync, shouldLogIps, shouldPreventProxyConnections, shouldReceiveFeedback, shouldSpawnAnimals, shouldSpawnNpcs, shouldTrackOutput, startDebug, startServer, stopDebug, stopRecorder, subscribeToDebugSample, tickWorlds, updateAutosaveTicks, updateDifficulty, waitForTasksMethods inherited from class net.minecraft.util.thread.ReentrantThreadExecutor
hasRunningTasksMethods inherited from class net.minecraft.util.thread.ThreadExecutor
cancelTasks, createSamplers, execute, getName, getTaskCount, isOnThread, runTasks, runTasks, send, submit, submit, submitAndJoinMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.server.command.CommandOutput
cannotBeSilencedMethods inherited from interface net.minecraft.util.thread.MessageListener
ask, askFallible
-
Field Details
-
LOGGER
- Mappings:
Namespace Name Mixin selector official kLgnd;k:Lorg/slf4j/Logger;intermediary field_5520Lnet/minecraft/class_1132;field_5520:Lorg/slf4j/Logger;named LOGGERLnet/minecraft/server/integrated/IntegratedServer;LOGGER:Lorg/slf4j/Logger;
-
field_34964
private static final int field_34964- See Also:
- Mappings:
Namespace Name Mixin selector official lLgnd;l:Iintermediary field_34964Lnet/minecraft/class_1132;field_34964:Inamed field_34964Lnet/minecraft/server/integrated/IntegratedServer;field_34964:I
-
client
- Mappings:
Namespace Name Mixin selector official mLgnd;m:Lezg;intermediary field_5518Lnet/minecraft/class_1132;field_5518:Lnet/minecraft/class_310;named clientLnet/minecraft/server/integrated/IntegratedServer;client:Lnet/minecraft/client/MinecraftClient;
-
paused
private boolean paused- Mappings:
Namespace Name Mixin selector official nLgnd;n:Zintermediary field_5524Lnet/minecraft/class_1132;field_5524:Znamed pausedLnet/minecraft/server/integrated/IntegratedServer;paused:Z
-
lanPort
private int lanPort- Mappings:
Namespace Name Mixin selector official oLgnd;o:Iintermediary field_5522Lnet/minecraft/class_1132;field_5522:Inamed lanPortLnet/minecraft/server/integrated/IntegratedServer;lanPort:I
-
forcedGameMode
- Mappings:
Namespace Name Mixin selector official pLgnd;p:Lcww;intermediary field_28075Lnet/minecraft/class_1132;field_28075:Lnet/minecraft/class_1934;named forcedGameModeLnet/minecraft/server/integrated/IntegratedServer;forcedGameMode:Lnet/minecraft/world/GameMode;
-
lanPinger
- Mappings:
Namespace Name Mixin selector official qLgnd;q:Lgng;intermediary field_5519Lnet/minecraft/class_1132;field_5519:Lnet/minecraft/class_1133;named lanPingerLnet/minecraft/server/integrated/IntegratedServer;lanPinger:Lnet/minecraft/client/network/LanServerPinger;
-
localPlayerUuid
- Mappings:
Namespace Name Mixin selector official rLgnd;r:Ljava/util/UUID;intermediary field_5521Lnet/minecraft/class_1132;field_5521:Ljava/util/UUID;named localPlayerUuidLnet/minecraft/server/integrated/IntegratedServer;localPlayerUuid:Ljava/util/UUID;
-
simulationDistance
private int simulationDistance- Mappings:
Namespace Name Mixin selector official sLgnd;s:Iintermediary field_34965Lnet/minecraft/class_1132;field_34965:Inamed simulationDistanceLnet/minecraft/server/integrated/IntegratedServer;simulationDistance:I
-
-
Constructor Details
-
IntegratedServer
public IntegratedServer(Thread serverThread, MinecraftClient client, LevelStorage.Session session, ResourcePackManager dataPackManager, SaveLoader saveLoader, ApiServices apiServices, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) - Mappings:
Namespace Name Mixin selector official <init>Lgnd;<init>(Ljava/lang/Thread;Lezg;Lekk$c;Larz;Lakd;Laka;Lapp;)Vintermediary <init>Lnet/minecraft/class_1132;<init>(Ljava/lang/Thread;Lnet/minecraft/class_310;Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_6904;Lnet/minecraft/class_7497;Lnet/minecraft/class_3950;)Vnamed <init>Lnet/minecraft/server/integrated/IntegratedServer;<init>(Ljava/lang/Thread;Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/world/level/storage/LevelStorage$Session;Lnet/minecraft/resource/ResourcePackManager;Lnet/minecraft/server/SaveLoader;Lnet/minecraft/util/ApiServices;Lnet/minecraft/server/WorldGenerationProgressListenerFactory;)V
-
-
Method Details
-
setupServer
public boolean setupServer()Setups a Minecraft server to be ready for players to connect. This method does several things including loading server properties and loading worlds.- Specified by:
setupServerin classMinecraftServer- Returns:
- true if the Minecraft server was successfully setup, false if the server failed to be setup.
- Mappings:
Namespace Name Mixin selector official eLnet/minecraft/server/MinecraftServer;e()Zintermediary method_3823Lnet/minecraft/server/MinecraftServer;method_3823()Znamed setupServerLnet/minecraft/server/MinecraftServer;setupServer()Z
-
isPaused
public boolean isPaused()- Overrides:
isPausedin classMinecraftServer- Mappings:
Namespace Name Mixin selector official DLnet/minecraft/server/MinecraftServer;D()Zintermediary method_54809Lnet/minecraft/server/MinecraftServer;method_54809()Znamed isPausedLnet/minecraft/server/MinecraftServer;isPaused()Z
-
tick
- Overrides:
tickin classMinecraftServer- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Ljava/util/function/BooleanSupplier;)Vintermediary method_3748Lnet/minecraft/server/MinecraftServer;method_3748(Ljava/util/function/BooleanSupplier;)Vnamed tickLnet/minecraft/server/MinecraftServer;tick(Ljava/util/function/BooleanSupplier;)V
-
getDebugSampleLog
- Specified by:
getDebugSampleLogin classMinecraftServer- Mappings:
Namespace Name Mixin selector official aLgnd;a()Lbiw;intermediary method_56881Lnet/minecraft/class_1132;method_56881()Lnet/minecraft/class_9191;named getDebugSampleLogLnet/minecraft/server/integrated/IntegratedServer;getDebugSampleLog()Lnet/minecraft/util/profiler/MultiValueDebugSampleLogImpl;
-
shouldPushTickTimeLog
public boolean shouldPushTickTimeLog()- Specified by:
shouldPushTickTimeLogin classMinecraftServer- Mappings:
Namespace Name Mixin selector official gLnet/minecraft/server/MinecraftServer;g()Zintermediary method_56626Lnet/minecraft/server/MinecraftServer;method_56626()Znamed shouldPushTickTimeLogLnet/minecraft/server/MinecraftServer;shouldPushTickTimeLog()Z
-
incrementTotalWorldTimeStat
private void incrementTotalWorldTimeStat()- Mappings:
Namespace Name Mixin selector official bLgnd;b()Vintermediary method_36439Lnet/minecraft/class_1132;method_36439()Vnamed incrementTotalWorldTimeStatLnet/minecraft/server/integrated/IntegratedServer;incrementTotalWorldTimeStat()V
-
shouldBroadcastRconToOps
public boolean shouldBroadcastRconToOps()- Specified by:
shouldBroadcastRconToOpsin classMinecraftServer- Mappings:
Namespace Name Mixin selector official mLnet/minecraft/server/MinecraftServer;m()Zintermediary method_3732Lnet/minecraft/server/MinecraftServer;method_3732()Znamed shouldBroadcastRconToOpsLnet/minecraft/server/MinecraftServer;shouldBroadcastRconToOps()Z
-
shouldBroadcastConsoleToOps
public boolean shouldBroadcastConsoleToOps()- Specified by:
shouldBroadcastConsoleToOpsin interfaceCommandOutput- Specified by:
shouldBroadcastConsoleToOpsin classMinecraftServer- Mappings:
Namespace Name Mixin selector official U_Ldt;U_()Zintermediary method_9201Lnet/minecraft/class_2165;method_9201()Znamed shouldBroadcastConsoleToOpsLnet/minecraft/server/command/CommandOutput;shouldBroadcastConsoleToOps()Z
-
getRunDirectory
- Overrides:
getRunDirectoryin classMinecraftServer- Mappings:
Namespace Name Mixin selector official CLnet/minecraft/server/MinecraftServer;C()Ljava/io/File;intermediary method_3831Lnet/minecraft/server/MinecraftServer;method_3831()Ljava/io/File;named getRunDirectoryLnet/minecraft/server/MinecraftServer;getRunDirectory()Ljava/io/File;
-
isDedicated
public boolean isDedicated()Checks whether this server is a dedicated server.A dedicated server refers to a Minecraft server implementation which is detached from a parent Minecraft client process. A dedicated Minecraft server only accepts remote connections.
- Specified by:
isDedicatedin classMinecraftServer- Mappings:
Namespace Name Mixin selector official nLnet/minecraft/server/MinecraftServer;n()Zintermediary method_3816Lnet/minecraft/server/MinecraftServer;method_3816()Znamed isDedicatedLnet/minecraft/server/MinecraftServer;isDedicated()Z
-
getRateLimit
public int getRateLimit()- Specified by:
getRateLimitin classMinecraftServer- Mappings:
Namespace Name Mixin selector official oLnet/minecraft/server/MinecraftServer;o()Iintermediary method_30612Lnet/minecraft/server/MinecraftServer;method_30612()Inamed getRateLimitLnet/minecraft/server/MinecraftServer;getRateLimit()I
-
isUsingNativeTransport
public boolean isUsingNativeTransport()- Specified by:
isUsingNativeTransportin classMinecraftServer- Mappings:
Namespace Name Mixin selector official pLnet/minecraft/server/MinecraftServer;p()Zintermediary method_3759Lnet/minecraft/server/MinecraftServer;method_3759()Znamed isUsingNativeTransportLnet/minecraft/server/MinecraftServer;isUsingNativeTransport()Z
-
setCrashReport
- Overrides:
setCrashReportin classMinecraftServer- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Lo;)Vintermediary method_3744Lnet/minecraft/server/MinecraftServer;method_3744(Lnet/minecraft/class_128;)Vnamed setCrashReportLnet/minecraft/server/MinecraftServer;setCrashReport(Lnet/minecraft/util/crash/CrashReport;)V
-
addExtraSystemDetails
- Specified by:
addExtraSystemDetailsin classMinecraftServer- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Lab;)Lab;intermediary method_3859Lnet/minecraft/server/MinecraftServer;method_3859(Lnet/minecraft/class_6396;)Lnet/minecraft/class_6396;named addExtraSystemDetailsLnet/minecraft/server/MinecraftServer;addExtraSystemDetails(Lnet/minecraft/util/SystemDetails;)Lnet/minecraft/util/SystemDetails;
-
getModStatus
- Overrides:
getModStatusin classMinecraftServer- Mappings:
Namespace Name Mixin selector official PLnet/minecraft/server/MinecraftServer;P()Lawv;intermediary method_24307Lnet/minecraft/server/MinecraftServer;method_24307()Lnet/minecraft/class_6683;named getModStatusLnet/minecraft/server/MinecraftServer;getModStatus()Lnet/minecraft/util/ModStatus;
-
openToLan
Opens a server for LAN connections. This is only supported on an integrated server, a dedicated server will always fail to open to LAN.- Overrides:
openToLanin classMinecraftServer- Parameters:
gameMode- the game mode connecting players will have set by defaultcheatsAllowed- whether players on the server have operator permissionsport- the port to open up to LAN connections- Returns:
- whether the server was successfully opened to LAN
- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Lcww;ZI)Zintermediary method_3763Lnet/minecraft/server/MinecraftServer;method_3763(Lnet/minecraft/class_1934;ZI)Znamed openToLanLnet/minecraft/server/MinecraftServer;openToLan(Lnet/minecraft/world/GameMode;ZI)Z
-
shutdown
public void shutdown()- Overrides:
shutdownin classMinecraftServer- Mappings:
Namespace Name Mixin selector official vLnet/minecraft/server/MinecraftServer;v()Vintermediary method_3782Lnet/minecraft/server/MinecraftServer;method_3782()Vnamed shutdownLnet/minecraft/server/MinecraftServer;shutdown()V
-
stop
public void stop(boolean waitForShutdown) Stops this server.- Overrides:
stopin classMinecraftServer- Parameters:
waitForShutdown- whether to wait for server shutdown, if called outside the server thread- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Z)Vintermediary method_3747Lnet/minecraft/server/MinecraftServer;method_3747(Z)Vnamed stopLnet/minecraft/server/MinecraftServer;stop(Z)V
-
isRemote
public boolean isRemote()- Specified by:
isRemotein classMinecraftServer- Mappings:
Namespace Name Mixin selector official rLnet/minecraft/server/MinecraftServer;r()Zintermediary method_3860Lnet/minecraft/server/MinecraftServer;method_3860()Znamed isRemoteLnet/minecraft/server/MinecraftServer;isRemote()Z
-
getServerPort
public int getServerPort()- Overrides:
getServerPortin classMinecraftServer- Mappings:
Namespace Name Mixin selector official RLnet/minecraft/server/MinecraftServer;R()Iintermediary method_3756Lnet/minecraft/server/MinecraftServer;method_3756()Inamed getServerPortLnet/minecraft/server/MinecraftServer;getServerPort()I
-
setDefaultGameMode
- Overrides:
setDefaultGameModein classMinecraftServer- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Lcww;)Vintermediary method_3838Lnet/minecraft/server/MinecraftServer;method_3838(Lnet/minecraft/class_1934;)Vnamed setDefaultGameModeLnet/minecraft/server/MinecraftServer;setDefaultGameMode(Lnet/minecraft/world/GameMode;)V
-
areCommandBlocksEnabled
public boolean areCommandBlocksEnabled()Specifies whether command blocks can execute commands on the server.- Specified by:
areCommandBlocksEnabledin classMinecraftServer- Mappings:
Namespace Name Mixin selector official qLnet/minecraft/server/MinecraftServer;q()Zintermediary method_3812Lnet/minecraft/server/MinecraftServer;method_3812()Znamed areCommandBlocksEnabledLnet/minecraft/server/MinecraftServer;areCommandBlocksEnabled()Z
-
getOpPermissionLevel
public int getOpPermissionLevel()- Specified by:
getOpPermissionLevelin classMinecraftServer- Mappings:
Namespace Name Mixin selector official kLnet/minecraft/server/MinecraftServer;k()Iintermediary method_3798Lnet/minecraft/server/MinecraftServer;method_3798()Inamed getOpPermissionLevelLnet/minecraft/server/MinecraftServer;getOpPermissionLevel()I
-
getFunctionPermissionLevel
public int getFunctionPermissionLevel()- Specified by:
getFunctionPermissionLevelin classMinecraftServer- Mappings:
Namespace Name Mixin selector official lLnet/minecraft/server/MinecraftServer;l()Iintermediary method_21714Lnet/minecraft/server/MinecraftServer;method_21714()Inamed getFunctionPermissionLevelLnet/minecraft/server/MinecraftServer;getFunctionPermissionLevel()I
-
setLocalPlayerUuid
- Mappings:
Namespace Name Mixin selector official aLgnd;a(Ljava/util/UUID;)Vintermediary method_4817Lnet/minecraft/class_1132;method_4817(Ljava/util/UUID;)Vnamed setLocalPlayerUuidLnet/minecraft/server/integrated/IntegratedServer;setLocalPlayerUuid(Ljava/util/UUID;)V
-
isHost
public boolean isHost(com.mojang.authlib.GameProfile profile) - Specified by:
isHostin classMinecraftServer- Mappings:
Namespace Name Mixin selector official aLnet/minecraft/server/MinecraftServer;a(Lcom/mojang/authlib/GameProfile;)Zintermediary method_19466Lnet/minecraft/server/MinecraftServer;method_19466(Lcom/mojang/authlib/GameProfile;)Znamed isHostLnet/minecraft/server/MinecraftServer;isHost(Lcom/mojang/authlib/GameProfile;)Z
-
adjustTrackingDistance
public int adjustTrackingDistance(int initialDistance) - Overrides:
adjustTrackingDistancein classMinecraftServer- Mappings:
Namespace Name Mixin selector official bLnet/minecraft/server/MinecraftServer;b(I)Iintermediary method_27903Lnet/minecraft/server/MinecraftServer;method_27903(I)Inamed adjustTrackingDistanceLnet/minecraft/server/MinecraftServer;adjustTrackingDistance(I)I
-
syncChunkWrites
public boolean syncChunkWrites()- Overrides:
syncChunkWritesin classMinecraftServer- Mappings:
Namespace Name Mixin selector official baLnet/minecraft/server/MinecraftServer;ba()Zintermediary method_27051Lnet/minecraft/server/MinecraftServer;method_27051()Znamed syncChunkWritesLnet/minecraft/server/MinecraftServer;syncChunkWrites()Z
-
getForcedGameMode
Returns the game mode a player should be set to when connecting to the server, ornullif none is set.- Overrides:
getForcedGameModein classMinecraftServer- Mappings:
Namespace Name Mixin selector official bfLnet/minecraft/server/MinecraftServer;bf()Lcww;intermediary method_3761Lnet/minecraft/server/MinecraftServer;method_3761()Lnet/minecraft/class_1934;named getForcedGameModeLnet/minecraft/server/MinecraftServer;getForcedGameMode()Lnet/minecraft/world/GameMode;
-