Interface FabricServerConfigurationPacketListenerImpl

All Known Implementing Classes:
ServerConfigurationPacketListenerImplMixin

public interface FabricServerConfigurationPacketListenerImpl
Fabric-provided extensions for ServerConfigurationPacketListenerImpl. This interface is automatically implemented via Mixin and interface injection.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    addTask(net.minecraft.server.network.ConfigurationTask task)
    Enqueues a ConfigurationTask to be processed.
    default void
    completeTask(net.minecraft.server.network.ConfigurationTask.Type key)
    Completes the task identified by key.
  • Method Details

    • addTask

      default void addTask(net.minecraft.server.network.ConfigurationTask task)
      Enqueues a ConfigurationTask to 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 completeTask(ConfigurationTask.Type), otherwise the client cannot join the world.

      Parameters:
      task - the task
    • completeTask

      default void completeTask(net.minecraft.server.network.ConfigurationTask.Type key)
      Completes the task identified by key.
      Parameters:
      key - the task key
      Throws:
      IllegalStateException - if the current task is not key