Interface IMenuProviderExtension
- All Known Subinterfaces:
ContainerEntity
,MenuProvider
- All Known Implementing Classes:
AbstractFurnaceBlockEntity
,AbstractMinecartContainer
,BarrelBlockEntity
,BaseContainerBlockEntity
,BeaconBlockEntity
,BlastFurnaceBlockEntity
,BrewingStandBlockEntity
,ChestBlockEntity
,ChestBoat
,CrafterBlockEntity
,DispenserBlockEntity
,DropperBlockEntity
,FurnaceBlockEntity
,HopperBlockEntity
,LecternBlockEntity
,MinecartChest
,MinecartHopper
,RandomizableContainerBlockEntity
,ShulkerBoxBlockEntity
,SimpleMenuProvider
,SmokerBlockEntity
,TrappedChestBlockEntity
public interface IMenuProviderExtension
Extension type for the
MenuProvider
interface.-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
Returnstrue
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.
-
Method Details
-
shouldTriggerClientSideContainerClosingOnOpen
default boolean shouldTriggerClientSideContainerClosingOnOpen()Returnstrue
if the existing container should be closed on the client side when opening a new one,false
otherwise.- Returns:
true
if the existing container should be closed on the client side when opening a new one,false
otherwise
-
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.- Parameters:
menu
- A server-side menu created by this menu provider.buffer
- Additional data that will be sent to the client.
-