Package net.minecraft.gametest.framework
Class GameTestServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
net.minecraft.gametest.framework.GameTestServer
- All Implemented Interfaces:
AutoCloseable,Executor,CommandSource,ServerInfo,ProfilerMeasured,TaskScheduler<TickTask>,ChunkIOErrorReporter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static class(package private) static classNested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final FeatureFlagSetprivate static final org.slf4j.Loggerprivate static final Servicesprivate static final intprivate final LocalSampleLoggerprivate final Stopwatchprivate static final GameRulesprivate static final intprivate List<GameTestBatch> private MultipleTestTrackerprivate final booleanprivate static final WorldOptionsFields 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
ConstructorsModifierConstructorDescriptionprivateGameTestServer(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, Optional<String> pTestSelection, boolean pVerify) -
Method Summary
Modifier and TypeMethodDescriptionstatic GameTestServercreate(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, Optional<String> pTestSelection, boolean pVerify) private List<GameTestBatch> evaluateTestsToRun(ServerLevel pLevel) fillServerSystemReport(SystemReport p_177613_) intintintstatic Stream<Holder.Reference<GameTestInstance>> getTestsForSelection(RegistryAccess pRegistries, String pSelection) private booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisSingleplayerOwner(NameAndId p_436045_) booleanbooleanprivate static voidlogFailedTest(GameTestInfo pInfo) voidonServerCrash(CrashReport p_177623_) Called on exit from the main run() loop.voidintprivate static Stream<GameTestInfo> rotateAndMultiply(Holder.Reference<GameTestInstance> pTest, ServerLevel pLevel) booleanbooleanprivate voidstartTests(ServerLevel pServerLevel) voidtickServer(BooleanSupplier p_177619_) Main function called by run() every loop.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, forceSynchronousWrites, forceTimeSynchronization, forgeGetWorldMap, fuelValues, getAbsoluteMaxWorldSize, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCodeOfConducts, getCommands, getCommandStorage, getCompressionThreshold, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getForcedGameType, getFunctions, getGameRules, getKeyPair, getLevel, getLevelLoadListener, getLocalIp, getMaxChainedNeighborUpdates, getModdedStatus, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerList, getPlayerNames, getPort, getPreventProxyConnections, getProfilePermissions, getProxy, getRecipeManager, getResourceManager, getRespawnData, getRunningThread, getScaledTrackingDistance, getScoreboard, getServerDirectory, getServerModName, getServerResourcePack, getServerResources, getServerVersion, getSingleplayerProfile, getStatus, getStatusJson, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, halt, handleCustomClickAction, hasGui, hidesOnlinePlayers, initializeKeyPair, invalidateStatus, isAllowedToEnterPortal, isAutoSave, isCurrentlySaving, isDemo, isEnforceWhitelist, isPaused, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isSpawningMonsters, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, isUsingWhitelist, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, markWorldsDirty, notificationManager, onGameRuleChanged, onTickRateChanged, overworld, packetProcessor, pauseWhenEmptySeconds, playerIdleTimeout, pollTask, potionBrewing, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportChunkLoadFailure, reportChunkSaveFailure, reportPacketHandlingException, runServer, saveAllChunks, saveEverything, scheduleExecutables, selectLevelLoadFocusPos, sendSystemMessage, serverLinks, services, setAutoSave, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFatalException, setId, setLocalIp, setMotd, setPlayerIdleTimeout, setPlayerList, setPort, setPreventProxyConnections, setRespawnData, setSingleplayerProfile, setUsesAuthentication, setUsingWhitelist, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopServer, stopTimeProfiler, throwIfFatalException, tickChildren, tickConnection, tickRateManager, updateEffectiveRespawnData, updateMobSpawningFlags, usesAuthentication, waitForTasks, 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 -
PROGRESS_REPORT_INTERVAL
private static final int PROGRESS_REPORT_INTERVAL- See Also:
-
TEST_POSITION_RANGE
private static final int TEST_POSITION_RANGE- See Also:
-
NO_SERVICES
-
ENABLED_FEATURES
-
sampleLogger
-
testSelection
-
verify
private final boolean verify -
testBatches
-
stopwatch
-
WORLD_OPTIONS
-
testTracker
-
TEST_GAME_RULES
-
-
Constructor Details
-
GameTestServer
private GameTestServer(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, Optional<String> pTestSelection, boolean pVerify)
-
-
Method Details
-
create
public static GameTestServer create(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, Optional<String> pTestSelection, boolean pVerify) -
initServer
public boolean initServer()- Specified by:
initServerin classMinecraftServer
-
evaluateTestsToRun
-
rotateAndMultiply
private static Stream<GameTestInfo> rotateAndMultiply(Holder.Reference<GameTestInstance> pTest, ServerLevel pLevel) -
getTestsForSelection
public static Stream<Holder.Reference<GameTestInstance>> getTestsForSelection(RegistryAccess pRegistries, String pSelection) -
tickServer
Description copied from class:MinecraftServerMain function called by run() every loop.- Overrides:
tickServerin classMinecraftServer
-
logFailedTest
-
getTickTimeLogger
- Specified by:
getTickTimeLoggerin classMinecraftServer
-
isTickTimeLoggingEnabled
public boolean isTickTimeLoggingEnabled()- Specified by:
isTickTimeLoggingEnabledin classMinecraftServer
-
waitUntilNextTick
public void waitUntilNextTick()- Overrides:
waitUntilNextTickin classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReportin classMinecraftServer
-
onServerExit
public void onServerExit()- Overrides:
onServerExitin classMinecraftServer
-
onServerCrash
Description copied from class:MinecraftServerCalled on exit from the main run() loop.- Overrides:
onServerCrashin classMinecraftServer
-
startTests
-
haveTestsStarted
private boolean haveTestsStarted() -
isHardcore
public boolean isHardcore()- Overrides:
isHardcorein classMinecraftServer
-
operatorUserPermissionLevel
public int operatorUserPermissionLevel()- Specified by:
operatorUserPermissionLevelin classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevelin classMinecraftServer
-
shouldRconBroadcast
public boolean shouldRconBroadcast()- Specified by:
shouldRconBroadcastin classMinecraftServer
-
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServerin classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()- Specified by:
getRateLimitPacketsPerSecondin classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()- Specified by:
isEpollEnabledin classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()- Overrides:
isCommandBlockEnabledin classMinecraftServer
-
isSpawnerBlockEnabled
public boolean isSpawnerBlockEnabled()- Overrides:
isSpawnerBlockEnabledin classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublishedin classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin interfaceCommandSource- Specified by:
shouldInformAdminsin classMinecraftServer
-
isSingleplayerOwner
- Specified by:
isSingleplayerOwnerin classMinecraftServer
-
getMaxPlayers
public int getMaxPlayers()
-