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 TypeClassDescriptionprivate static classprivate static classNested classes/interfaces inherited from class 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 intprivate final LocalSampleLoggerprivate final Stopwatchprivate static final GameRulesprivate static final intprivate List<GameTestBatch> private @Nullable MultipleTestTrackerprivate final booleanprivate static final WorldOptionsFields inherited from class MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEFAULT_GAME_RULES, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, SPAWN_POSITION_SEARCH_RADIUS, storageSource, VANILLA_BRAND, worldDataFields inherited from class BlockableEventLoop
BLOCK_TIME_NANOSFields inherited from interface CommandSource
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateGameTestServer(Thread serverThread, LevelStorageSource.LevelStorageAccess levelStorageSource, PackRepository packRepository, WorldStem worldStem, Optional<String> testSelection, boolean verify, int repeatCount) -
Method Summary
Modifier and TypeMethodDescriptionstatic GameTestServercreate(Thread serverThread, LevelStorageSource.LevelStorageAccess levelStorageSource, PackRepository packRepository, Optional<String> testSelection, boolean verify, int repeatCount) private List<GameTestBatch> evaluateTestsToRun(ServerLevel level) fillServerSystemReport(SystemReport systemReport) intintstatic Stream<Holder.Reference<GameTestInstance>> getTestsForSelection(RegistryAccess registries, String selection) protected SampleLoggerprivate booleanprotected booleanbooleanbooleanbooleanbooleanisSingleplayerOwner(NameAndId nameAndId) booleanprivate static voidlogFailedTest(GameTestInfo testInfo) private Stream<GameTestInfo> multiplyTest(Holder.Reference<GameTestInstance> test, ServerLevel level) protected voidonServerCrash(CrashReport report) Called on exit from the main run() loop.protected voidprivate static Stream<GameTestInfo> rotateAndMultiply(Holder.Reference<GameTestInstance> test, ServerLevel level) booleanbooleanprivate voidstartTests(ServerLevel level) protected voidtickServer(BooleanSupplier haveTime) Main function called by run() every loop.booleanprotected voidMethods inherited from class MinecraftServer
acceptsFailure, acceptsSuccess, acceptsTransfers, addTickable, allowFlight, cancelRecordingMetrics, clockManager, close, configurePackRepository, createChunkLoadStatusView, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, debugSubscribers, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceGameTypeForPlayers, enforceSecureProfile, executeIfPossible, fillSystemReport, findRespawnDimension, finishRecordingMetrics, forceDifficulty, forceGameTimeSynchronization, forceSynchronousWrites, forgeGetWorldMap, fuelValues, getAbsoluteMaxWorldSize, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCodeOfConducts, getCommands, getCommandStorage, getCompressionThreshold, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDataStorage, getDefaultGameType, getFile, getFixerUpper, getForcedGameType, getFunctions, getGameRules, getGlobalGameRules, getKeyPair, getLevel, getLevelLoadListener, getLocalIp, getMaxChainedNeighborUpdates, getModdedStatus, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerList, getPlayerNames, getPort, getPreventProxyConnections, getProfilePermissions, getProxy, getRandomSequence, getRandomSequences, getRecipeManager, getResourceManager, getRespawnData, getRunningThread, getScaledTrackingDistance, getScheduledEvents, getScoreboard, getServerActivityMonitor, getServerDirectory, getServerModName, getServerResourcePack, getServerResources, getServerVersion, getSingleplayerProfile, getStatus, getStatusJson, getStopwatches, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWeatherData, getWorldData, getWorldGenSettings, getWorldPath, getWorldScreenshotFile, halt, handleCustomClickAction, hidesOnlinePlayers, initializeKeyPair, invalidateStatus, isAutoSave, isCurrentlySaving, isDemo, isEnforceWhitelist, isPaused, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, isUsingWhitelist, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, markWorldsDirty, notificationManager, onGameRuleChanged, onTickRateChanged, overworld, packetProcessor, pauseWhenEmptySeconds, playerIdleTimeout, pollTask, potionBrewing, processPacketsAndTick, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportChunkLoadFailure, reportChunkSaveFailure, reportPacketHandlingException, runServer, saveAllChunks, saveEverything, scheduleExecutables, selectLevelLoadFocusPos, sendLowDiskSpaceWarning, sendSystemMessage, serverLinks, services, setAutoSave, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setId, setLocalIp, setMotd, setPlayerIdleTimeout, setPlayerList, setPort, setPreventProxyConnections, setRespawnData, setSingleplayerProfile, setUsesAuthentication, setUsingWhitelist, setWeatherParameters, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopServer, stopTimeProfiler, tickChildren, tickConnection, tickRateManager, updateEffectiveRespawnData, updateMobSpawningFlags, usesAuthentication, waitForTasks, warnOnLowDiskSpace, wrapRunnableMethods inherited from class ReentrantBlockableEventLoop
runningTaskMethods inherited from class BlockableEventLoop
delayCrash, dropAllTasks, execute, executeBlocking, getPendingTasksCount, hasDelayedCrash, isNonRecoverable, isSameThread, managedBlock, name, profiledMetrics, relayDelayCrash, runAllTasks, schedule, shouldRunAllTasks, submit, submit, submitAsyncMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ChunkIOErrorReporter
reportMisplacedChunkMethods inherited from interface CommandSource
alwaysAcceptsMethods inherited from interface 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 -
repeatCount
private final int repeatCount -
testBatches
-
stopwatch
-
WORLD_OPTIONS
-
testTracker
-
TEST_GAME_RULES
-
-
Constructor Details
-
GameTestServer
private GameTestServer(Thread serverThread, LevelStorageSource.LevelStorageAccess levelStorageSource, PackRepository packRepository, WorldStem worldStem, Optional<String> testSelection, boolean verify, int repeatCount)
-
-
Method Details
-
create
public static GameTestServer create(Thread serverThread, LevelStorageSource.LevelStorageAccess levelStorageSource, PackRepository packRepository, Optional<String> testSelection, boolean verify, int repeatCount) -
initServer
protected boolean initServer()- Specified by:
initServerin classMinecraftServer
-
evaluateTestsToRun
-
rotateAndMultiply
private static Stream<GameTestInfo> rotateAndMultiply(Holder.Reference<GameTestInstance> test, ServerLevel level) -
getTestsForSelection
public static Stream<Holder.Reference<GameTestInstance>> getTestsForSelection(RegistryAccess registries, String selection) -
multiplyTest
private Stream<GameTestInfo> multiplyTest(Holder.Reference<GameTestInstance> test, ServerLevel level) -
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
protected void waitUntilNextTick()- Overrides:
waitUntilNextTickin classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReportin classMinecraftServer
-
onServerExit
protected 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
-
operatorUserPermissions
- Specified by:
operatorUserPermissionsin classMinecraftServer
-
getFunctionCompilationPermissions
- Specified by:
getFunctionCompilationPermissionsin 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
-
useNativeTransport
public boolean useNativeTransport()- Specified by:
useNativeTransportin 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()
-