yarn/mappings/net/minecraft/util/thread/MessageListener.mapping

24 lines
1.2 KiB
Plaintext

CLASS net/minecraft/class_3906 net/minecraft/util/thread/MessageListener
METHOD method_16898 getName ()Ljava/lang/String;
METHOD method_16901 send (Ljava/lang/Object;)V
ARG 1 message
METHOD method_17344 create (Ljava/lang/String;Ljava/util/function/Consumer;)Lnet/minecraft/class_3906;
ARG 0 name
ARG 1 action
METHOD method_17345 ask (Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
COMMENT Asks a message provider for a message.
COMMENT
COMMENT The {@link CompletableFuture} returned from this function will never complete exceptionally.
COMMENT
COMMENT @return CompletableFuture future that completes with the received message
ARG 1 messageProvider
METHOD method_27918 askFallible (Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture;
COMMENT Asks a fallible message provider for a message.
COMMENT
COMMENT The provider is given a MessageListener that accepts a {@link Either} representing either
COMMENT a valid response (generic parameter Source) or an Exception, which decides whether the
COMMENT future completes successfully or exceptionally.
COMMENT
COMMENT @return CompletableFuture that may either complete successfully or exceptionally
ARG 1 messageProvider