Package net.minecraft.test
Class TestServer
java.lang.Object
net.minecraft.util.thread.ThreadExecutor<R>
net.minecraft.util.thread.ReentrantThreadExecutor<ServerTask>
net.minecraft.server.MinecraftServer
net.minecraft.test.TestServer
- All Implemented Interfaces:
AutoCloseable
,Executor
,CommandOutput
,MetricSamplerSupplier
,SnooperListener
,MessageListener<ServerTask>
- Mappings:
Namespace Name official mf
intermediary net/minecraft/class_6306
named net/minecraft/test/TestServer
-
Field Summary
Modifier and TypeFieldDescriptionprivate List<GameTestBatch>
private static int
private static GameRules
private static Logger
private BlockPos
private static LevelInfo
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
ModifierConstructorDescriptionTestServer(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager, ServerResourceManager serverResourceManager, Collection<GameTestBatch> batches, BlockPos pos, DynamicRegistryManager.Impl registryManager)
private
TestServer(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager, ServerResourceManager serverResourceManager, Collection<GameTestBatch> batches, BlockPos pos, DynamicRegistryManager.Impl registryManager, Registry<Biome> biomeRegistry, Registry<DimensionType> dimensionTypeRegistry)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Specifies whether command blocks can execute commands on the server.void
exit()
int
int
int
boolean
Checks whether this server is a dedicated server.boolean
boolean
isHost(com.mojang.authlib.GameProfile profile)
boolean
isRemote()
private boolean
boolean
populateCrashReport(class_6396 class_6396)
private void
runTestBatches(ServerWorld world)
void
setCrashReport(CrashReport report)
boolean
Setups a Minecraft server to be ready for players to connect.boolean
boolean
void
tick(BooleanSupplier shouldKeepTicking)
Methods inherited from class net.minecraft.server.MinecraftServer
acceptsStatusQuery, addInitialSnooperInfo, addServerGuiTickable, addSnooperInfo, adjustTrackingDistance, canExecute, close, convertLevel, createFilterer, createTask, createWorlds, enableProfiler, executeTask, forcePlayerSampleUpdate, generateKeyPair, getAdvancementLoader, getBossBarManager, getCommandFunctionManager, getCommandManager, getCommandSource, getCurrentPlayerCount, getDataCommandStorage, getDataFixer, getDataPackManager, getDefaultGameMode, getFile, getForcedGameMode, 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, getRunDirectory, getSavePath, getSaveProperties, getScoreboard, getServerIp, getServerMetadata, getServerModName, getServerMotd, getServerPort, getServerStartTime, getSessionService, getSnooper, getSpawnProtectionRadius, getSpawnRadius, getStructureManager, getTagManager, getThread, getTicks, getTickTime, getUserCache, getUserName, getVersion, getWorld, getWorldRegistryKeys, getWorlds, hasGui, hasIconFile, isDebugRunning, isDemo, isEnforceWhitelist, isFlightEnabled, isLoading, isMonsterSpawningEnabled, isNetherAllowed, isOnlineMode, isPvpEnabled, isRunning, isSinglePlayer, isSnooperEnabled, isSpawnProtected, isStopped, isStopping, kickNonWhitelistedPlayers, loadDataPacks, loadWorld, loadWorldResourcePack, method_16208, method_37113, method_37320, method_37321, method_37322, method_37323, method_37324, openToLan, reloadResources, requireResourcePack, runServer, runTask, save, sendSystemMessage, setDefaultGameMode, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFlightEnabled, setMotd, setOnlineMode, setPlayerIdleTimeout, setPlayerManager, setPreventProxyConnections, setPvpEnabled, setResourcePack, setServerId, setServerIp, setServerName, setServerPort, shouldExecuteAsync, shouldPreventProxyConnections, shouldReceiveFeedback, shouldSpawnAnimals, shouldSpawnNpcs, shouldTrackOutput, shutdown, startServer, stop, stopDebug, syncChunkWrites, 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
-
LOGGER
- Mappings:
Namespace Name Mixin selector official p
Lmf;p:Lorg/apache/logging/log4j/Logger;
intermediary field_33156
Lnet/minecraft/class_6306;field_33156:Lorg/apache/logging/log4j/Logger;
named LOGGER
Lnet/minecraft/test/TestServer;LOGGER:Lorg/apache/logging/log4j/Logger;
-
field_33157
private static final int field_33157- See Also:
- Constant Field Values
- Mappings:
Namespace Name Mixin selector official q
Lmf;q:I
intermediary field_33157
Lnet/minecraft/class_6306;field_33157:I
named field_33157
Lnet/minecraft/test/TestServer;field_33157:I
-
gameRules
- Mappings:
Namespace Name Mixin selector official t
Lmf;t:Lbwl;
intermediary field_33160
Lnet/minecraft/class_6306;field_33160:Lnet/minecraft/class_1928;
named gameRules
Lnet/minecraft/test/TestServer;gameRules:Lnet/minecraft/world/GameRules;
-
testLevel
- Mappings:
Namespace Name Mixin selector official u
Lmf;u:Lbwt;
intermediary field_33161
Lnet/minecraft/class_6306;field_33161:Lnet/minecraft/class_1940;
named testLevel
Lnet/minecraft/test/TestServer;testLevel:Lnet/minecraft/world/level/LevelInfo;
-
batches
- Mappings:
Namespace Name Mixin selector official r
Lmf;r:Ljava/util/List;
intermediary field_33158
Lnet/minecraft/class_6306;field_33158:Ljava/util/List;
named batches
Lnet/minecraft/test/TestServer;batches:Ljava/util/List;
-
pos
- Mappings:
Namespace Name Mixin selector official s
Lmf;s:Lgg;
intermediary field_33159
Lnet/minecraft/class_6306;field_33159:Lnet/minecraft/class_2338;
named pos
Lnet/minecraft/test/TestServer;pos:Lnet/minecraft/util/math/BlockPos;
-
testSet
- Mappings:
Namespace Name Mixin selector official v
Lmf;v:Lml;
intermediary field_33162
Lnet/minecraft/class_6306;field_33162:Lnet/minecraft/class_4524;
named testSet
Lnet/minecraft/test/TestServer;testSet:Lnet/minecraft/test/TestSet;
-
-
Constructor Details
-
TestServer
public TestServer(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager, ServerResourceManager serverResourceManager, Collection<GameTestBatch> batches, BlockPos pos, DynamicRegistryManager.Impl registryManager)- Mappings:
Namespace Name Mixin selector official <init>
Lmf;<init>(Ljava/lang/Thread;Ldib$a;Ladi;Lxk;Ljava/util/Collection;Lgg;Lgx$b;)V
intermediary <init>
Lnet/minecraft/class_6306;<init>(Ljava/lang/Thread;Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_5350;Ljava/util/Collection;Lnet/minecraft/class_2338;Lnet/minecraft/class_5455$class_5457;)V
named <init>
Lnet/minecraft/test/TestServer;<init>(Ljava/lang/Thread;Lnet/minecraft/world/level/storage/LevelStorage$Session;Lnet/minecraft/resource/ResourcePackManager;Lnet/minecraft/resource/ServerResourceManager;Ljava/util/Collection;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/registry/DynamicRegistryManager$Impl;)V
-
TestServer
private TestServer(Thread serverThread, LevelStorage.Session session, ResourcePackManager dataPackManager, ServerResourceManager serverResourceManager, Collection<GameTestBatch> batches, BlockPos pos, DynamicRegistryManager.Impl registryManager, Registry<Biome> biomeRegistry, Registry<DimensionType> dimensionTypeRegistry)- Mappings:
Namespace Name Mixin selector official <init>
Lmf;<init>(Ljava/lang/Thread;Ldib$a;Ladi;Lxk;Ljava/util/Collection;Lgg;Lgx$b;Lgw;Lgw;)V
intermediary <init>
Lnet/minecraft/class_6306;<init>(Ljava/lang/Thread;Lnet/minecraft/class_32$class_5143;Lnet/minecraft/class_3283;Lnet/minecraft/class_5350;Ljava/util/Collection;Lnet/minecraft/class_2338;Lnet/minecraft/class_5455$class_5457;Lnet/minecraft/class_2378;Lnet/minecraft/class_2378;)V
named <init>
Lnet/minecraft/test/TestServer;<init>(Ljava/lang/Thread;Lnet/minecraft/world/level/storage/LevelStorage$Session;Lnet/minecraft/resource/ResourcePackManager;Lnet/minecraft/resource/ServerResourceManager;Ljava/util/Collection;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/util/registry/DynamicRegistryManager$Impl;Lnet/minecraft/util/registry/Registry;Lnet/minecraft/util/registry/Registry;)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
-
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/class_6396;)Lnet/minecraft/class_6396;
-
exit
public void exit()- Overrides:
exit
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official f
Lnet/minecraft/server/MinecraftServer;f()V
intermediary method_3821
Lnet/minecraft/server/MinecraftServer;method_3821()V
named exit
Lnet/minecraft/server/MinecraftServer;exit()V
-
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
-
runTestBatches
- Mappings:
Namespace Name Mixin selector official b
Lmf;b(Labr;)V
intermediary method_36096
Lnet/minecraft/class_6306;method_36096(Lnet/minecraft/class_3218;)V
named runTestBatches
Lnet/minecraft/test/TestServer;runTestBatches(Lnet/minecraft/server/world/ServerWorld;)V
-
isTesting
private boolean isTesting()- Mappings:
Namespace Name Mixin selector official bf
Lmf;bf()Z
intermediary method_36098
Lnet/minecraft/class_6306;method_36098()Z
named isTesting
Lnet/minecraft/test/TestServer;isTesting()Z
-
isHardcore
public boolean isHardcore()- Overrides:
isHardcore
in classMinecraftServer
- Mappings:
Namespace Name Mixin selector official g
Lnet/minecraft/server/MinecraftServer;g()Z
intermediary method_3754
Lnet/minecraft/server/MinecraftServer;method_3754()Z
named isHardcore
Lnet/minecraft/server/MinecraftServer;isHardcore()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
-
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
-
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
-
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
-
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
-
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
-
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
-
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;
-