Package com.mojang.realmsclient.util
Class RealmsUtil
java.lang.Object
com.mojang.realmsclient.util.RealmsUtil
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfacestatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ComponentconvertToAgePresentation(long millis) static Componentstatic Consumer<RealmsServiceException> openScreenAndLogOnFailure(Function<RealmsServiceException, Screen> screenSupplier, String errorMessage) static Consumer<RealmsServiceException> openScreenOnFailure(Function<RealmsServiceException, Screen> screenSupplier) static voidrenderPlayerFace(GuiGraphics guiGraphics, int x, int y, int size, UUID playerUuid) static CompletableFuture<Void> runAsync(RealmsUtil.RealmsIoConsumer action, Consumer<RealmsServiceException> onError) static <T> CompletableFuture<T> supplyAsync(RealmsUtil.RealmsIoFunction<T> action, Consumer<RealmsServiceException> onError)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
RIGHT_NOW
-
MINUTES
private static final int MINUTES- See Also:
-
HOURS
private static final int HOURS- See Also:
-
DAYS
private static final int DAYS- See Also:
-
-
Constructor Details
-
RealmsUtil
public RealmsUtil()
-
-
Method Details
-
convertToAgePresentation
-
convertToAgePresentationFromInstant
-
renderPlayerFace
public static void renderPlayerFace(GuiGraphics guiGraphics, int x, int y, int size, UUID playerUuid) -
supplyAsync
public static <T> CompletableFuture<T> supplyAsync(RealmsUtil.RealmsIoFunction<T> action, @Nullable Consumer<RealmsServiceException> onError) -
runAsync
public static CompletableFuture<Void> runAsync(RealmsUtil.RealmsIoConsumer action, @Nullable Consumer<RealmsServiceException> onError) -
openScreenOnFailure
public static Consumer<RealmsServiceException> openScreenOnFailure(Function<RealmsServiceException, Screen> screenSupplier) -
openScreenAndLogOnFailure
public static Consumer<RealmsServiceException> openScreenAndLogOnFailure(Function<RealmsServiceException, Screen> screenSupplier, String errorMessage)
-