接口 MessageListener<Msg>

    • 方法详细资料

      • getName

        String getName()
        Mappings:
        Namespace Name Mixin selector
        official bl Laqe;bl()Ljava/lang/String;
        intermediary method_16898 Lnet/minecraft/class_3906;method_16898()Ljava/lang/String;
        named getName Lnet/minecraft/util/thread/MessageListener;getName()Ljava/lang/String;
      • send

        void send​(Msg message)
        Mappings:
        Namespace Name Mixin selector
        official a Laqe;a(Ljava/lang/Object;)V
        intermediary method_16901 Lnet/minecraft/class_3906;method_16901(Ljava/lang/Object;)V
        named send Lnet/minecraft/util/thread/MessageListener;send(Ljava/lang/Object;)V
      • close

        default void close()
        指定者:
        close 在接口中 AutoCloseable
        Mappings:
        Namespace Name Mixin selector
        official close Laqe;close()V
        intermediary close Lnet/minecraft/class_3906;close()V
        named close Lnet/minecraft/util/thread/MessageListener;close()V
      • ask

        default <Source> CompletableFuture<Source> ask​(Function<? super MessageListener<Source>,​? extends Msg> messageProvider)
        Asks a message provider for a message. The CompletableFuture returned from this function will never complete exceptionally.
        返回:
        CompletableFuture future that completes with the received message
        Mappings:
        Namespace Name Mixin selector
        official b Laqe;b(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
        intermediary method_17345 Lnet/minecraft/class_3906;method_17345(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
        named ask Lnet/minecraft/util/thread/MessageListener;ask(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
      • askFallible

        default <Source> CompletableFuture<Source> askFallible​(Function<? super MessageListener<com.mojang.datafixers.util.Either<Source,​Exception>>,​? extends Msg> messageProvider)
        Asks a fallible message provider for a message. The provider is given a MessageListener that accepts a Either representing either a valid response (generic parameter Source) or an Exception, which decides whether the future completes successfully or exceptionally.
        返回:
        CompletableFuture that may either complete successfully or exceptionally
        Mappings:
        Namespace Name Mixin selector
        official c Laqe;c(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
        intermediary method_27918 Lnet/minecraft/class_3906;method_27918(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
        named askFallible Lnet/minecraft/util/thread/MessageListener;askFallible(Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
      • create

        static <Msg> MessageListener<Msg> create​(String name,
                                                 Consumer<Msg> action)
        Mappings:
        Namespace Name Mixin selector
        official a Laqe;a(Ljava/lang/String;Ljava/util/function/Consumer;)Laqe;
        intermediary method_17344 Lnet/minecraft/class_3906;method_17344(Ljava/lang/String;Ljava/util/function/Consumer;)Lnet/minecraft/class_3906;
        named create Lnet/minecraft/util/thread/MessageListener;create(Ljava/lang/String;Ljava/util/function/Consumer;)Lnet/minecraft/util/thread/MessageListener;