Class DedicatedServerMixin
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
org.geysermc.geyser.platform.mod.mixin.server.DedicatedServerMixin
- 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,GeyserServerPortGetter
public abstract class DedicatedServerMixin
extends net.minecraft.server.MinecraftServer
implements GeyserServerPortGetter
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.server.MinecraftServer
net.minecraft.server.MinecraftServer.ServerResourcePackInfo -
Field Summary
Fields inherited from class net.minecraft.server.MinecraftServer
ABSOLUTE_MAX_WORLD_SIZE, ANONYMOUS_PLAYER_PROFILE, DEMO_SETTINGS, playerDataStorage, proxy, services, storageSource, VANILLA_BRAND, worldDataFields inherited from class net.minecraft.util.thread.BlockableEventLoop
BLOCK_TIME_NANOSFields inherited from interface net.minecraft.commands.CommandSource
NULL -
Constructor Summary
ConstructorsConstructorDescriptionDedicatedServerMixin(Thread thread, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess levelStorageAccess, net.minecraft.server.packs.repository.PackRepository packRepository, net.minecraft.server.WorldStem worldStem, Proxy proxy, com.mojang.datafixers.DataFixer dataFixer, net.minecraft.server.Services services, net.minecraft.server.level.progress.ChunkProgressListenerFactory chunkProgressListenerFactory) -
Method Summary
Methods inherited from class net.minecraft.server.MinecraftServer
acceptsFailure, acceptsSuccess, acceptsTransfers, addTickable, cancelRecordingMetrics, close, configurePackRepository, createCommandSourceStack, createGameModeForPlayer, createLevels, createTextFilterForPlayer, doRunTask, dumpServerProperties, endMetricsRecordingTick, enforceSecureProfile, executeIfPossible, fillServerSystemReport, fillSystemReport, finishRecordingMetrics, forceDifficulty, forceSynchronousWrites, forceTimeSynchronization, fuelValues, getAbsoluteMaxWorldSize, getAdvancements, getAllLevels, getAverageTickTimeNanos, getChatDecorator, getCommands, getCommandStorage, getCompressionThreshold, getConnection, getCurrentSmoothedTickTime, getCustomBossEvents, getDefaultGameType, getFile, getFixerUpper, getForcedGameType, getFunctionCompilationLevel, getFunctions, getGameRules, getKeyPair, getLevel, getLocalIp, getMaxChainedNeighborUpdates, getMaxPlayers, getModdedStatus, getMotd, getNextTickTime, getOperatorUserPermissionLevel, getPackRepository, getPlayerCount, getPlayerIdleTimeout, getPlayerList, getPlayerNames, getPort, getPreventProxyConnections, getProfileCache, getProfileKeySignatureValidator, getProfilePermissions, getProfileRepository, getProxy, getRateLimitPacketsPerSecond, getRecipeManager, getResourceManager, getRunningThread, getScaledTrackingDistance, getScoreboard, getServerDirectory, getServerModName, getServerResourcePack, getServerVersion, getSessionService, getSingleplayerProfile, getSpawnProtectionRadius, getSpawnRadius, getStatus, getStructureManager, getTickCount, getTickTimeLogger, getTickTimesNanos, getWorldData, getWorldPath, getWorldScreenshotFile, halt, hasGui, hidesOnlinePlayers, initializeKeyPair, initServer, invalidateStatus, isCommandBlockEnabled, isCurrentlySaving, isDedicatedServer, isDemo, isEnforceWhitelist, isEpollEnabled, isFlightAllowed, isHardcore, isLevelEnabled, isPaused, isPublished, isPvpAllowed, isReady, isRecordingMetrics, isResourcePackRequired, isRunning, isShutdown, isSingleplayer, isSingleplayerOwner, isSpawningMonsters, isStopped, isTickTimeLoggingEnabled, isTimeProfilerRunning, isUnderSpawnProtection, kickUnlistedPlayers, levelKeys, loadLevel, logChatMessage, logIPs, managedBlock, onServerCrash, onServerExit, onTickRateChanged, overworld, pauseWhileEmptySeconds, pollTask, potionBrewing, publishServer, registries, registryAccess, reloadableRegistries, reloadResources, repliesToStatus, reportChunkLoadFailure, reportChunkSaveFailure, reportPacketHandlingException, runServer, saveAllChunks, saveEverything, scheduleExecutables, sendSystemMessage, serverLinks, setDefaultGameType, setDemo, setDifficulty, setDifficultyLocked, setEnforceWhitelist, setFatalException, setFlightAllowed, setId, setLocalIp, setMotd, setPlayerIdleTimeout, setPlayerList, setPort, setPreventProxyConnections, setPvpAllowed, setSingleplayerProfile, setUsesAuthentication, shouldInformAdmins, shouldRconBroadcast, shouldRun, spin, startRecordingMetrics, startTimeProfiler, stopRecordingMetrics, stopServer, stopTimeProfiler, subscribeToDebugSample, throwIfFatalException, tickChildren, tickConnection, tickRateManager, tickServer, usesAuthentication, waitForTasks, waitUntilNextTick, wrapRunnableMethods inherited from class net.minecraft.util.thread.ReentrantBlockableEventLoop
runningTaskMethods inherited from class net.minecraft.util.thread.BlockableEventLoop
dropAllTasks, execute, executeBlocking, getPendingTasksCount, isNonRecoverable, isSameThread, name, profiledMetrics, runAllTasks, schedule, submit, submitMethods 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.TaskScheduler
scheduleWithResult
-
Constructor Details
-
DedicatedServerMixin
public DedicatedServerMixin(Thread thread, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess levelStorageAccess, net.minecraft.server.packs.repository.PackRepository packRepository, net.minecraft.server.WorldStem worldStem, Proxy proxy, com.mojang.datafixers.DataFixer dataFixer, net.minecraft.server.Services services, net.minecraft.server.level.progress.ChunkProgressListenerFactory chunkProgressListenerFactory)
-
-
Method Details
-
geyser$getServerPort
public int geyser$getServerPort()Description copied from interface:GeyserServerPortGetterReturns the server port.- If it's a dedicated server, it will return the server port specified in the
server.propertiesfile. - If it's an integrated server, it will return the LAN port if opened, else -1.
MinecraftServer.getPort()doesn't return the LAN port if it's the integrated server, and changing the behavior of this method via a mixin should be avoided as it could have unexpected consequences.- Specified by:
geyser$getServerPortin interfaceGeyserServerPortGetter- Returns:
- The server port.
- If it's a dedicated server, it will return the server port specified in the
-