From ca0291337aa1f9cd5ad03fb2ea599cea532f0ad8 Mon Sep 17 00:00:00 2001 From: apple502j <33279053+apple502j@users.noreply.github.com> Date: Sun, 1 May 2022 05:10:20 +0900 Subject: [PATCH] 22w17a stuff (#3124) * 22w17a stuff * Apply suggestions from code review Co-authored-by: liach <7806504+liach@users.noreply.github.com> * Rename to TextifiedException * Add javadoc to Util methods * Apply suggestions from code review Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> Co-authored-by: liach <7806504+liach@users.noreply.github.com> Co-authored-by: enbrain <69905075+enbrain@users.noreply.github.com> --- .../realms/gui/RealmsWorldSlotButton.mapping | 6 ++++++ .../minecraft/util/TextifiedException.mapping | 8 ++++++++ mappings/net/minecraft/util/Util.mapping | 19 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 mappings/net/minecraft/util/TextifiedException.mapping diff --git a/mappings/net/minecraft/client/realms/gui/RealmsWorldSlotButton.mapping b/mappings/net/minecraft/client/realms/gui/RealmsWorldSlotButton.mapping index 1075fca7ec..3a86d6c708 100644 --- a/mappings/net/minecraft/client/realms/gui/RealmsWorldSlotButton.mapping +++ b/mappings/net/minecraft/client/realms/gui/RealmsWorldSlotButton.mapping @@ -11,6 +11,7 @@ CLASS net/minecraft/class_4367 net/minecraft/client/realms/gui/RealmsWorldSlotBu FIELD field_26468 ACTIVE_TOOLTIP Lnet/minecraft/class_2561; FIELD field_26469 MINIGAME_TOOLTIP Lnet/minecraft/class_2561; FIELD field_26470 TOOLTIP Lnet/minecraft/class_2561; + FIELD field_39067 CHECKMARK Lnet/minecraft/class_2960; METHOD (IIIILjava/util/function/Supplier;Ljava/util/function/Consumer;ILnet/minecraft/class_4185$class_4241;)V ARG 1 x ARG 2 y @@ -21,6 +22,7 @@ CLASS net/minecraft/class_4367 net/minecraft/client/realms/gui/RealmsWorldSlotBu ARG 7 id ARG 8 action METHOD method_21107 drawSlotFrame (Lnet/minecraft/class_4587;IIIIZLjava/lang/String;IJLjava/lang/String;ZZLnet/minecraft/class_4367$class_4368;Lnet/minecraft/class_2561;)V + ARG 1 matrices ARG 2 x ARG 3 y ARG 4 mouseX @@ -46,6 +48,10 @@ CLASS net/minecraft/class_4367 net/minecraft/client/realms/gui/RealmsWorldSlotBu ARG 1 active ARG 2 minigame METHOD method_37007 tick ()V + METHOD method_43586 drawCheckmark (Lnet/minecraft/class_4587;II)V + ARG 1 matrices + ARG 2 x + ARG 3 y CLASS class_4368 Action FIELD field_19678 NOTHING Lnet/minecraft/class_4367$class_4368; FIELD field_19679 SWITCH_SLOT Lnet/minecraft/class_4367$class_4368; diff --git a/mappings/net/minecraft/util/TextifiedException.mapping b/mappings/net/minecraft/util/TextifiedException.mapping new file mode 100644 index 0000000000..475ebc6f4c --- /dev/null +++ b/mappings/net/minecraft/util/TextifiedException.mapping @@ -0,0 +1,8 @@ +CLASS net/minecraft/class_7437 net/minecraft/util/TextifiedException + FIELD field_39084 messageText Lnet/minecraft/class_2561; + METHOD (Lnet/minecraft/class_2561;)V + ARG 1 messageText + METHOD (Lnet/minecraft/class_2561;Ljava/lang/Throwable;)V + ARG 1 messageText + ARG 2 cause + METHOD method_43626 getMessageText ()Lnet/minecraft/class_2561; diff --git a/mappings/net/minecraft/util/Util.mapping b/mappings/net/minecraft/util/Util.mapping index 9367a19d76..3daacae24b 100644 --- a/mappings/net/minecraft/util/Util.mapping +++ b/mappings/net/minecraft/util/Util.mapping @@ -205,6 +205,25 @@ CLASS net/minecraft/class_156 net/minecraft/util/Util COMMENT @see #combine(List) COMMENT @see #combineSafe(List) ARG 0 futures + METHOD method_43498 waitAndApply (Ljava/util/function/Function;Ljava/util/function/Predicate;)Ljava/lang/Object; + COMMENT Runs tasks using the prepare-apply model. + COMMENT + COMMENT @apiNote This method takes a function that supplies an executor to use in the + COMMENT apply stage. Inside the function, callers should run the preparation, + COMMENT and use the passed executor for applying. + ARG 0 resultFactory + COMMENT a function that takes the apply-stage executor and returns the preliminary result + ARG 1 donePredicate + COMMENT a predicate that, given the result, checks whether applying has finished + METHOD method_43499 waitAndApply (Ljava/util/function/Function;)Ljava/util/concurrent/CompletableFuture; + COMMENT Runs tasks using the prepare-apply model, such as creation of a {@link + COMMENT net.minecraft.server.SaveLoader}. + COMMENT + COMMENT @apiNote This method takes a function that supplies an executor to use in the + COMMENT apply stage. Inside the function, callers should run the preparation, + COMMENT and use the passed executor for applying. + ARG 0 resultFactory + COMMENT a function that takes the apply-stage executor and returns the future METHOD method_645 previous (Ljava/lang/Iterable;Ljava/lang/Object;)Ljava/lang/Object; ARG 0 iterable ARG 1 object