Package net.minecraft.server.integrated
Class IntegratedServer
java.lang.Object
net.minecraft.util.thread.ThreadExecutor<R>
net.minecraft.util.thread.ReentrantThreadExecutor<ServerTask>
net.minecraft.server.MinecraftServer
net.minecraft.server.integrated.IntegratedServer
- All Implemented Interfaces:
AutoCloseable
,Executor
,CommandOutput
,MetricSamplerSupplier
,SnooperListener
,MessageListener<ServerTask>
- Mappings:
Namespace Name official fap
intermediary net/minecraft/class_1132
named net/minecraft/server/integrated/IntegratedServer
-
Field Summary
Modifier and TypeFieldDescriptionprivate final MinecraftClient
static final int
private LanServerPinger
private int
private UUID
private static final Logger
private boolean
Fields inherited from class net.minecraft.server.MinecraftServer
DEMO_LEVEL_INFO, field_33206, lastTickLengths, LEVEL_PROTOCOL, LEVEL_PROTOCOL_NAME, MAX_WORLD_BORDER_RADIUS, proxy, registryManager, RESOURCES_ZIP_FILE_NAME, saveHandler, saveProperties, session, START_TICKET_CHUNK_RADIUS, USER_CACHE_FILE
Fields inherited from interface net.minecraft.server.command.CommandOutput
DUMMY
-
Constructor Summary
ConstructorDescriptionIntegratedServer
(Thread serverThread, MinecraftClient client, DynamicRegistryManager.Impl registryManager, LevelStorage.Session session, ResourcePackManager dataPackManager, ServerResourceManager serverResourceManager, SaveProperties saveProperties, com.mojang.authlib.minecraft.MinecraftSessionService sessionService, com.mojang.authlib.GameProfileRepository gameProfileRepo, UserCache userCache, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addSnooperInfo
(Snooper snooper) int
adjustTrackingDistance
(int initialDistance) boolean
Specifies whether command blocks can execute commands on the server.Returns the game mode a player should be set to when connecting to the server, ornull
if none is set.int
int
int
int
private void
boolean
Checks whether this server is a dedicated server.boolean
isHost
(com.mojang.authlib.GameProfile profile) boolean
isRemote()
boolean
boolean
boolean
Opens a server for LAN connections.populateCrashReport
(SystemDetails systemDetails) void
setCrashReport
(CrashReport report) void
setDefaultGameMode
(GameMode gameMode) void
setLocalPlayerUuid
(UUID localPlayerUuid) boolean
Setups a Minecraft server to be ready for players to connect.boolean
boolean
void
shutdown()
void
stop
(boolean bool) boolean
void
tick
(BooleanSupplier shouldKeepTicking) Methods inherited from class net.minecraft.server.MinecraftServer
acceptsStatusQuery, addInitialSnooperInfo, addServerGuiTickable, canExecute, close, convertLevel, createFilterer, createTask, createWorlds, enableProfiler, executeTask, exit, forcePlayerSampleUpdate, generateKeyPair, getAdvancementLoader, getBossBarManager, getCommandFunctionManager, getCommandManager, getCommandSource, getCurrentPlayerCount, getDataCommandStorage, getDataFixer, getDataPackManager, getDefaultGameMode, getFile, getGameProfileRepo, getGameRules, getIconFile, getItemModifierManager, getKeyPair, getLootManager, getMaxPlayerCount, getMaxWorldBorderRadius, getMetricsData, getNetworkCompressionThreshold, getNetworkIo, getOverworld, getPermissionLevel, getPlayerIdleTimeout, getPlayerInteractionManager, getPlayerManager, getPlayerNames, getPredicateManager, getProfiler, getProxy, getRecipeManager, getRegistryManager, getResourceManager, getResourcePackHash, getResourcePackPrompt, getResourcePackUrl, getSavePath, getSaveProperties, getScoreboard, getServerIp, getServerMetadata, getServerModName, getServerMotd, getServerStartTime, getSessionService, getSnooper, getSpawnProtectionRadius, getSpawnRadius, getStructureManager, getTagManager, getThread, getTicks, getTickTime, getUserCache, getUserName, getVersion, getWorld, getWorldRegistryKeys, getWorlds, hasGui, hasIconFile, isDebugRunning, isDemo, isEnforceWhitelist, isFlightEnabled, isHardcore, isLoading, isMonsterSpawningEnabled, isNetherAllowed, isOnlineMode, isPvpEnabled, isRunning, isRunningMonitor, isSinglePlayer, isSpawnProtected, isStopped, isStopping, kickNonWhitelistedPlayers, loadDataPacks, loadWorld, loadWorldResourcePack, method_16208, method_37113, method_37320, method_37322, method_37323, method_37324, reloadResources, requireResourcePack, runServer, runTask, save, sendSystemMessage, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightEnabled, setMotd, setOnlineMode, setPlayerIdleTimeout, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setResourcePack, setServerId, setServerIp, setServerName, setServerPort, shouldExecuteAsync, shouldPreventProxyConnections, shouldReceiveFeedback, shouldSpawnAnimals, shouldSpawnNpcs, shouldTrackOutput, startServer, stopDebug, tickWorlds, updateDifficulty
Methods inherited from class net.minecraft.util.thread.ReentrantThreadExecutor
hasRunningTasks
Methods inherited from class net.minecraft.util.thread.ThreadExecutor
cancelTasks, execute, getName, getSamplers, getTaskCount, isOnThread, runTasks, runTasks, send, submit, submit, submitAndJoin, waitForTasks
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.command.CommandOutput
cannotBeSilenced
Methods inherited from interface net.minecraft.util.thread.MessageListener
ask, askFallible
-
Field Details
-
field_33015
public static final int field_33015- See Also:
- Mappings:
Namespace Name Mixin selector official p
Lfap;p:I
intermediary field_33015
Lnet/minecraft/class_1132;field_33015:I
named field_33015
Lnet/minecraft/server/integrated/IntegratedServer;field_33015:I
-
LOGGER
- Mappings:
Namespace Name Mixin selector official q
Lfap;q:Lorg/apache/logging/log4j/Logger;
intermediary field_5520
Lnet/minecraft/class_1132;field_5520:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/server/integrated/IntegratedServer;LOGGER:Lorg/apache/logging/log4j/Logger;
-
client
- Mappings:
Namespace Name Mixin selector official r
Lfap;r:Ldvo;
intermediary field_5518
Lnet/minecraft/class_1132;field_5518:Lnet/minecraft/class_310;
named client
Lnet/minecraft/server/integrated/IntegratedServer;client:Lnet/minecraft/client/MinecraftClient;
-
paused
private boolean paused- Mappings:
Namespace Name Mixin selector official s
Lfap;s:Z
intermediary field_5524
Lnet/minecraft/class_1132;field_5524:Z
named paused
Lnet/minecraft/server/integrated/IntegratedServer;paused:Z
-
lanPort
private int lanPort- Mappings:
Namespace Name Mixin selector official t
Lfap;t:I
intermediary field_5522
Lnet/minecraft/class_1132;field_5522:I
named lanPort
Lnet/minecraft/server/integrated/IntegratedServer;lanPort:I
-
forcedGameMode
- Mappings:
Namespace Name Mixin selector official u
Lfap;u:Lbwm;
intermediary field_28075
Lnet/minecraft/class_1132;field_28075:Lnet/minecraft/class_1934;
named forcedGameMode
Lnet/minecraft/server/integrated/IntegratedServer;forcedGameMode:Lnet/minecraft/world/GameMode;
-
lanPinger
- Mappings:
Namespace Name Mixin selector official v
Lfap;v:Lfas;
intermediary field_5519
Lnet/minecraft/class_1132;field_5519:Lnet/minecraft/class_1133;
named lanPinger
Lnet/minecraft/server/integrated/IntegratedServer;lanPinger:Lnet/minecraft/server/LanServerPinger;
-
localPlayerUuid
- Mappings:
Namespace Name Mixin selector official w
Lfap;w:Ljava/util/UUID;
intermediary field_5521
Lnet/minecraft/class_1132;field_5521:Ljava/util/UUID;
named localPlayerUuid
Lnet/minecraft/server/integrated/IntegratedServer;localPlayerUuid:Ljava/util/UUID;
-
-
Constructor Details
-
IntegratedServer
public IntegratedServer(Thread serverThread, MinecraftClient client, DynamicRegistryManager.Impl registryManager, LevelStorage.Session session, ResourcePackManager dataPackManager, ServerResourceManager serverResourceManager, SaveProperties saveProperties, com.mojang.authlib.minecraft.MinecraftSessionService sessionService, com.mojang.authlib.GameProfileRepository gameProfileRepo, UserCache userCache, WorldGenerationProgressListenerFactory worldGenerationProgressListenerFactory) - Mappings:
Namespace Name Mixin selector official <init>
Lfap;<init>(Ljava/lang/Thread;Ldvo;Lgx$b;Ldib$a;Ladi;Lxk;Ldii;Lcom/mojang/authlib/minecraft/MinecraftSessionService;Lcom/mojang/authlib/GameProfileRepository;Laed;Lacb;)V
intermediary <init>
Lnet/minecraft/class_1132;<init>(Ljava/lang/Thread;Lnet/minecraft/class_310;Lnet/minecraft/class_5455$class_5457;Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_5350;Lnet/minecraft/class_5219;Lcom/mojang/authlib/minecraft/MinecraftSessionService;Lcom/mojang/authlib/GameProfileRepository;Lnet/minecraft/class_3312;Lnet/minecraft/class_3950;)V
named <init>
Lnet/minecraft/server/integrated/IntegratedServer;<init>(Ljava/lang/Thread;Lnet/minecraft/client/MinecraftClient;Lnet/minecraft/util/registry/DynamicRegistryManager$Impl;Lnet/minecraft/world/level/storage/LevelStorage$Session;Lnet/minecraft/resource/ResourcePackManager;Lnet/minecraft/resource/ServerResourceManager;Lnet/minecraft/world/SaveProperties;Lcom/mojang/authlib/minecraft/MinecraftSessionService;Lcom/mojang/authlib/GameProfileRepository;Lnet/minecraft/util/UserCache;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:
setupServer
in classMinecraftServer
- Returns:
- true if the Minecraft server was successfully setup, false if the server failed to be setup.
- Mappings:
Namespace Name Mixin selector official e
Lnet/minecraft/server/MinecraftServer;e()Z
intermediary method_3823
Lnet/minecraft/server/MinecraftServer;method_3823()Z
named setupServer
Lnet/minecraft/server/MinecraftServer;setupServer()Z
-
tick
- Overrides:
tick
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lnet/minecraft/server/MinecraftServer;a(Ljava/util/function/BooleanSupplier;)V
intermediary method_3748
Lnet/minecraft/server/MinecraftServer;method_3748(Ljava/util/function/BooleanSupplier;)V
named tick
Lnet/minecraft/server/MinecraftServer;tick(Ljava/util/function/BooleanSupplier;)V
-
incrementTotalWorldTimeStat
private void incrementTotalWorldTimeStat()- Mappings:
Namespace Name Mixin selector official a
Lfap;a()V
intermediary method_36439
Lnet/minecraft/class_1132;method_36439()V
named incrementTotalWorldTimeStat
Lnet/minecraft/server/integrated/IntegratedServer;incrementTotalWorldTimeStat()V
-
shouldBroadcastRconToOps
public boolean shouldBroadcastRconToOps()- Specified by:
shouldBroadcastRconToOps
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official j
Lnet/minecraft/server/MinecraftServer;j()Z
intermediary method_3732
Lnet/minecraft/server/MinecraftServer;method_3732()Z
named shouldBroadcastRconToOps
Lnet/minecraft/server/MinecraftServer;shouldBroadcastRconToOps()Z
-
shouldBroadcastConsoleToOps
public boolean shouldBroadcastConsoleToOps()- Specified by:
shouldBroadcastConsoleToOps
in interfaceCommandOutput
- Specified by:
shouldBroadcastConsoleToOps
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official E_
Ldk;E_()Z
intermediary method_9201
Lnet/minecraft/class_2165;method_9201()Z
named shouldBroadcastConsoleToOps
Lnet/minecraft/server/command/CommandOutput;shouldBroadcastConsoleToOps()Z
-
getRunDirectory
- Overrides:
getRunDirectory
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official C
Lnet/minecraft/server/MinecraftServer;C()Ljava/io/File;
intermediary method_3831
Lnet/minecraft/server/MinecraftServer;method_3831()Ljava/io/File;
named getRunDirectory
Lnet/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:
isDedicated
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official k
Lnet/minecraft/server/MinecraftServer;k()Z
intermediary method_3816
Lnet/minecraft/server/MinecraftServer;method_3816()Z
named isDedicated
Lnet/minecraft/server/MinecraftServer;isDedicated()Z
-
getRateLimit
public int getRateLimit()- Specified by:
getRateLimit
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official l
Lnet/minecraft/server/MinecraftServer;l()I
intermediary method_30612
Lnet/minecraft/server/MinecraftServer;method_30612()I
named getRateLimit
Lnet/minecraft/server/MinecraftServer;getRateLimit()I
-
isUsingNativeTransport
public boolean isUsingNativeTransport()- Specified by:
isUsingNativeTransport
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official m
Lnet/minecraft/server/MinecraftServer;m()Z
intermediary method_3759
Lnet/minecraft/server/MinecraftServer;method_3759()Z
named isUsingNativeTransport
Lnet/minecraft/server/MinecraftServer;isUsingNativeTransport()Z
-
setCrashReport
- Overrides:
setCrashReport
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lnet/minecraft/server/MinecraftServer;a(Lq;)V
intermediary method_3744
Lnet/minecraft/server/MinecraftServer;method_3744(Lnet/minecraft/class_128;)V
named setCrashReport
Lnet/minecraft/server/MinecraftServer;setCrashReport(Lnet/minecraft/util/crash/CrashReport;)V
-
populateCrashReport
- Specified by:
populateCrashReport
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lnet/minecraft/server/MinecraftServer;a(Lac;)Lac;
intermediary method_3859
Lnet/minecraft/server/MinecraftServer;method_3859(Lnet/minecraft/class_6396;)Lnet/minecraft/class_6396;
named populateCrashReport
Lnet/minecraft/server/MinecraftServer;populateCrashReport(Lnet/minecraft/util/SystemDetails;)Lnet/minecraft/util/SystemDetails;
-
getModdedStatusMessage
- Specified by:
getModdedStatusMessage
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official p
Lnet/minecraft/server/MinecraftServer;p()Ljava/util/Optional;
intermediary method_24307
Lnet/minecraft/server/MinecraftServer;method_24307()Ljava/util/Optional;
named getModdedStatusMessage
Lnet/minecraft/server/MinecraftServer;getModdedStatusMessage()Ljava/util/Optional;
-
addSnooperInfo
- Specified by:
addSnooperInfo
in interfaceSnooperListener
- Overrides:
addSnooperInfo
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lasi;a(Lash;)V
intermediary method_5495
Lnet/minecraft/class_1279;method_5495(Lnet/minecraft/class_1276;)V
named addSnooperInfo
Lnet/minecraft/util/snooper/SnooperListener;addSnooperInfo(Lnet/minecraft/util/snooper/Snooper;)V
-
isSnooperEnabled
public boolean isSnooperEnabled()- Specified by:
isSnooperEnabled
in interfaceSnooperListener
- Overrides:
isSnooperEnabled
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official V
Lasi;V()Z
intermediary method_35033
Lnet/minecraft/class_1279;method_35033()Z
named isSnooperEnabled
Lnet/minecraft/util/snooper/SnooperListener;isSnooperEnabled()Z
-
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:
openToLan
in 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 a
Lnet/minecraft/server/MinecraftServer;a(Lbwm;ZI)Z
intermediary method_3763
Lnet/minecraft/server/MinecraftServer;method_3763(Lnet/minecraft/class_1934;ZI)Z
named openToLan
Lnet/minecraft/server/MinecraftServer;openToLan(Lnet/minecraft/world/GameMode;ZI)Z
-
shutdown
public void shutdown()- Overrides:
shutdown
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official u
Lnet/minecraft/server/MinecraftServer;u()V
intermediary method_3782
Lnet/minecraft/server/MinecraftServer;method_3782()V
named shutdown
Lnet/minecraft/server/MinecraftServer;shutdown()V
-
stop
public void stop(boolean bool) - Overrides:
stop
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lnet/minecraft/server/MinecraftServer;a(Z)V
intermediary method_3747
Lnet/minecraft/server/MinecraftServer;method_3747(Z)V
named stop
Lnet/minecraft/server/MinecraftServer;stop(Z)V
-
isRemote
public boolean isRemote()- Specified by:
isRemote
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official o
Lnet/minecraft/server/MinecraftServer;o()Z
intermediary method_3860
Lnet/minecraft/server/MinecraftServer;method_3860()Z
named isRemote
Lnet/minecraft/server/MinecraftServer;isRemote()Z
-
getServerPort
public int getServerPort()- Overrides:
getServerPort
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official N
Lnet/minecraft/server/MinecraftServer;N()I
intermediary method_3756
Lnet/minecraft/server/MinecraftServer;method_3756()I
named getServerPort
Lnet/minecraft/server/MinecraftServer;getServerPort()I
-
setDefaultGameMode
- Overrides:
setDefaultGameMode
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lnet/minecraft/server/MinecraftServer;a(Lbwm;)V
intermediary method_3838
Lnet/minecraft/server/MinecraftServer;method_3838(Lnet/minecraft/class_1934;)V
named setDefaultGameMode
Lnet/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:
areCommandBlocksEnabled
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official n
Lnet/minecraft/server/MinecraftServer;n()Z
intermediary method_3812
Lnet/minecraft/server/MinecraftServer;method_3812()Z
named areCommandBlocksEnabled
Lnet/minecraft/server/MinecraftServer;areCommandBlocksEnabled()Z
-
getOpPermissionLevel
public int getOpPermissionLevel()- Specified by:
getOpPermissionLevel
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official h
Lnet/minecraft/server/MinecraftServer;h()I
intermediary method_3798
Lnet/minecraft/server/MinecraftServer;method_3798()I
named getOpPermissionLevel
Lnet/minecraft/server/MinecraftServer;getOpPermissionLevel()I
-
getFunctionPermissionLevel
public int getFunctionPermissionLevel()- Specified by:
getFunctionPermissionLevel
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official i
Lnet/minecraft/server/MinecraftServer;i()I
intermediary method_21714
Lnet/minecraft/server/MinecraftServer;method_21714()I
named getFunctionPermissionLevel
Lnet/minecraft/server/MinecraftServer;getFunctionPermissionLevel()I
-
setLocalPlayerUuid
- Mappings:
Namespace Name Mixin selector official a
Lfap;a(Ljava/util/UUID;)V
intermediary method_4817
Lnet/minecraft/class_1132;method_4817(Ljava/util/UUID;)V
named setLocalPlayerUuid
Lnet/minecraft/server/integrated/IntegratedServer;setLocalPlayerUuid(Ljava/util/UUID;)V
-
isHost
public boolean isHost(com.mojang.authlib.GameProfile profile) - Specified by:
isHost
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official a
Lnet/minecraft/server/MinecraftServer;a(Lcom/mojang/authlib/GameProfile;)Z
intermediary method_19466
Lnet/minecraft/server/MinecraftServer;method_19466(Lcom/mojang/authlib/GameProfile;)Z
named isHost
Lnet/minecraft/server/MinecraftServer;isHost(Lcom/mojang/authlib/GameProfile;)Z
-
adjustTrackingDistance
public int adjustTrackingDistance(int initialDistance) - Overrides:
adjustTrackingDistance
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official b
Lnet/minecraft/server/MinecraftServer;b(I)I
intermediary method_27903
Lnet/minecraft/server/MinecraftServer;method_27903(I)I
named adjustTrackingDistance
Lnet/minecraft/server/MinecraftServer;adjustTrackingDistance(I)I
-
syncChunkWrites
public boolean syncChunkWrites()- Overrides:
syncChunkWrites
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official aU
Lnet/minecraft/server/MinecraftServer;aU()Z
intermediary method_27051
Lnet/minecraft/server/MinecraftServer;method_27051()Z
named syncChunkWrites
Lnet/minecraft/server/MinecraftServer;syncChunkWrites()Z
-
getForcedGameMode
Returns the game mode a player should be set to when connecting to the server, ornull
if none is set.- Overrides:
getForcedGameMode
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official aZ
Lnet/minecraft/server/MinecraftServer;aZ()Lbwm;
intermediary method_3761
Lnet/minecraft/server/MinecraftServer;method_3761()Lnet/minecraft/class_1934;
named getForcedGameMode
Lnet/minecraft/server/MinecraftServer;getForcedGameMode()Lnet/minecraft/world/GameMode;
-