Interface ScreenHandlerContext


public interface ScreenHandlerContext
Screen handler contexts allow screen handlers to interact with the logical server's world safely.
Mappings:
Namespace Name
official bkc
intermediary net/minecraft/class_3914
named net/minecraft/screen/ScreenHandlerContext
  • Field Details

    • EMPTY

      static final ScreenHandlerContext EMPTY
      The dummy screen handler context for clientside screen handlers.
      Mappings:
      Namespace Name Mixin selector
      official a Lbkc;a:Lbkc;
      intermediary field_17304 Lnet/minecraft/class_3914;field_17304:Lnet/minecraft/class_3914;
      named EMPTY Lnet/minecraft/screen/ScreenHandlerContext;EMPTY:Lnet/minecraft/screen/ScreenHandlerContext;
  • Method Details

    • create

      static ScreenHandlerContext create​(World world, BlockPos pos)
      Returns an active screen handler context. Used on the logical server.
      Mappings:
      Namespace Name Mixin selector
      official a Lbkc;a(Lbtv;Lfx;)Lbkc;
      intermediary method_17392 Lnet/minecraft/class_3914;method_17392(Lnet/minecraft/class_1937;Lnet/minecraft/class_2338;)Lnet/minecraft/class_3914;
      named create Lnet/minecraft/screen/ScreenHandlerContext;create(Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;)Lnet/minecraft/screen/ScreenHandlerContext;
    • run

      <T> Optional<T> run​(BiFunction<World,​BlockPos,​T> function)
      Mappings:
      Namespace Name Mixin selector
      official a Lbkc;a(Ljava/util/function/BiFunction;)Ljava/util/Optional;
      intermediary method_17395 Lnet/minecraft/class_3914;method_17395(Ljava/util/function/BiFunction;)Ljava/util/Optional;
      named run Lnet/minecraft/screen/ScreenHandlerContext;run(Ljava/util/function/BiFunction;)Ljava/util/Optional;
    • run

      default <T> T run​(BiFunction<World,​BlockPos,​T> function, T defaultValue)
      Mappings:
      Namespace Name Mixin selector
      official a Lbkc;a(Ljava/util/function/BiFunction;Ljava/lang/Object;)Ljava/lang/Object;
      intermediary method_17396 Lnet/minecraft/class_3914;method_17396(Ljava/util/function/BiFunction;Ljava/lang/Object;)Ljava/lang/Object;
      named run Lnet/minecraft/screen/ScreenHandlerContext;run(Ljava/util/function/BiFunction;Ljava/lang/Object;)Ljava/lang/Object;
    • run

      default void run​(BiConsumer<World,​BlockPos> function)
      Mappings:
      Namespace Name Mixin selector
      official a Lbkc;a(Ljava/util/function/BiConsumer;)V
      intermediary method_17393 Lnet/minecraft/class_3914;method_17393(Ljava/util/function/BiConsumer;)V
      named run Lnet/minecraft/screen/ScreenHandlerContext;run(Ljava/util/function/BiConsumer;)V