Class EphemeralTestServerProvider.JUnitServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
net.neoforged.testframework.junit.EphemeralTestServerProvider.JUnitServer
- All Implemented Interfaces:
AutoCloseable
,Executor
,CommandSource
,ServerInfo
,ProfilerMeasured
,ProcessorHandle<TickTask>
,ChunkIOErrorReporter
- Enclosing class:
EphemeralTestServerProvider
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
MinecraftServer.ReloadableResources, MinecraftServer.ServerResourcePackInfo
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final Services
private final LocalSampleLogger
private final Path
private static final GameRules
private static final WorldOptions
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, nextTickTimeNanos, playerDataStorage, proxy, services, storageSource, VANILLA_BRAND, worldData
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ConstructorDescriptionJUnitServer
(Thread thread, LevelStorageSource.LevelStorageAccess access, PackRepository pack, WorldStem stem, Path tempDir) -
Method Summary
Modifier and TypeMethodDescriptioncreate
(Thread thread, Path tempDir, LevelStorageSource.LevelStorageAccess access, PackRepository resources) fillServerSystemReport
(SystemReport report) int
int
int
protected SampleLogger
boolean
boolean
boolean
boolean
boolean
boolean
boolean
isSingleplayerOwner
(com.mojang.authlib.GameProfile profile) boolean
boolean
saveEverything
(boolean p_195515_, boolean p_195516_, boolean p_195517_) boolean
boolean
void
void
void
Methods 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, onServerCrash, onServerExit, onTickRateChanged, overworld, pollTask, potionBrewing, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportChunkLoadFailure, reportChunkSaveFailure, runServer, saveAllChunks, 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, stopTimeProfiler, subscribeToDebugSample, throwIfFatalException, tickChildren, tickRateManager, usesAuthentication, waitForTasks, wrapRunnable
Methods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTask
Methods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isSameThread, name, profiledMetrics, runAllTasks, submit, submit, submitAsync, tell
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter
reportMisplacedChunk
Methods inherited from interface net.minecraft.commands.CommandSource
alwaysAccepts
Methods inherited from interface net.minecraft.util.thread.ProcessorHandle
ask, askEither
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
NO_SERVICES
-
TEST_GAME_RULES
-
WORLD_OPTIONS
-
tempDir
-
sampleLogger
-
-
Constructor Details
-
JUnitServer
public JUnitServer(Thread thread, LevelStorageSource.LevelStorageAccess access, PackRepository pack, WorldStem stem, Path tempDir)
-
-
Method Details
-
create
public static EphemeralTestServerProvider.JUnitServer create(Thread thread, Path tempDir, LevelStorageSource.LevelStorageAccess access, PackRepository resources) -
initServer
public boolean initServer()- Specified by:
initServer
in classMinecraftServer
-
tickServer
- Overrides:
tickServer
in classMinecraftServer
-
saveEverything
public boolean saveEverything(boolean p_195515_, boolean p_195516_, boolean p_195517_) - Overrides:
saveEverything
in classMinecraftServer
-
stopServer
public void stopServer()- Overrides:
stopServer
in classMinecraftServer
-
waitUntilNextTick
public void waitUntilNextTick()- Overrides:
waitUntilNextTick
in classMinecraftServer
-
fillServerSystemReport
- Specified by:
fillServerSystemReport
in classMinecraftServer
-
isHardcore
public boolean isHardcore()- Overrides:
isHardcore
in classMinecraftServer
-
getOperatorUserPermissionLevel
public int getOperatorUserPermissionLevel()- Specified by:
getOperatorUserPermissionLevel
in classMinecraftServer
-
getFunctionCompilationLevel
public int getFunctionCompilationLevel()- Specified by:
getFunctionCompilationLevel
in classMinecraftServer
-
shouldRconBroadcast
public boolean shouldRconBroadcast()- Specified by:
shouldRconBroadcast
in classMinecraftServer
-
isDedicatedServer
public boolean isDedicatedServer()- Specified by:
isDedicatedServer
in classMinecraftServer
-
getRateLimitPacketsPerSecond
public int getRateLimitPacketsPerSecond()- Specified by:
getRateLimitPacketsPerSecond
in classMinecraftServer
-
isEpollEnabled
public boolean isEpollEnabled()- Specified by:
isEpollEnabled
in classMinecraftServer
-
isCommandBlockEnabled
public boolean isCommandBlockEnabled()- Specified by:
isCommandBlockEnabled
in classMinecraftServer
-
isPublished
public boolean isPublished()- Specified by:
isPublished
in classMinecraftServer
-
shouldInformAdmins
public boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceCommandSource
- Specified by:
shouldInformAdmins
in classMinecraftServer
-
isSingleplayerOwner
public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile profile) - Specified by:
isSingleplayerOwner
in classMinecraftServer
-
getTickTimeLogger
- Specified by:
getTickTimeLogger
in classMinecraftServer
-
isTickTimeLoggingEnabled
public boolean isTickTimeLoggingEnabled()- Specified by:
isTickTimeLoggingEnabled
in classMinecraftServer
-