Interface IForgeServerPlayer
- All Known Implementing Classes:
ServerPlayer
public interface IForgeServerPlayer
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
openMenu
(MenuProvider containerSupplier, Consumer<FriendlyByteBuf> extraDataWriter) Request to open a GUI on the client, from the server Refer toConfigScreenHandler.ConfigScreenFactory
for how to provide a function to consume these GUI requests on the client.default void
openMenu
(MenuProvider containerSupplier, BlockPos pos) Request to open a GUI on the client, from the server Refer toConfigScreenHandler.ConfigScreenFactory
for how to provide a function to consume these GUI requests on the client.private ServerPlayer
self()
-
Method Details
-
self
-
openMenu
Request to open a GUI on the client, from the server Refer toConfigScreenHandler.ConfigScreenFactory
for how to provide a function to consume these GUI requests on the client.- Parameters:
player
- The player to open the GUI forcontainerSupplier
- A supplier of container properties including the registry name of the containerpos
- A block pos, which will be encoded into the auxillary data for this request
-
openMenu
Request to open a GUI on the client, from the server Refer toConfigScreenHandler.ConfigScreenFactory
for how to provide a function to consume these GUI requests on the client. The maximum size for #extraDataWriter is 32600 bytes.- Parameters:
player
- The player to open the GUI forcontainerSupplier
- A supplier of container properties including the registry name of the containerextraDataWriter
- Consumer to write any additional data the GUI needs
-