接口 IMenuProviderExtension
- 所有已知子接口:
ContainerEntity
,MenuProvider
- 所有已知实现类:
AbstractChestBoat
,AbstractFurnaceBlockEntity
,AbstractMinecartContainer
,BarrelBlockEntity
,BaseContainerBlockEntity
,BeaconBlockEntity
,BlastFurnaceBlockEntity
,BrewingStandBlockEntity
,ChestBlockEntity
,ChestBoat
,ChestRaft
,CrafterBlockEntity
,DispenserBlockEntity
,DropperBlockEntity
,FurnaceBlockEntity
,HopperBlockEntity
,LecternBlockEntity
,MinecartChest
,MinecartHopper
,RandomizableContainerBlockEntity
,ShulkerBoxBlockEntity
,SimpleMenuProvider
,SmokerBlockEntity
,TrappedChestBlockEntity
public interface IMenuProviderExtension
Extension type for the
MenuProvider
interface.-
方法概要
修饰符和类型方法说明default boolean
返回true
if the existing container should be closed on the client side when opening a new one,false
otherwise。default void
writeClientSideData
(AbstractContainerMenu menu, RegistryFriendlyByteBuf buffer) Allows the menu provider to write additional data to be read byIContainerFactory.create(int, Inventory, RegistryFriendlyByteBuf)
when the menu is created on the client-side.
-
方法详细资料
-
shouldTriggerClientSideContainerClosingOnOpen
default boolean shouldTriggerClientSideContainerClosingOnOpen()返回true
if the existing container should be closed on the client side when opening a new one,false
otherwise。- 返回:
true
if the existing container should be closed on the client side when opening a new one,false
otherwise- Implementation Note:
- Returning false prevents the mouse from being (re-)centered when opening a new container.
-
writeClientSideData
Allows the menu provider to write additional data to be read byIContainerFactory.create(int, Inventory, RegistryFriendlyByteBuf)
when the menu is created on the client-side.- 参数:
menu
- A server-side menu created by this menu provider.buffer
- Additional data that will be sent to the client.
-