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 timeDiff) static Componentstatic Consumer<RealmsServiceException> openScreenAndLogOnFailure(Function<RealmsServiceException, Screen> errorScreen, String errorMessage) static Consumer<RealmsServiceException> openScreenOnFailure(Function<RealmsServiceException, Screen> errorScreen) static voidrenderPlayerFace(GuiGraphics graphics, int x, int y, int size, UUID playerId) static CompletableFuture<Void> runAsync(RealmsUtil.RealmsIoConsumer function, @Nullable Consumer<RealmsServiceException> onFailure) static <T> CompletableFuture<T> supplyAsync(RealmsUtil.RealmsIoFunction<T> function, @Nullable Consumer<RealmsServiceException> onFailure)
-
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
-
supplyAsync
public static <T> CompletableFuture<T> supplyAsync(RealmsUtil.RealmsIoFunction<T> function, @Nullable Consumer<RealmsServiceException> onFailure) -
runAsync
public static CompletableFuture<Void> runAsync(RealmsUtil.RealmsIoConsumer function, @Nullable Consumer<RealmsServiceException> onFailure) -
openScreenOnFailure
public static Consumer<RealmsServiceException> openScreenOnFailure(Function<RealmsServiceException, Screen> errorScreen) -
openScreenAndLogOnFailure
public static Consumer<RealmsServiceException> openScreenAndLogOnFailure(Function<RealmsServiceException, Screen> errorScreen, String errorMessage)
-