Class SimpleNamedScreenHandlerFactory

java.lang.Object
net.minecraft.screen.SimpleNamedScreenHandlerFactory
All Implemented Interfaces:
NamedScreenHandlerFactory, ScreenHandlerFactory

public final class SimpleNamedScreenHandlerFactory extends Object implements NamedScreenHandlerFactory
An implementation of NamedScreenHandlerFactory that can be used without the use of anonymous class. This delegates the creation to baseFactory.

An instance is passed to PlayerEntity.openHandledScreen(net.minecraft.screen.NamedScreenHandlerFactory) to open a screen handler.

Mappings:
Namespace Name
named net/minecraft/screen/SimpleNamedScreenHandlerFactory
intermediary net/minecraft/class_747
official brb
  • Field Details

    • name

      private final Text name
      Mappings:
      Namespace Name Mixin selector
      named name Lnet/minecraft/screen/SimpleNamedScreenHandlerFactory;name:Lnet/minecraft/text/Text;
      intermediary field_3947 Lnet/minecraft/class_747;field_3947:Lnet/minecraft/class_2561;
      official a Lbrb;a:Lwz;
    • baseFactory

      private final ScreenHandlerFactory baseFactory
      Mappings:
      Namespace Name Mixin selector
      named baseFactory Lnet/minecraft/screen/SimpleNamedScreenHandlerFactory;baseFactory:Lnet/minecraft/screen/ScreenHandlerFactory;
      intermediary field_17280 Lnet/minecraft/class_747;field_17280:Lnet/minecraft/class_1270;
      official b Lbrb;b:Lcrb;
  • Constructor Details

    • SimpleNamedScreenHandlerFactory

      public SimpleNamedScreenHandlerFactory(ScreenHandlerFactory baseFactory, Text name)
      Mappings:
      Namespace Name Mixin selector
      named <init> Lnet/minecraft/screen/SimpleNamedScreenHandlerFactory;<init>(Lnet/minecraft/screen/ScreenHandlerFactory;Lnet/minecraft/text/Text;)V
      intermediary <init> Lnet/minecraft/class_747;<init>(Lnet/minecraft/class_1270;Lnet/minecraft/class_2561;)V
      official <init> Lbrb;<init>(Lcrb;Lwz;)V
  • Method Details

    • getDisplayName

      public Text getDisplayName()
      Returns the title of this screen handler; will be a part of the open screen packet sent to the client.
      Specified by:
      getDisplayName in interface NamedScreenHandlerFactory
      Mappings:
      Namespace Name Mixin selector
      named getDisplayName Lnet/minecraft/screen/NamedScreenHandlerFactory;getDisplayName()Lnet/minecraft/text/Text;
      intermediary method_5476 Lnet/minecraft/class_3908;method_5476()Lnet/minecraft/class_2561;
      official S_ Lbqv;S_()Lwz;
    • createMenu

      public ScreenHandler createMenu(int syncId, PlayerInventory playerInventory, PlayerEntity player)
      Specified by:
      createMenu in interface ScreenHandlerFactory
      Mappings:
      Namespace Name Mixin selector
      named createMenu Lnet/minecraft/screen/ScreenHandlerFactory;createMenu(ILnet/minecraft/entity/player/PlayerInventory;Lnet/minecraft/entity/player/PlayerEntity;)Lnet/minecraft/screen/ScreenHandler;
      intermediary createMenu Lnet/minecraft/class_1270;createMenu(ILnet/minecraft/class_1661;Lnet/minecraft/class_1657;)Lnet/minecraft/class_1703;
      official createMenu Lcrb;createMenu(ILcmw;Lcmx;)Lcpu;