Class EphemeralTestServerProvider.JUnitServer

java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<net.minecraft.server.TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<net.minecraft.server.TickTask>
net.minecraft.server.MinecraftServer
net.neoforged.testframework.junit.EphemeralTestServerProvider.JUnitServer
All Implemented Interfaces:
AutoCloseable, Executor, net.minecraft.commands.CommandSource, net.minecraft.server.ServerInfo, net.minecraft.util.profiling.metrics.ProfilerMeasured, net.minecraft.util.thread.TaskScheduler<net.minecraft.server.TickTask>, net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter
Enclosing class:
EphemeralTestServerProvider

public static class EphemeralTestServerProvider.JUnitServer extends net.minecraft.server.MinecraftServer
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer

    net.minecraft.server.MinecraftServer.ReloadableResources, net.minecraft.server.MinecraftServer.ServerResourcePackInfo
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final org.slf4j.Logger
     
    private static final net.minecraft.server.Services
     
    private final net.minecraft.util.debugchart.LocalSampleLogger
     
    private final Path
     
    private static final net.minecraft.world.level.GameRules
     
    private static final net.minecraft.world.level.levelgen.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 class net.minecraft.util.thread.BlockableEventLoop

    BLOCK_TIME_NANOS

    Fields inherited from interface net.minecraft.commands.CommandSource

    NULL
  • Constructor Summary

    Constructors
    Constructor
    Description
    JUnitServer(Thread thread, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess access, net.minecraft.server.packs.repository.PackRepository pack, net.minecraft.server.WorldStem stem, Path tempDir)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(Thread thread, Path tempDir, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess access, net.minecraft.server.packs.repository.PackRepository resources)
     
    net.minecraft.SystemReport
    fillServerSystemReport(net.minecraft.SystemReport report)
     
    int
     
    int
     
    int
     
    protected net.minecraft.util.debugchart.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, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceSecureProfile, executeIfPossible, fillSystemReport, finishRecordingMetrics, forceDifficulty, forceSynchronousWrites, forceTimeSynchronization, forgeGetWorldMap, fuelValues, 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, 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, isSpawningMonsters, isStopped, isTimeProfilerRunning, isUnderSpawnProtection, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, markWorldsDirty, onServerCrash, onServerExit, onTickRateChanged, overworld, pauseWhileEmptySeconds, pollTask, potionBrewing, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportChunkLoadFailure, reportChunkSaveFailure, reportPacketHandlingException, 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, tickConnection, 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, isNonRecoverable, isSameThread, name, profiledMetrics, runAllTasks, schedule, submit, submit, submitAsync

    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.TaskScheduler

    scheduleWithResult
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • NO_SERVICES

      private static final net.minecraft.server.Services NO_SERVICES
    • TEST_GAME_RULES

      private static final net.minecraft.world.level.GameRules TEST_GAME_RULES
    • WORLD_OPTIONS

      private static final net.minecraft.world.level.levelgen.WorldOptions WORLD_OPTIONS
    • tempDir

      private final Path tempDir
    • sampleLogger

      private final net.minecraft.util.debugchart.LocalSampleLogger sampleLogger
  • Constructor Details

    • JUnitServer

      public JUnitServer(Thread thread, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess access, net.minecraft.server.packs.repository.PackRepository pack, net.minecraft.server.WorldStem stem, Path tempDir)
  • Method Details

    • create

      public static EphemeralTestServerProvider.JUnitServer create(Thread thread, Path tempDir, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess access, net.minecraft.server.packs.repository.PackRepository resources)
    • initServer

      public boolean initServer()
      Specified by:
      initServer in class net.minecraft.server.MinecraftServer
    • tickServer

      public void tickServer(BooleanSupplier sup)
      Overrides:
      tickServer in class net.minecraft.server.MinecraftServer
    • saveEverything

      public boolean saveEverything(boolean p_195515_, boolean p_195516_, boolean p_195517_)
      Overrides:
      saveEverything in class net.minecraft.server.MinecraftServer
    • stopServer

      public void stopServer()
      Overrides:
      stopServer in class net.minecraft.server.MinecraftServer
    • waitUntilNextTick

      public void waitUntilNextTick()
      Overrides:
      waitUntilNextTick in class net.minecraft.server.MinecraftServer
    • fillServerSystemReport

      public net.minecraft.SystemReport fillServerSystemReport(net.minecraft.SystemReport report)
      Specified by:
      fillServerSystemReport in class net.minecraft.server.MinecraftServer
    • isHardcore

      public boolean isHardcore()
      Overrides:
      isHardcore in class net.minecraft.server.MinecraftServer
    • getOperatorUserPermissionLevel

      public int getOperatorUserPermissionLevel()
      Specified by:
      getOperatorUserPermissionLevel in class net.minecraft.server.MinecraftServer
    • getFunctionCompilationLevel

      public int getFunctionCompilationLevel()
      Specified by:
      getFunctionCompilationLevel in class net.minecraft.server.MinecraftServer
    • shouldRconBroadcast

      public boolean shouldRconBroadcast()
      Specified by:
      shouldRconBroadcast in class net.minecraft.server.MinecraftServer
    • isDedicatedServer

      public boolean isDedicatedServer()
      Specified by:
      isDedicatedServer in class net.minecraft.server.MinecraftServer
    • getRateLimitPacketsPerSecond

      public int getRateLimitPacketsPerSecond()
      Specified by:
      getRateLimitPacketsPerSecond in class net.minecraft.server.MinecraftServer
    • isEpollEnabled

      public boolean isEpollEnabled()
      Specified by:
      isEpollEnabled in class net.minecraft.server.MinecraftServer
    • isCommandBlockEnabled

      public boolean isCommandBlockEnabled()
      Specified by:
      isCommandBlockEnabled in class net.minecraft.server.MinecraftServer
    • isPublished

      public boolean isPublished()
      Specified by:
      isPublished in class net.minecraft.server.MinecraftServer
    • shouldInformAdmins

      public boolean shouldInformAdmins()
      Specified by:
      shouldInformAdmins in interface net.minecraft.commands.CommandSource
      Specified by:
      shouldInformAdmins in class net.minecraft.server.MinecraftServer
    • isSingleplayerOwner

      public boolean isSingleplayerOwner(com.mojang.authlib.GameProfile profile)
      Specified by:
      isSingleplayerOwner in class net.minecraft.server.MinecraftServer
    • getTickTimeLogger

      protected net.minecraft.util.debugchart.SampleLogger getTickTimeLogger()
      Specified by:
      getTickTimeLogger in class net.minecraft.server.MinecraftServer
    • isTickTimeLoggingEnabled

      public boolean isTickTimeLoggingEnabled()
      Specified by:
      isTickTimeLoggingEnabled in class net.minecraft.server.MinecraftServer