Interface ScreenRegistry.Factory<H extends net.minecraft.screen.ScreenHandler,​S extends net.minecraft.client.gui.screen.Screen & net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider<H>>

Type Parameters:
H - the screen handler type
S - the screen type
Enclosing class:
ScreenRegistry
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public static interface ScreenRegistry.Factory<H extends net.minecraft.screen.ScreenHandler,​S extends net.minecraft.client.gui.screen.Screen & net.minecraft.client.gui.screen.ingame.ScreenHandlerProvider<H>>
A factory for handled screens.
  • Method Summary

    Modifier and Type Method Description
    S create​(H handler, net.minecraft.entity.player.PlayerInventory inventory, net.minecraft.text.Text title)
    Creates a new handled screen.
  • Method Details

    • create

      S create​(H handler, net.minecraft.entity.player.PlayerInventory inventory, net.minecraft.text.Text title)
      Creates a new handled screen.
      Parameters:
      handler - the screen handler
      inventory - the player inventory
      title - the title of the screen
      Returns:
      the created screen