接口 IContainerFactory<T extends AbstractContainerMenu>
- 所有超级接口:
MenuType.MenuSupplier<T>
public interface IContainerFactory<T extends AbstractContainerMenu>
extends MenuType.MenuSupplier<T>
This extension of
MenuType.MenuSupplier
allows a mod to handle the extra data it sent to the client
when creating the client-side copy of a menu.-
方法概要
-
方法详细资料
-
create
Constructs a menu instance on the client-side in response to a menu being opened on the server-side for a player.- 参数:
windowId
- TheAbstractContainerMenu.containerId
of the menu on the server-side.inv
- Player inventory of the player for whom the menu is being created.data
- Additional data written by the server when the menu was opened. It contains any data written byIMenuProviderExtension.writeClientSideData(AbstractContainerMenu, RegistryFriendlyByteBuf)
, followed by optional contextual data written by theextraDataWriter
argument toIPlayerExtension.openMenu(MenuProvider, Consumer)
.- 返回:
- The menu instance to use on the client-side.
-
create
- 指定者:
create
在接口中MenuType.MenuSupplier<T extends AbstractContainerMenu>
-