registerFactory

abstract void registerFactory<C extends ScreenHandler>(Identifier identifier, ContainerScreenFactory<C> containerScreenFactory)

Register a "Container -> ContainerScreen" factory. This is used only on the client side.

Parameters

identifier

a shared identifier, this identifier should also be used to register a container using ContainerProviderRegistry

containerScreenFactory

the supplier that should be used to create the new gui

abstract void registerFactory(Identifier identifier, ContainerFactory<HandledScreen> factory)

Register a "packet -> ContainerScreen" factory. This is used only on the client side, and allows youto override the default behaviour of re-using the existing "packet -> Container" logic.

Parameters

identifier

a shared identifier, this identifier should also be used to register a container using ContainerProviderRegistry

factory

the gui factory, this should return a new HandledScreen