Class MinecraftServer

All Implemented Interfaces:
AutoCloseable, Executor, CommandSource, ServerInfo, ProfilerMeasured, TaskScheduler<TickTask>, ChunkIOErrorReporter
Direct Known Subclasses:
DedicatedServer, GameTestServer, IntegratedServer

public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, ServerInfo, ChunkIOErrorReporter
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • VANILLA_BRAND

      public static final String VANILLA_BRAND
      See Also:
    • AVERAGE_TICK_TIME_SMOOTHING

      private static final float AVERAGE_TICK_TIME_SMOOTHING
      See Also:
    • TICK_STATS_SPAN

      private static final int TICK_STATS_SPAN
      See Also:
    • OVERLOADED_THRESHOLD_NANOS

      private static final long OVERLOADED_THRESHOLD_NANOS
    • OVERLOADED_TICKS_THRESHOLD

      private static final int OVERLOADED_TICKS_THRESHOLD
      See Also:
    • OVERLOADED_WARNING_INTERVAL_NANOS

      private static final long OVERLOADED_WARNING_INTERVAL_NANOS
    • OVERLOADED_TICKS_WARNING_INTERVAL

      private static final int OVERLOADED_TICKS_WARNING_INTERVAL
      See Also:
    • STATUS_EXPIRE_TIME_NANOS

      private static final long STATUS_EXPIRE_TIME_NANOS
    • PREPARE_LEVELS_DEFAULT_DELAY_NANOS

      private static final long PREPARE_LEVELS_DEFAULT_DELAY_NANOS
    • MAX_STATUS_PLAYER_SAMPLE

      private static final int MAX_STATUS_PLAYER_SAMPLE
      See Also:
    • SPAWN_POSITION_SEARCH_RADIUS

      public static final int SPAWN_POSITION_SEARCH_RADIUS
      See Also:
    • SERVER_ACTIVITY_MONITOR_SECONDS_BETWEEN_NOTIFICATIONS

      private static final int SERVER_ACTIVITY_MONITOR_SECONDS_BETWEEN_NOTIFICATIONS
      See Also:
    • LEGACY_WORLD_NAMES_FOR_REALMS_LOG

      private static final Map<String,String> LEGACY_WORLD_NAMES_FOR_REALMS_LOG
    • AUTOSAVE_INTERVAL

      private static final int AUTOSAVE_INTERVAL
      See Also:
    • MIMINUM_AUTOSAVE_TICKS

      private static final int MIMINUM_AUTOSAVE_TICKS
      See Also:
    • MAX_TICK_LATENCY

      private static final int MAX_TICK_LATENCY
      See Also:
    • ABSOLUTE_MAX_WORLD_SIZE

      public static final int ABSOLUTE_MAX_WORLD_SIZE
      See Also:
    • DEMO_SETTINGS

      public static final LevelSettings DEMO_SETTINGS
    • DEFAULT_GAME_RULES

      public static final Supplier<GameRules> DEFAULT_GAME_RULES
    • ANONYMOUS_PLAYER_PROFILE

      public static final NameAndId ANONYMOUS_PLAYER_PROFILE
    • storageSource

      protected final LevelStorageSource.LevelStorageAccess storageSource
    • playerDataStorage

      protected final PlayerDataStorage playerDataStorage
    • savedDataStorage

      private final SavedDataStorage savedDataStorage
    • tickables

      private final List<Runnable> tickables
    • gameRules

      private final GameRules gameRules
    • metricsRecorder

      private MetricsRecorder metricsRecorder
    • onMetricsRecordingStopped

      private Consumer<ProfileResults> onMetricsRecordingStopped
    • onMetricsRecordingFinished

      private Consumer<Path> onMetricsRecordingFinished
    • willStartRecordingMetrics

      private boolean willStartRecordingMetrics
    • debugCommandProfiler

      private @Nullable MinecraftServer.TimeProfiler debugCommandProfiler
    • debugCommandProfilerDelayStart

      private boolean debugCommandProfilerDelayStart
    • connection

      private final ServerConnectionListener connection
    • levelLoadListener

      private final LevelLoadListener levelLoadListener
    • status

      private @Nullable ServerStatus status
    • statusIcon

      private @Nullable ServerStatus.Favicon statusIcon
    • random

      private final RandomSource random
    • fixerUpper

      private final com.mojang.datafixers.DataFixer fixerUpper
    • localIp

      private String localIp
    • port

      private int port
    • registries

      private final LayeredRegistryAccess<RegistryLayer> registries
    • levels

      private final Map<ResourceKey<Level>, ServerLevel> levels
    • playerList

      private PlayerList playerList
    • running

      private volatile boolean running
    • stopped

      private boolean stopped
    • tickCount

      private int tickCount
    • ticksUntilAutosave

      private int ticksUntilAutosave
    • proxy

      protected final Proxy proxy
    • onlineMode

      private boolean onlineMode
    • preventProxyConnections

      private boolean preventProxyConnections
    • motd

      private @Nullable String motd
    • playerIdleTimeout

      private int playerIdleTimeout
    • tickTimesNanos

      private final long[] tickTimesNanos
    • aggregatedTickTimesNanos

      private long aggregatedTickTimesNanos
    • keyPair

      private @Nullable KeyPair keyPair
    • singleplayerProfile

      private @Nullable com.mojang.authlib.GameProfile singleplayerProfile
    • isDemo

      private boolean isDemo
    • isReady

      private volatile boolean isReady
    • lastOverloadWarningNanos

      private long lastOverloadWarningNanos
    • services

      protected final Services services
    • notificationManager

      private final NotificationManager notificationManager
    • serverActivityMonitor

      private final ServerActivityMonitor serverActivityMonitor
    • lastServerStatus

      private long lastServerStatus
    • serverThread

      private final Thread serverThread
    • lastTickNanos

      private long lastTickNanos
    • taskExecutionStartNanos

      private long taskExecutionStartNanos
    • idleTimeNanos

      private long idleTimeNanos
    • nextTickTimeNanos

      protected long nextTickTimeNanos
    • waitingForNextTick

      private boolean waitingForNextTick
    • delayedTasksMaxNextTickTimeNanos

      private long delayedTasksMaxNextTickTimeNanos
    • mayHaveDelayedTasks

      private boolean mayHaveDelayedTasks
    • packRepository

      private final PackRepository packRepository
    • worldGenSettings

      private final WorldGenSettings worldGenSettings
    • scoreboard

      private final ServerScoreboard scoreboard
    • stopwatches

      private @Nullable Stopwatches stopwatches
    • commandStorage

      private @Nullable CommandStorage commandStorage
    • customBossEvents

      private final CustomBossEvents customBossEvents
    • randomSequences

      private final RandomSequences randomSequences
    • weatherData

      private final WeatherData weatherData
    • functionManager

      private final ServerFunctionManager functionManager
    • enforceWhitelist

      private boolean enforceWhitelist
    • usingWhitelist

      private boolean usingWhitelist
    • smoothedTickTimeMillis

      private float smoothedTickTimeMillis
    • executor

      private final Executor executor
    • serverId

      private @Nullable String serverId
    • resources

    • structureTemplateManager

      private final StructureTemplateManager structureTemplateManager
    • tickRateManager

      private final ServerTickRateManager tickRateManager
    • debugSubscribers

      private final ServerDebugSubscribers debugSubscribers
    • worldData

      protected final WorldData worldData
    • effectiveRespawnData

      private LevelData.RespawnData effectiveRespawnData
    • potionBrewing

      private final PotionBrewing potionBrewing
    • fuelValues

      private FuelValues fuelValues
    • emptyTicks

      private int emptyTicks
    • isSaving

      private volatile boolean isSaving
    • suppressedExceptions

      private final SuppressedExceptionCollector suppressedExceptions
    • tickFrame

      private final com.mojang.jtracy.DiscontinuousFrame tickFrame
    • packetProcessor

      private final PacketProcessor packetProcessor
    • scheduledEvents

      private final TimerQueue<MinecraftServer> scheduledEvents
    • clockManager

      private final ServerClockManager clockManager
    • GSON

      private static final Gson GSON
    • cachedServerStatus

      private String cachedServerStatus
    • perWorldTickTimes

      private Map<ResourceKey<Level>, long[]> perWorldTickTimes
    • worldArrayMarker

      private int worldArrayMarker
    • worldArrayLast

      private int worldArrayLast
    • worldArray

      private ServerLevel[] worldArray
  • Constructor Details

  • Method Details

    • spin

      public static <S extends MinecraftServer> S spin(Function<Thread,S> factory)
    • initServer

      protected abstract boolean initServer() throws IOException
      Throws:
      IOException
    • createChunkLoadStatusView

      public ChunkLoadStatusView createChunkLoadStatusView(int radius)
    • loadLevel

      protected void loadLevel()
    • forceDifficulty

      protected void forceDifficulty()
    • createLevels

      protected void createLevels()
    • setInitialSpawn

      private static void setInitialSpawn(ServerLevel level, ServerLevelData levelData, boolean spawnBonusChest, boolean isDebug, LevelLoadListener levelLoadListener)
    • setupDebugLevel

      private void setupDebugLevel(WorldData worldData)
    • prepareLevels

      private void prepareLevels()
    • selectLevelLoadFocusPos

      protected GlobalPos selectLevelLoadFocusPos()
    • getDefaultGameType

      public GameType getDefaultGameType()
    • isHardcore

      public boolean isHardcore()
    • operatorUserPermissions

      public abstract LevelBasedPermissionSet operatorUserPermissions()
    • getFunctionCompilationPermissions

      public abstract PermissionSet getFunctionCompilationPermissions()
    • shouldRconBroadcast

      public abstract boolean shouldRconBroadcast()
    • saveAllChunks

      public boolean saveAllChunks(boolean silent, boolean flush, boolean force)
    • saveEverything

      public boolean saveEverything(boolean silent, boolean flush, boolean force)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface TaskScheduler<TickTask>
    • stopServer

      protected void stopServer()
    • getLocalIp

      public String getLocalIp()
    • setLocalIp

      public void setLocalIp(String ip)
    • isRunning

      public boolean isRunning()
    • halt

      public void halt(boolean wait)
      Sets the serverRunning variable to false, in order to get the server to shut down.
    • runServer

      protected void runServer()
    • logFullTickTime

      private void logFullTickTime()
    • startMeasuringTaskExecutionTime

      private void startMeasuringTaskExecutionTime()
    • finishMeasuringTaskExecutionTime

      private void finishMeasuringTaskExecutionTime()
    • constructOrExtractCrashReport

      private static CrashReport constructOrExtractCrashReport(Throwable t)
    • haveTime

      private boolean haveTime()
    • notificationManager

      public NotificationManager notificationManager()
    • waitUntilNextTick

      protected void waitUntilNextTick()
    • waitForTasks

      protected void waitForTasks()
      Overrides:
      waitForTasks in class BlockableEventLoop<TickTask>
    • wrapRunnable

      public TickTask wrapRunnable(Runnable runnable)
      Specified by:
      wrapRunnable in interface TaskScheduler<TickTask>
    • shouldRun

      protected boolean shouldRun(TickTask task)
      Specified by:
      shouldRun in class BlockableEventLoop<TickTask>
    • pollTask

      protected boolean pollTask()
      Overrides:
      pollTask in class BlockableEventLoop<TickTask>
    • pollTaskInternal

      private boolean pollTaskInternal()
    • doRunTask

      protected void doRunTask(TickTask task)
      Overrides:
      doRunTask in class ReentrantBlockableEventLoop<TickTask>
    • loadStatusIcon

      private Optional<ServerStatus.Favicon> loadStatusIcon()
    • getWorldScreenshotFile

      public Optional<Path> getWorldScreenshotFile()
    • getServerDirectory

      public Path getServerDirectory()
    • getServerActivityMonitor

      public ServerActivityMonitor getServerActivityMonitor()
    • onServerCrash

      protected void onServerCrash(CrashReport report)
      Called on exit from the main run() loop.
    • onServerExit

      protected void onServerExit()
    • isPaused

      public boolean isPaused()
    • tickServer

      protected void tickServer(BooleanSupplier haveTime)
      Main function called by run() every loop.
    • processPacketsAndTick

      protected void processPacketsAndTick(boolean sprinting)
    • autoSave

      private void autoSave()
    • logTickMethodTime

      private void logTickMethodTime(long startTime)
    • resetStatusCache

      private void resetStatusCache(ServerStatus status)
    • getStatusJson

      public String getStatusJson()
    • computeNextAutosaveInterval

      private int computeNextAutosaveInterval()
    • onTickRateChanged

      public void onTickRateChanged()
    • getTickTimeLogger

      protected abstract SampleLogger getTickTimeLogger()
    • isTickTimeLoggingEnabled

      public abstract boolean isTickTimeLoggingEnabled()
    • buildServerStatus

      private ServerStatus buildServerStatus()
    • buildPlayerStatus

      private ServerStatus.Players buildPlayerStatus()
    • tickChildren

      protected void tickChildren(BooleanSupplier haveTime)
    • updateEffectiveRespawnData

      protected void updateEffectiveRespawnData()
    • tickConnection

      protected void tickConnection()
    • forceGameTimeSynchronization

      public void forceGameTimeSynchronization()
    • addTickable

      public void addTickable(Runnable tickable)
    • setId

      protected void setId(String serverId)
    • isShutdown

      public boolean isShutdown()
    • getFile

      public Path getFile(String name)
    • overworld

      public final ServerLevel overworld()
    • getLevel

      public @Nullable ServerLevel getLevel(ResourceKey<Level> dimension)
      Gets the worldServer by the given dimension.
    • levelKeys

      public Set<ResourceKey<Level>> levelKeys()
    • getAllLevels

      public Iterable<ServerLevel> getAllLevels()
    • getServerVersion

      public String getServerVersion()
      Specified by:
      getServerVersion in interface ServerInfo
    • getPlayerCount

      public int getPlayerCount()
      Specified by:
      getPlayerCount in interface ServerInfo
    • getPlayerNames

      public String[] getPlayerNames()
    • getServerModName

      public String getServerModName()
    • clockManager

      public ServerClockManager clockManager()
    • fillSystemReport

      public SystemReport fillSystemReport(SystemReport systemReport)
    • fillServerSystemReport

      public abstract SystemReport fillServerSystemReport(SystemReport systemReport)
    • getModdedStatus

      public ModCheck getModdedStatus()
    • sendSystemMessage

      public void sendSystemMessage(Component message)
      Specified by:
      sendSystemMessage in interface CommandSource
    • getKeyPair

      public KeyPair getKeyPair()
    • getPort

      public int getPort()
    • setPort

      public void setPort(int port)
    • getSingleplayerProfile

      public @Nullable com.mojang.authlib.GameProfile getSingleplayerProfile()
    • setSingleplayerProfile

      public void setSingleplayerProfile(@Nullable com.mojang.authlib.GameProfile singleplayerProfile)
    • isSingleplayer

      public boolean isSingleplayer()
    • initializeKeyPair

      protected void initializeKeyPair()
    • setDifficulty

      public void setDifficulty(Difficulty difficulty, boolean ignoreLock)
    • getScaledTrackingDistance

      public int getScaledTrackingDistance(int baseRange)
    • updateMobSpawningFlags

      public void updateMobSpawningFlags()
    • setDifficultyLocked

      public void setDifficultyLocked(boolean locked)
    • sendDifficultyUpdate

      private void sendDifficultyUpdate(ServerPlayer player)
    • isDemo

      public boolean isDemo()
    • setDemo

      public void setDemo(boolean demo)
      Sets whether this is a demo or not.
    • getCodeOfConducts

      public Map<String,String> getCodeOfConducts()
    • getServerResourcePack

      public Optional<MinecraftServer.ServerResourcePackInfo> getServerResourcePack()
    • isResourcePackRequired

      public boolean isResourcePackRequired()
    • isDedicatedServer

      public abstract boolean isDedicatedServer()
    • getRateLimitPacketsPerSecond

      public abstract int getRateLimitPacketsPerSecond()
    • usesAuthentication

      public boolean usesAuthentication()
    • setUsesAuthentication

      public void setUsesAuthentication(boolean onlineMode)
    • getPreventProxyConnections

      public boolean getPreventProxyConnections()
    • setPreventProxyConnections

      public void setPreventProxyConnections(boolean preventProxyConnections)
    • useNativeTransport

      public abstract boolean useNativeTransport()
    • allowFlight

      public boolean allowFlight()
    • getMotd

      public String getMotd()
      Specified by:
      getMotd in interface ServerInfo
    • setMotd

      public void setMotd(String motd)
    • isStopped

      public boolean isStopped()
    • getPlayerList

      public PlayerList getPlayerList()
    • setPlayerList

      public void setPlayerList(PlayerList players)
    • isPublished

      public abstract boolean isPublished()
    • setDefaultGameType

      public void setDefaultGameType(GameType gameType)
      Sets the game type for all worlds.
    • enforceGameTypeForPlayers

      public int enforceGameTypeForPlayers(@Nullable GameType gameType)
    • getConnection

      public ServerConnectionListener getConnection()
    • isReady

      public boolean isReady()
    • publishServer

      public boolean publishServer(@Nullable GameType gameMode, boolean allowCommands, int port)
    • getTickCount

      public int getTickCount()
    • isUnderSpawnProtection

      public boolean isUnderSpawnProtection(ServerLevel level, BlockPos pos, Player player)
    • repliesToStatus

      public boolean repliesToStatus()
    • hidesOnlinePlayers

      public boolean hidesOnlinePlayers()
    • getProxy

      public Proxy getProxy()
    • playerIdleTimeout

      public int playerIdleTimeout()
    • setPlayerIdleTimeout

      public void setPlayerIdleTimeout(int playerIdleTimeout)
    • services

      public Services services()
    • getStatus

      public @Nullable ServerStatus getStatus()
    • invalidateStatus

      public void invalidateStatus()
    • getAbsoluteMaxWorldSize

      public int getAbsoluteMaxWorldSize()
    • scheduleExecutables

      public boolean scheduleExecutables()
      Overrides:
      scheduleExecutables in class ReentrantBlockableEventLoop<TickTask>
    • executeIfPossible

      public void executeIfPossible(Runnable command)
      Overrides:
      executeIfPossible in class BlockableEventLoop<TickTask>
    • getRunningThread

      public Thread getRunningThread()
      Specified by:
      getRunningThread in class BlockableEventLoop<TickTask>
    • getCompressionThreshold

      public int getCompressionThreshold()
    • enforceSecureProfile

      public boolean enforceSecureProfile()
    • getNextTickTime

      public long getNextTickTime()
    • getFixerUpper

      public com.mojang.datafixers.DataFixer getFixerUpper()
    • getAdvancements

      public ServerAdvancementManager getAdvancements()
    • getFunctions

      public ServerFunctionManager getFunctions()
    • reloadResources

      public CompletableFuture<Void> reloadResources(Collection<String> packsToEnable)
      Replaces currently selected list of datapacks, reloads them, and sends new data to players.
    • configurePackRepository

      public static WorldDataConfiguration configurePackRepository(PackRepository packRepository, WorldDataConfiguration initialDataConfig, boolean initMode, boolean safeMode)
    • configureRepositoryWithSelection

      private static WorldDataConfiguration configureRepositoryWithSelection(PackRepository packRepository, Collection<String> selected, FeatureFlagSet forcedFeatures, boolean disableInactive)
    • enableForcedFeaturePacks

      private static void enableForcedFeaturePacks(PackRepository packRepository, FeatureFlagSet forcedFeatures)
    • getSelectedPacks

      private static DataPackConfig getSelectedPacks(PackRepository packRepository, boolean disableInactive)
    • kickUnlistedPlayers

      public void kickUnlistedPlayers()
    • getPackRepository

      public PackRepository getPackRepository()
    • getCommands

      public Commands getCommands()
    • createCommandSourceStack

      public CommandSourceStack createCommandSourceStack()
    • findRespawnDimension

      public ServerLevel findRespawnDimension()
    • setRespawnData

      public void setRespawnData(LevelData.RespawnData respawnData)
    • getRespawnData

      public LevelData.RespawnData getRespawnData()
    • acceptsSuccess

      public boolean acceptsSuccess()
      Specified by:
      acceptsSuccess in interface CommandSource
    • acceptsFailure

      public boolean acceptsFailure()
      Specified by:
      acceptsFailure in interface CommandSource
    • shouldInformAdmins

      public abstract boolean shouldInformAdmins()
      Specified by:
      shouldInformAdmins in interface CommandSource
    • getWorldGenSettings

      public WorldGenSettings getWorldGenSettings()
    • getRecipeManager

      public RecipeManager getRecipeManager()
    • getScoreboard

      public ServerScoreboard getScoreboard()
    • getCommandStorage

      public CommandStorage getCommandStorage()
    • getStopwatches

      public Stopwatches getStopwatches()
    • getCustomBossEvents

      public CustomBossEvents getCustomBossEvents()
    • getRandomSequence

      public RandomSource getRandomSequence(Identifier key)
    • getRandomSequences

      public RandomSequences getRandomSequences()
    • setWeatherParameters

      public void setWeatherParameters(int clearTime, int rainTime, boolean raining, boolean thundering)
    • getWeatherData

      public WeatherData getWeatherData()
    • isEnforceWhitelist

      public boolean isEnforceWhitelist()
    • setEnforceWhitelist

      public void setEnforceWhitelist(boolean enforceWhitelist)
    • isUsingWhitelist

      public boolean isUsingWhitelist()
    • setUsingWhitelist

      public void setUsingWhitelist(boolean usingWhitelist)
    • getCurrentSmoothedTickTime

      public float getCurrentSmoothedTickTime()
    • tickRateManager

      public ServerTickRateManager tickRateManager()
    • getAverageTickTimeNanos

      public long getAverageTickTimeNanos()
    • getTickTimesNanos

      public long[] getTickTimesNanos()
    • getProfilePermissions

      public LevelBasedPermissionSet getProfilePermissions(NameAndId nameAndId)
    • isSingleplayerOwner

      public abstract boolean isSingleplayerOwner(NameAndId nameAndId)
    • getTickTime

      public @Nullable long[] getTickTime(ResourceKey<Level> dim)
    • forgeGetWorldMap

      @Deprecated public Map<ResourceKey<Level>, ServerLevel> forgeGetWorldMap()
      Deprecated.
    • markWorldsDirty

      @Deprecated public void markWorldsDirty()
      Deprecated.
    • getWorldArray

      private ServerLevel[] getWorldArray()
    • dumpServerProperties

      public void dumpServerProperties(Path path) throws IOException
      Throws:
      IOException
    • saveDebugReport

      private void saveDebugReport(Path output)
    • dumpMiscStats

      private void dumpMiscStats(Path path) throws IOException
      Throws:
      IOException
    • dumpGameRules

      private void dumpGameRules(Path path) throws IOException
      Throws:
      IOException
    • dumpClasspath

      private void dumpClasspath(Path path) throws IOException
      Throws:
      IOException
    • dumpThreads

      private void dumpThreads(Path path) throws IOException
      Throws:
      IOException
    • dumpNativeModules

      private void dumpNativeModules(Path path) throws IOException
      Throws:
      IOException
    • createProfiler

      private ProfilerFiller createProfiler()
    • endMetricsRecordingTick

      protected void endMetricsRecordingTick()
    • isRecordingMetrics

      public boolean isRecordingMetrics()
    • startRecordingMetrics

      public void startRecordingMetrics(Consumer<ProfileResults> onStopped, Consumer<Path> onFinished)
    • stopRecordingMetrics

      public void stopRecordingMetrics()
    • finishRecordingMetrics

      public void finishRecordingMetrics()
    • cancelRecordingMetrics

      public void cancelRecordingMetrics()
    • getWorldPath

      public Path getWorldPath(LevelResource resource)
    • forceSynchronousWrites

      public boolean forceSynchronousWrites()
    • getStructureManager

      public StructureTemplateManager getStructureManager()
    • getWorldData

      public WorldData getWorldData()
    • getServerResources

      public MinecraftServer.ReloadableResources getServerResources()
    • registryAccess

      public RegistryAccess.Frozen registryAccess()
    • registries

      public LayeredRegistryAccess<RegistryLayer> registries()
    • reloadableRegistries

      public ReloadableServerRegistries.Holder reloadableRegistries()
    • createTextFilterForPlayer

      public TextFilter createTextFilterForPlayer(ServerPlayer player)
    • createGameModeForPlayer

      public ServerPlayerGameMode createGameModeForPlayer(ServerPlayer player)
    • getForcedGameType

      public @Nullable GameType getForcedGameType()
    • getResourceManager

      public ResourceManager getResourceManager()
    • isCurrentlySaving

      public boolean isCurrentlySaving()
    • isTimeProfilerRunning

      public boolean isTimeProfilerRunning()
    • startTimeProfiler

      public void startTimeProfiler()
    • stopTimeProfiler

      public ProfileResults stopTimeProfiler()
    • getMaxChainedNeighborUpdates

      public int getMaxChainedNeighborUpdates()
    • logChatMessage

      public void logChatMessage(Component message, ChatType.Bound chatType, @Nullable String tag)
    • getChatDecorator

      public ChatDecorator getChatDecorator()
    • logIPs

      public boolean logIPs()
    • handleCustomClickAction

      public void handleCustomClickAction(Identifier id, Optional<Tag> payload)
    • getLevelLoadListener

      public LevelLoadListener getLevelLoadListener()
    • setAutoSave

      public boolean setAutoSave(boolean enable)
    • isAutoSave

      public boolean isAutoSave()
    • onGameRuleChanged

      public <T> void onGameRuleChanged(GameRule<T> rule, T value)
    • getGlobalGameRules

      @Deprecated public GameRules getGlobalGameRules()
      Deprecated.
    • getDataStorage

      public SavedDataStorage getDataStorage()
    • getScheduledEvents

      public TimerQueue<MinecraftServer> getScheduledEvents()
    • getGameRules

      public GameRules getGameRules()
    • acceptsTransfers

      public boolean acceptsTransfers()
    • storeChunkIoError

      private void storeChunkIoError(CrashReport report, ChunkPos pos, RegionStorageInfo storageInfo)
    • reportChunkLoadFailure

      public void reportChunkLoadFailure(Throwable throwable, RegionStorageInfo storageInfo, ChunkPos pos)
      Specified by:
      reportChunkLoadFailure in interface ChunkIOErrorReporter
    • reportChunkSaveFailure

      public void reportChunkSaveFailure(Throwable throwable, RegionStorageInfo storageInfo, ChunkPos pos)
      Specified by:
      reportChunkSaveFailure in interface ChunkIOErrorReporter
    • warnOnLowDiskSpace

      protected void warnOnLowDiskSpace()
    • sendLowDiskSpaceWarning

      public void sendLowDiskSpaceWarning()
    • reportPacketHandlingException

      public void reportPacketHandlingException(Throwable throwable, PacketType<?> packetType)
    • potionBrewing

      public PotionBrewing potionBrewing()
    • fuelValues

      public FuelValues fuelValues()
    • serverLinks

      public ServerLinks serverLinks()
    • pauseWhenEmptySeconds

      protected int pauseWhenEmptySeconds()
    • packetProcessor

      public PacketProcessor packetProcessor()
    • debugSubscribers

      public ServerDebugSubscribers debugSubscribers()