Interface IForgeServerPlayer

All Known Implementing Classes:
ServerPlayer

public interface IForgeServerPlayer
  • Method Details

    • self

      private ServerPlayer self()
    • openMenu

      default void openMenu(MenuProvider containerSupplier, BlockPos pos)
      Request to open a GUI on the client, from the server Refer to ConfigScreenHandler.ConfigScreenFactory for how to provide a function to consume these GUI requests on the client.
      Parameters:
      containerSupplier - A supplier of container properties including the registry name of the container
      pos - A block pos, which will be encoded into the auxillary data for this request
      player - The player to open the GUI for
    • openMenu

      default void openMenu(MenuProvider containerSupplier, Consumer<FriendlyByteBuf> extraDataWriter)
      Request to open a GUI on the client, from the server Refer to ConfigScreenHandler.ConfigScreenFactory for how to provide a function to consume these GUI requests on the client. The maximum size for #extraDataWriter is 32600 bytes.
      Parameters:
      containerSupplier - A supplier of container properties including the registry name of the container
      extraDataWriter - Consumer to write any additional data the GUI needs
      player - The player to open the GUI for