Class MenuScreenRegistry
java.lang.Object
net.ixdarklord.coolcatcore.api.client.registry.MenuScreenRegistry
The screens menus open. Register while the client initialises.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceMenuScreenRegistry.ScreenFactory<M extends net.minecraft.world.inventory.AbstractContainerMenu, U extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<M>>Vanilla's own constructor type is private; this takes its place (usuallyMyScreen::new). -
Method Summary
Modifier and TypeMethodDescriptionstatic <M extends net.minecraft.world.inventory.AbstractContainerMenu, U extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<M>>
voidregister(Supplier<? extends net.minecraft.world.inventory.MenuType<? extends M>> type, MenuScreenRegistry.ScreenFactory<M, U> factory)
-
Method Details
-
register
public static <M extends net.minecraft.world.inventory.AbstractContainerMenu, U extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<M>> void register(Supplier<? extends net.minecraft.world.inventory.MenuType<? extends M>> type, MenuScreenRegistry.ScreenFactory<M, U> factory) - Parameters:
type- the menu type, supplied so it can be aRegistryEntrynot yet registered
-