Package net.minecraft.server
Class MinecraftServer
java.lang.Object
net.minecraft.util.thread.BlockableEventLoop<TickTask>
net.minecraft.util.thread.ReentrantBlockableEventLoop<TickTask>
net.minecraft.server.MinecraftServer
- All Implemented Interfaces:
AutoCloseable
,Executor
,CommandSource
,ServerInfo
,ProfilerMeasured
,ProcessorHandle<TickTask>
,ChunkIOErrorReporter
- Direct Known Subclasses:
DedicatedServer
,EphemeralTestServerProvider.JUnitServer
,GameTestServer
,IntegratedServer
public abstract class MinecraftServer
extends ReentrantBlockableEventLoop<TickTask>
implements ServerInfo, ChunkIOErrorReporter, CommandSource, AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
static final record
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
private long
private boolean
static final com.mojang.authlib.GameProfile
private static final int
private static final float
private String
private CommandStorage
private final ServerConnectionListener
private final CustomBossEvents
private MinecraftServer.TimeProfiler
private boolean
private long
static final LevelSettings
private boolean
private final Executor
private static final AtomicReference
<RuntimeException> private final com.mojang.datafixers.DataFixer
private final ServerFunctionManager
private static final com.google.gson.Gson
private long
private boolean
private boolean
private boolean
private KeyPair
private long
private long
private long
private final Map
<ResourceKey<Level>, ServerLevel> private String
private static final org.slf4j.Logger
private static final int
private static final int
private boolean
private MetricsRecorder
private static final int
private String
protected long
private boolean
private Consumer
<ProfileResults> private static final long
private static final int
private static final int
private static final long
private final PackRepository
private Map
<ResourceKey<Level>, long[]> protected final PlayerDataStorage
private int
private PlayerList
private int
private final PotionBrewing
private static final long
private boolean
private ProfilerFiller
private final ChunkProgressListenerFactory
protected final Proxy
private boolean
private final RandomSource
private final LayeredRegistryAccess
<RegistryLayer> private boolean
private final ServerScoreboard
private String
private final Thread
protected final Services
private com.mojang.authlib.GameProfile
private float
private static final int
private ServerStatus
private static final long
private ServerStatus.Favicon
private boolean
protected final LevelStorageSource.LevelStorageAccess
private final StructureTemplateManager
private long
private static final int
private int
private final ServerTickRateManager
private int
private final long[]
static final String
private boolean
private ServerLevel[]
private int
private int
protected final WorldData
Fields inherited from interface net.minecraft.commands.CommandSource
NULL
-
Constructor Summary
ConstructorsConstructorDescriptionMinecraftServer
(Thread p_236723_, LevelStorageSource.LevelStorageAccess p_236724_, PackRepository p_236725_, WorldStem p_236726_, Proxy p_236727_, com.mojang.datafixers.DataFixer p_236728_, Services p_236729_, ChunkProgressListenerFactory p_236730_) -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
void
addTickable
(Runnable pTickable) boolean
private ServerStatus.Players
private ServerStatus
void
void
close()
private int
static WorldDataConfiguration
configurePackRepository
(PackRepository pPackRepository, WorldDataConfiguration pInitialDataConfig, boolean pInitMode, boolean pSafeMode) private static WorldDataConfiguration
configureRepositoryWithSelection
(PackRepository pPackRepository, Collection<String> pSelectedPacks, FeatureFlagSet pEnabledFeatures, boolean pSafeMode) private static CrashReport
createGameModeForPlayer
(ServerPlayer pPlayer) protected void
createLevels
(ChunkProgressListener pListener) createTextFilterForPlayer
(ServerPlayer pPlayer) void
private void
dumpClasspath
(Path pPath) private void
dumpGameRules
(Path pPath) private void
dumpMiscStats
(Path pPath) private void
dumpNativeModules
(Path pPath) void
dumpServerProperties
(Path pPath) private void
dumpThreads
(Path pPath) private static void
enableForcedFeaturePacks
(PackRepository pPackRepository, FeatureFlagSet pEnabledFeatures) void
boolean
void
executeIfPossible
(Runnable pTask) abstract SystemReport
fillServerSystemReport
(SystemReport pReport) fillSystemReport
(SystemReport pSystemReport) private void
void
protected void
boolean
void
Deprecated.int
long
int
float
com.mojang.datafixers.DataFixer
abstract int
getLevel
(ResourceKey<Level> pDimension) Gets the worldServer by the given dimension.int
int
getMotd()
long
abstract int
int
int
String[]
int
getPort()
boolean
int
getProfilePermissions
(com.mojang.authlib.GameProfile p_129945_) com.mojang.authlib.GameProfileRepository
getProxy()
abstract int
int
getScaledTrackingDistance
(int pTrackingDistance) private static DataPackConfig
getSelectedPacks
(PackRepository pPackRepository, boolean pSafeMode) com.mojang.authlib.minecraft.MinecraftSessionService
com.mojang.authlib.GameProfile
int
int
getSpawnRadius
(ServerLevel pLevel) int
long[]
getTickTime
(ResourceKey<Level> dim) protected abstract SampleLogger
long[]
private ServerLevel[]
getWorldPath
(LevelResource pLevelResource) void
halt
(boolean pWaitForServer) Sets the serverRunning variable to false, in order to get the server to shut down.boolean
hasGui()
private boolean
haveTime()
boolean
protected void
protected abstract boolean
void
abstract boolean
boolean
abstract boolean
boolean
isDemo()
boolean
abstract boolean
boolean
boolean
boolean
isLevelEnabled
(Level pLevel) boolean
isPaused()
abstract boolean
boolean
boolean
isReady()
boolean
boolean
boolean
boolean
boolean
abstract boolean
isSingleplayerOwner
(com.mojang.authlib.GameProfile p_129840_) boolean
boolean
boolean
abstract boolean
boolean
boolean
isUnderSpawnProtection
(ServerLevel pLevel, BlockPos pPos, Player pPlayer) void
kickUnlistedPlayers
(CommandSourceStack pCommandSource) protected void
private Optional
<ServerStatus.Favicon> void
logChatMessage
(Component pContent, ChatType.Bound pBoundChatType, String pHeader) private void
boolean
logIPs()
private void
logTickMethodTime
(long pStartTime) void
managedBlock
(BooleanSupplier pIsDone) Drive the executor until the given BooleanSupplier returns truevoid
Deprecated.void
onServerCrash
(CrashReport pReport) Called on exit from the main run() loop.void
void
final ServerLevel
boolean
pollTask()
private boolean
private void
prepareLevels
(ChunkProgressListener pListener) Loads the spawn chunks and any forced chunksboolean
publishServer
(GameType pGameMode, boolean pCommands, int pPort) private void
readScoreboard
(DimensionDataStorage pDataStorage) reloadResources
(Collection<String> pSelectedIds) Replaces currently selected list of datapacks, reloads them, and sends new data to players.boolean
void
reportChunkLoadFailure
(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) void
reportChunkSaveFailure
(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) private void
resetStatusCache
(ServerStatus status) protected void
boolean
saveAllChunks
(boolean pSuppressLog, boolean pFlush, boolean pForced) private void
saveDebugReport
(Path pPath) boolean
saveEverything
(boolean pSuppressLog, boolean pFlush, boolean pForced) boolean
private void
sendDifficultyUpdate
(ServerPlayer p_129939_) void
sendSystemMessage
(Component pComponent) void
setDefaultGameType
(GameType pGameMode) Sets the game type for all worlds.void
setDemo
(boolean pDemo) Sets whether this is a demo or not.void
setDifficulty
(Difficulty pDifficulty, boolean pForced) void
setDifficultyLocked
(boolean pLocked) void
setEnforceWhitelist
(boolean pWhitelistEnabled) static void
setFatalException
(RuntimeException pFatalException) void
setFlightAllowed
(boolean pAllow) protected void
private static void
setInitialSpawn
(ServerLevel pLevel, ServerLevelData pLevelData, boolean pGenerateBonusChest, boolean pDebug) void
setLocalIp
(String pLocalIp) void
void
setPlayerIdleTimeout
(int pIdleTimeout) void
setPlayerList
(PlayerList pList) void
setPort
(int pPort) void
setPreventProxyConnections
(boolean pPreventProxyConnections) void
setPvpAllowed
(boolean pAllowPvp) void
setSingleplayerProfile
(com.mojang.authlib.GameProfile p_236741_) private void
setupDebugLevel
(WorldData pWorldData) void
setUsesAuthentication
(boolean pOnline) abstract boolean
abstract boolean
protected boolean
static <S extends MinecraftServer>
Sprivate void
private void
void
startRecordingMetrics
(Consumer<ProfileResults> pOutput, Consumer<Path> pOnMetricsRecordingFinished) void
void
void
private void
storeChunkIoError
(CrashReport pCrashReport, ChunkPos pChunkPos, RegionStorageInfo pRegionStorageInfo) void
subscribeToDebugSample
(ServerPlayer pPlayer, RemoteDebugSampleType pSampleType) private void
synchronizeTime
(ServerLevel pLevel) static boolean
void
tickChildren
(BooleanSupplier pHasTimeLeft) void
tickServer
(BooleanSupplier pHasTimeLeft) Main function called by run() every loop.private void
boolean
void
protected void
protected TickTask
wrapRunnable
(Runnable pRunnable) 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 -
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
private static final int SPAWN_POSITION_SEARCH_RADIUS- See Also:
-
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
-
ANONYMOUS_PLAYER_PROFILE
public static final com.mojang.authlib.GameProfile ANONYMOUS_PLAYER_PROFILE -
storageSource
-
playerDataStorage
-
tickables
-
metricsRecorder
-
profiler
-
onMetricsRecordingStopped
-
onMetricsRecordingFinished
-
willStartRecordingMetrics
private boolean willStartRecordingMetrics -
debugCommandProfiler
-
debugCommandProfilerDelayStart
private boolean debugCommandProfilerDelayStart -
connection
-
progressListenerFactory
-
status
-
statusIcon
-
random
-
fixerUpper
private final com.mojang.datafixers.DataFixer fixerUpper -
localIp
-
port
private int port -
registries
-
levels
-
playerList
-
running
private volatile boolean running -
stopped
private boolean stopped -
tickCount
private int tickCount -
ticksUntilAutosave
private int ticksUntilAutosave -
proxy
-
onlineMode
private boolean onlineMode -
preventProxyConnections
private boolean preventProxyConnections -
pvp
private boolean pvp -
allowFlight
private boolean allowFlight -
motd
-
playerIdleTimeout
private int playerIdleTimeout -
tickTimesNanos
private final long[] tickTimesNanos -
aggregatedTickTimesNanos
private long aggregatedTickTimesNanos -
keyPair
-
singleplayerProfile
@Nullable private com.mojang.authlib.GameProfile singleplayerProfile -
isDemo
private boolean isDemo -
isReady
private volatile boolean isReady -
lastOverloadWarningNanos
private long lastOverloadWarningNanos -
services
-
lastServerStatus
private long lastServerStatus -
serverThread
-
lastTickNanos
private long lastTickNanos -
taskExecutionStartNanos
private long taskExecutionStartNanos -
idleTimeNanos
private long idleTimeNanos -
nextTickTimeNanos
protected long nextTickTimeNanos -
delayedTasksMaxNextTickTimeNanos
private long delayedTasksMaxNextTickTimeNanos -
mayHaveDelayedTasks
private boolean mayHaveDelayedTasks -
packRepository
-
scoreboard
-
commandStorage
-
customBossEvents
-
functionManager
-
enforceWhitelist
private boolean enforceWhitelist -
smoothedTickTimeMillis
private float smoothedTickTimeMillis -
executor
-
serverId
-
resources
-
structureTemplateManager
-
tickRateManager
-
worldData
-
potionBrewing
-
isSaving
private volatile boolean isSaving -
fatalException
-
GSON
private static final com.google.gson.Gson GSON -
cachedServerStatus
-
perWorldTickTimes
-
worldArrayMarker
private int worldArrayMarker -
worldArrayLast
private int worldArrayLast -
worldArray
-
-
Constructor Details
-
MinecraftServer
public MinecraftServer(Thread p_236723_, LevelStorageSource.LevelStorageAccess p_236724_, PackRepository p_236725_, WorldStem p_236726_, Proxy p_236727_, com.mojang.datafixers.DataFixer p_236728_, Services p_236729_, ChunkProgressListenerFactory p_236730_)
-
-
Method Details
-
spin
-
readScoreboard
-
initServer
- Throws:
IOException
-
loadLevel
protected void loadLevel() -
forceDifficulty
protected void forceDifficulty() -
createLevels
-
setInitialSpawn
private static void setInitialSpawn(ServerLevel pLevel, ServerLevelData pLevelData, boolean pGenerateBonusChest, boolean pDebug) -
setupDebugLevel
-
prepareLevels
Loads the spawn chunks and any forced chunks -
getDefaultGameType
-
isHardcore
public boolean isHardcore() -
getOperatorUserPermissionLevel
public abstract int getOperatorUserPermissionLevel() -
getFunctionCompilationLevel
public abstract int getFunctionCompilationLevel() -
shouldRconBroadcast
public abstract boolean shouldRconBroadcast() -
saveAllChunks
public boolean saveAllChunks(boolean pSuppressLog, boolean pFlush, boolean pForced) -
saveEverything
public boolean saveEverything(boolean pSuppressLog, boolean pFlush, boolean pForced) -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceProcessorHandle<TickTask>
-
stopServer
public void stopServer() -
getLocalIp
-
setLocalIp
-
isRunning
public boolean isRunning() -
halt
public void halt(boolean pWaitForServer) 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
-
haveTime
private boolean haveTime() -
throwIfFatalException
public static boolean throwIfFatalException() -
setFatalException
-
managedBlock
Drive the executor until the given BooleanSupplier returns true- Overrides:
managedBlock
in classBlockableEventLoop<TickTask>
-
waitUntilNextTick
protected void waitUntilNextTick() -
waitForTasks
public void waitForTasks()- Overrides:
waitForTasks
in classBlockableEventLoop<TickTask>
-
wrapRunnable
- Specified by:
wrapRunnable
in classBlockableEventLoop<TickTask>
-
shouldRun
- Specified by:
shouldRun
in classBlockableEventLoop<TickTask>
-
pollTask
public boolean pollTask()- Overrides:
pollTask
in classBlockableEventLoop<TickTask>
-
pollTaskInternal
private boolean pollTaskInternal() -
doRunTask
- Overrides:
doRunTask
in classReentrantBlockableEventLoop<TickTask>
-
loadStatusIcon
-
getWorldScreenshotFile
-
getServerDirectory
-
onServerCrash
Called on exit from the main run() loop. -
onServerExit
public void onServerExit() -
isPaused
public boolean isPaused() -
tickServer
Main function called by run() every loop. -
logTickMethodTime
private void logTickMethodTime(long pStartTime) -
resetStatusCache
-
getStatusJson
-
computeNextAutosaveInterval
private int computeNextAutosaveInterval() -
onTickRateChanged
public void onTickRateChanged() -
getTickTimeLogger
-
isTickTimeLoggingEnabled
public abstract boolean isTickTimeLoggingEnabled() -
buildServerStatus
-
buildPlayerStatus
-
tickChildren
-
synchronizeTime
-
forceTimeSynchronization
public void forceTimeSynchronization() -
isLevelEnabled
-
addTickable
-
setId
-
isShutdown
public boolean isShutdown() -
getFile
-
overworld
-
getLevel
Gets the worldServer by the given dimension. -
levelKeys
-
getAllLevels
-
getServerVersion
- Specified by:
getServerVersion
in interfaceServerInfo
-
getPlayerCount
public int getPlayerCount()- Specified by:
getPlayerCount
in interfaceServerInfo
-
getMaxPlayers
public int getMaxPlayers()- Specified by:
getMaxPlayers
in interfaceServerInfo
-
getPlayerNames
-
getServerModName
-
fillSystemReport
-
fillServerSystemReport
-
getModdedStatus
-
sendSystemMessage
- Specified by:
sendSystemMessage
in interfaceCommandSource
-
getKeyPair
-
getPort
public int getPort() -
setPort
public void setPort(int pPort) -
getSingleplayerProfile
@Nullable public com.mojang.authlib.GameProfile getSingleplayerProfile() -
setSingleplayerProfile
public void setSingleplayerProfile(@Nullable com.mojang.authlib.GameProfile p_236741_) -
isSingleplayer
public boolean isSingleplayer() -
initializeKeyPair
protected void initializeKeyPair() -
setDifficulty
-
getScaledTrackingDistance
public int getScaledTrackingDistance(int pTrackingDistance) -
updateMobSpawningFlags
private void updateMobSpawningFlags() -
setDifficultyLocked
public void setDifficultyLocked(boolean pLocked) -
sendDifficultyUpdate
-
isSpawningMonsters
public boolean isSpawningMonsters() -
isDemo
public boolean isDemo() -
setDemo
public void setDemo(boolean pDemo) Sets whether this is a demo or not. -
getServerResourcePack
-
isResourcePackRequired
public boolean isResourcePackRequired() -
isDedicatedServer
public abstract boolean isDedicatedServer() -
getRateLimitPacketsPerSecond
public abstract int getRateLimitPacketsPerSecond() -
usesAuthentication
public boolean usesAuthentication() -
setUsesAuthentication
public void setUsesAuthentication(boolean pOnline) -
getPreventProxyConnections
public boolean getPreventProxyConnections() -
setPreventProxyConnections
public void setPreventProxyConnections(boolean pPreventProxyConnections) -
isSpawningAnimals
public boolean isSpawningAnimals() -
areNpcsEnabled
public boolean areNpcsEnabled() -
isEpollEnabled
public abstract boolean isEpollEnabled() -
isPvpAllowed
public boolean isPvpAllowed() -
setPvpAllowed
public void setPvpAllowed(boolean pAllowPvp) -
isFlightAllowed
public boolean isFlightAllowed() -
setFlightAllowed
public void setFlightAllowed(boolean pAllow) -
isCommandBlockEnabled
public abstract boolean isCommandBlockEnabled() -
getMotd
- Specified by:
getMotd
in interfaceServerInfo
-
setMotd
-
isStopped
public boolean isStopped() -
getPlayerList
-
setPlayerList
-
isPublished
public abstract boolean isPublished() -
setDefaultGameType
Sets the game type for all worlds. -
getConnection
-
isReady
public boolean isReady() -
hasGui
public boolean hasGui() -
publishServer
-
getTickCount
public int getTickCount() -
getSpawnProtectionRadius
public int getSpawnProtectionRadius() -
isUnderSpawnProtection
-
repliesToStatus
public boolean repliesToStatus() -
hidesOnlinePlayers
public boolean hidesOnlinePlayers() -
getProxy
-
getPlayerIdleTimeout
public int getPlayerIdleTimeout() -
setPlayerIdleTimeout
public void setPlayerIdleTimeout(int pIdleTimeout) -
getSessionService
public com.mojang.authlib.minecraft.MinecraftSessionService getSessionService() -
getProfileKeySignatureValidator
-
getProfileRepository
public com.mojang.authlib.GameProfileRepository getProfileRepository() -
getProfileCache
-
getStatus
-
invalidateStatus
public void invalidateStatus() -
getAbsoluteMaxWorldSize
public int getAbsoluteMaxWorldSize() -
scheduleExecutables
public boolean scheduleExecutables()- Overrides:
scheduleExecutables
in classReentrantBlockableEventLoop<TickTask>
-
executeIfPossible
- Overrides:
executeIfPossible
in classBlockableEventLoop<TickTask>
-
getRunningThread
- Specified by:
getRunningThread
in classBlockableEventLoop<TickTask>
-
getCompressionThreshold
public int getCompressionThreshold() -
enforceSecureProfile
public boolean enforceSecureProfile() -
getNextTickTime
public long getNextTickTime() -
getFixerUpper
public com.mojang.datafixers.DataFixer getFixerUpper() -
getSpawnRadius
-
getAdvancements
-
getFunctions
-
reloadResources
Replaces currently selected list of datapacks, reloads them, and sends new data to players. -
configurePackRepository
public static WorldDataConfiguration configurePackRepository(PackRepository pPackRepository, WorldDataConfiguration pInitialDataConfig, boolean pInitMode, boolean pSafeMode) -
configureRepositoryWithSelection
private static WorldDataConfiguration configureRepositoryWithSelection(PackRepository pPackRepository, Collection<String> pSelectedPacks, FeatureFlagSet pEnabledFeatures, boolean pSafeMode) -
enableForcedFeaturePacks
private static void enableForcedFeaturePacks(PackRepository pPackRepository, FeatureFlagSet pEnabledFeatures) -
getSelectedPacks
-
kickUnlistedPlayers
-
getPackRepository
-
getCommands
-
createCommandSourceStack
-
acceptsSuccess
public boolean acceptsSuccess()- Specified by:
acceptsSuccess
in interfaceCommandSource
-
acceptsFailure
public boolean acceptsFailure()- Specified by:
acceptsFailure
in interfaceCommandSource
-
shouldInformAdmins
public abstract boolean shouldInformAdmins()- Specified by:
shouldInformAdmins
in interfaceCommandSource
-
getRecipeManager
-
getScoreboard
-
getCommandStorage
-
getGameRules
-
getCustomBossEvents
-
isEnforceWhitelist
public boolean isEnforceWhitelist() -
setEnforceWhitelist
public void setEnforceWhitelist(boolean pWhitelistEnabled) -
getCurrentSmoothedTickTime
public float getCurrentSmoothedTickTime() -
tickRateManager
-
getAverageTickTimeNanos
public long getAverageTickTimeNanos() -
getTickTimesNanos
public long[] getTickTimesNanos() -
getProfilePermissions
public int getProfilePermissions(com.mojang.authlib.GameProfile p_129945_) -
getProfiler
-
isSingleplayerOwner
public abstract boolean isSingleplayerOwner(com.mojang.authlib.GameProfile p_129840_) -
getTickTime
-
forgeGetWorldMap
Deprecated. -
markWorldsDirty
Deprecated. -
getWorldArray
-
dumpServerProperties
- Throws:
IOException
-
saveDebugReport
-
dumpMiscStats
- Throws:
IOException
-
dumpGameRules
- Throws:
IOException
-
dumpClasspath
- Throws:
IOException
-
dumpThreads
- Throws:
IOException
-
dumpNativeModules
- Throws:
IOException
-
startMetricsRecordingTick
private void startMetricsRecordingTick() -
endMetricsRecordingTick
public void endMetricsRecordingTick() -
isRecordingMetrics
public boolean isRecordingMetrics() -
startRecordingMetrics
public void startRecordingMetrics(Consumer<ProfileResults> pOutput, Consumer<Path> pOnMetricsRecordingFinished) -
stopRecordingMetrics
public void stopRecordingMetrics() -
finishRecordingMetrics
public void finishRecordingMetrics() -
cancelRecordingMetrics
public void cancelRecordingMetrics() -
getWorldPath
-
forceSynchronousWrites
public boolean forceSynchronousWrites() -
getStructureManager
-
getWorldData
-
getServerResources
-
registryAccess
-
registries
-
reloadableRegistries
-
createTextFilterForPlayer
-
createGameModeForPlayer
-
getForcedGameType
-
getResourceManager
-
isCurrentlySaving
public boolean isCurrentlySaving() -
isTimeProfilerRunning
public boolean isTimeProfilerRunning() -
startTimeProfiler
public void startTimeProfiler() -
stopTimeProfiler
-
getMaxChainedNeighborUpdates
public int getMaxChainedNeighborUpdates() -
logChatMessage
public void logChatMessage(Component pContent, ChatType.Bound pBoundChatType, @Nullable String pHeader) -
getChatDecorator
-
logIPs
public boolean logIPs() -
subscribeToDebugSample
-
acceptsTransfers
public boolean acceptsTransfers() -
storeChunkIoError
private void storeChunkIoError(CrashReport pCrashReport, ChunkPos pChunkPos, RegionStorageInfo pRegionStorageInfo) -
reportChunkLoadFailure
public void reportChunkLoadFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) - Specified by:
reportChunkLoadFailure
in interfaceChunkIOErrorReporter
-
reportChunkSaveFailure
public void reportChunkSaveFailure(Throwable pThrowable, RegionStorageInfo pRegionStorageInfo, ChunkPos pChunkPos) - Specified by:
reportChunkSaveFailure
in interfaceChunkIOErrorReporter
-
potionBrewing
-
serverLinks
-