Class ServerConfigurationPacketListenerImplMixin
java.lang.Object
net.minecraft.server.network.ServerCommonPacketListenerImpl
net.fabricmc.fabric.mixin.networking.ServerConfigurationPacketListenerImplMixin
- All Implemented Interfaces:
PacketContextProvider, FabricServerConfigurationPacketListenerImpl, PacketListenerExtensions, net.minecraft.network.PacketListener, net.minecraft.network.protocol.common.ServerCommonPacketListener, net.minecraft.network.protocol.cookie.ServerCookiePacketListener, net.minecraft.network.protocol.game.ServerPacketListener, net.minecraft.network.ServerboundPacketListener, net.neoforged.neoforge.common.extensions.ICommonPacketListener, net.neoforged.neoforge.common.extensions.IServerCommonPacketListenerExtension
public abstract class ServerConfigurationPacketListenerImplMixin
extends net.minecraft.server.network.ServerCommonPacketListenerImpl
implements PacketListenerExtensions, FabricServerConfigurationPacketListenerImpl
-
Field Summary
Fields inherited from class net.minecraft.server.network.ServerCommonPacketListenerImpl
connection, connectionType, LATENCY_CHECK_INTERVAL, server -
Constructor Summary
ConstructorsConstructorDescriptionServerConfigurationPacketListenerImplMixin(net.minecraft.server.MinecraftServer server, net.minecraft.network.Connection connection, net.minecraft.server.network.CommonListenerCookie arg) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTask(net.minecraft.server.network.ConfigurationTask task) Enqueues aConfigurationTaskto be processed.voidcompleteTask(net.minecraft.server.network.ConfigurationTask.Type key) Completes the task identified bykey.protected abstract voidfinishCurrentTask(net.minecraft.server.network.ConfigurationTask.Type key) getAddon()abstract booleanabstract voidMethods inherited from class net.minecraft.server.network.ServerCommonPacketListenerImpl
createCookie, createCookie, disconnect, disconnect, getConnection, getConnectionType, getOwner, getPacketProcessor, handleCookieResponse, handleCustomClickAction, handleCustomPayload, handleKeepAlive, handlePong, handleResourcePackResponse, isSingleplayerOwner, keepConnectionAlive, latency, onDisconnect, onPacketError, playerProfile, resumeFlushing, send, send, suspendFlushingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.ICommonPacketListener
hasChannel, hasChannel, hasChannelMethods inherited from interface net.neoforged.neoforge.common.extensions.IServerCommonPacketListenerExtension
send, sendMethods inherited from interface PacketContextProvider
getPacketContextMethods inherited from interface net.minecraft.network.PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetails, protocol, shouldHandleMessageMethods inherited from interface net.minecraft.network.ServerboundPacketListener
flowMethods inherited from interface net.minecraft.network.protocol.common.ServerCommonPacketListener
handleClientInformation
-
Constructor Details
-
ServerConfigurationPacketListenerImplMixin
public ServerConfigurationPacketListenerImplMixin(net.minecraft.server.MinecraftServer server, net.minecraft.network.Connection connection, net.minecraft.server.network.CommonListenerCookie arg)
-
-
Method Details
-
finishCurrentTask
protected abstract void finishCurrentTask(net.minecraft.server.network.ConfigurationTask.Type key) -
isAcceptingMessages
public abstract boolean isAcceptingMessages()- Specified by:
isAcceptingMessagesin interfacenet.minecraft.network.PacketListener
-
startConfiguration
public abstract void startConfiguration() -
getAddon
- Specified by:
getAddonin interfacePacketListenerExtensions
-
addTask
public void addTask(net.minecraft.server.network.ConfigurationTask task) Description copied from interface:FabricServerConfigurationPacketListenerImplEnqueues aConfigurationTaskto be processed.Before adding a task use
ServerConfigurationNetworking.canSend(ServerConfigurationPacketListenerImpl, Identifier)to ensure that the client can process this task.Once the client has handled the task a packet should be sent to the server. Upon receiving this packet the server should call
FabricServerConfigurationPacketListenerImpl.completeTask(ConfigurationTask.Type), otherwise the client cannot join the world.- Specified by:
addTaskin interfaceFabricServerConfigurationPacketListenerImpl- Parameters:
task- the task
-
completeTask
public void completeTask(net.minecraft.server.network.ConfigurationTask.Type key) Description copied from interface:FabricServerConfigurationPacketListenerImplCompletes the task identified bykey.- Specified by:
completeTaskin interfaceFabricServerConfigurationPacketListenerImpl- Parameters:
key- the task key
-