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,ProcessorHandle<TickTask>,ChunkIOErrorReporter
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final Servicesprivate static final intprivate final LocalSampleLoggerprivate final BlockPosprivate final Stopwatchprivate static final GameRulesprivate static final intprivate List<GameTestBatch> private final List<TestFunction> private MultipleTestTrackerprivate static final WorldOptionsFields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, storageSource, VANILLA_BRAND, worldDataFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateGameTestServer(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, Collection<TestFunction> pTestBatches, BlockPos pSpawnPos) -
Method Summary
Modifier and TypeMethodDescriptionstatic GameTestServercreate(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, Collection<TestFunction> pTestBatches, BlockPos pSpawnPos) fillServerSystemReport(SystemReport pReport) intintintprivate booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanisSingleplayerOwner(com.mojang.authlib.GameProfile pProfile) booleanvoidonServerCrash(CrashReport pReport) Called on exit from the main run() loop.voidbooleanbooleanprivate voidstartTests(ServerLevel pServerLevel) voidtickServer(BooleanSupplier pHasTimeLeft) Main function called by run() every loop.voidMethods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, acceptsTransfers, addTickable, areNpcsEnabled, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceSecureProfile, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceDifficulty, forceSynchronousWrites, forceTimeSynchronization, forgeGetWorldMap, getAbsoluteMaxWorldSize, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCommands, getCommandStorage, getCompressionThreshold, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getForcedGameType, getFunctions, getGameRules, getKeyPair, getLevel, getLocalIp, getMaxChainedNeighborUpdates, getMaxPlayers, getModdedStatus, getMotd, getNextTickTime, getPackRepository, getPlayerCount, getPlayerIdleTimeout, getPlayerList, getPlayerNames, getPort, getPreventProxyConnections, getProfileCache, getProfileKeySignatureValidator, getProfilePermissions, getProfiler, getProfileRepository, getProxy, getRecipeManager, getResourceManager, getRunningThread, getScaledTrackingDistance, getScoreboard, getServerDirectory, getServerModName, getServerResourcePack, getServerResources, getServerVersion, getSessionService, getSingleplayerProfile, getSpawnProtectionRadius, getSpawnRadius, getStatus, getStatusJson, getStructureManager, getTickCount, getTickTime, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, halt, hasGui, hidesOnlinePlayers, initializeKeyPair, invalidateStatus, isCurrentlySaving, isDemo, isEnforceWhitelist, isFlightAllowed, isLevelEnabled, isPaused, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isSpawningAnimals, isSpawningMonsters, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, markWorldsDirty, onTickRateChanged, overworld, pollTask, potionBrewing, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportChunkLoadFailure, reportChunkSaveFailure, runServer, saveAllChunks, saveEverything, scheduleExecutables, sendSystemMessage, serverLinks, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFatalException, setFlightAllowed, setId, setLocalIp, setMotd, setPlayerIdleTimeout, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setSingleplayerProfile, setUsesAuthentication, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopServer, stopTimeProfiler, subscribeToDebugSample, throwIfFatalException, tickChildren, tickRateManager, usesAuthentication, waitForTasks, wrapRunnableMethods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTaskMethods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tellMethods 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.ProcessorHandle
ask, askEither
-
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
-
sampleLogger
-
testBatches
-
testFunctions
-
spawnPos
-
stopwatch
-
TEST_GAME_RULES
-
WORLD_OPTIONS
-
testTracker
-
-
Constructor Details
-
GameTestServer
private GameTestServer(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, WorldStem pWorldStem, Collection<TestFunction> pTestBatches, BlockPos pSpawnPos)
-
-
Method Details
-
create
public static GameTestServer create(Thread pServerThread, LevelStorageSource.LevelStorageAccess pStorageSource, PackRepository pPackRepository, Collection<TestFunction> pTestBatches, BlockPos pSpawnPos) -
initServer
public boolean initServer()- Specified by:
initServerin classMinecraftServer
-
tickServer
Main function called by run() every loop.- Overrides:
tickServerin classMinecraftServer
-
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
Called on exit from the main run() loop.- Overrides:
onServerCrashin classMinecraftServer
-
startTests
-
haveTestsStarted
private boolean haveTestsStarted() -
isHardcore
public boolean isHardcore()- Overrides:
isHardcorein classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevelin 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()- Specified by:
isCommandBlockEnabledin classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublishedin classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdminsin interfaceCommandSource- Specified by:
shouldInformAdminsin classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile pProfile) - Specified by:
isSingleplayerOwnerin classMinecraftServer
-