Class ScreenFactorySafe<T extends net.minecraft.world.inventory.AbstractContainerMenu,U1 extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<T>,U2 extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<T>>

java.lang.Object
org.cyclops.cyclopscore.client.gui.ScreenFactorySafe<T,U1,U2>
All Implemented Interfaces:
net.minecraft.client.gui.screens.MenuScreens.ScreenConstructor<T,U1>

public class ScreenFactorySafe<T extends net.minecraft.world.inventory.AbstractContainerMenu,U1 extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<T>,U2 extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<T>> extends Object implements net.minecraft.client.gui.screens.MenuScreens.ScreenConstructor<T,U1>
A type-safe implementation of MenuScreens.ScreenConstructor. This enables more convenient syntax via lambdas than the default MenuScreens.ScreenConstructor. For example: `new ScreenFactorySafe(ContainerScreenAbilityContainer::new)`.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ScreenFactorySafe(net.minecraft.client.gui.screens.MenuScreens.ScreenConstructor<T,U2> screenFactoryInner)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    create(T container, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.screens.MenuScreens.ScreenConstructor

    fromPacket
  • Constructor Details

    • ScreenFactorySafe

      public ScreenFactorySafe(net.minecraft.client.gui.screens.MenuScreens.ScreenConstructor<T,U2> screenFactoryInner)
  • Method Details

    • create

      public U1 create(T container, net.minecraft.world.entity.player.Inventory inventory, net.minecraft.network.chat.Component title)
      Specified by:
      create in interface net.minecraft.client.gui.screens.MenuScreens.ScreenConstructor<T extends net.minecraft.world.inventory.AbstractContainerMenu,U1 extends net.minecraft.client.gui.screens.Screen & net.minecraft.client.gui.screens.inventory.MenuAccess<T>>