Class RemoteFriendListUpdateHandler

java.lang.Object
net.minecraft.client.gui.screens.social.RemoteFriendListUpdateHandler

public final class RemoteFriendListUpdateHandler extends Object
  • Field Details

    • LOGGER

      private static final org.slf4j.Logger LOGGER
    • FOREGROUND_INTERVAL_NANOS

      private static final long FOREGROUND_INTERVAL_NANOS
    • BACKGROUND_INTERVAL_MULTIPLIER

      private static final long BACKGROUND_INTERVAL_MULTIPLIER
      See Also:
    • POLL_INTERVAL_SECONDS

      private static final long POLL_INTERVAL_SECONDS
      See Also:
    • friendsService

      private final com.mojang.authlib.yggdrasil.FriendsService friendsService
    • minecraft

      private final Minecraft minecraft
    • scheduler

      private final ScheduledExecutorService scheduler
    • updateInProgress

      private final AtomicBoolean updateInProgress
    • enabled

      private final AtomicBoolean enabled
    • updateListeners

      private final Set<Runnable> updateListeners
    • lastUpdateNanos

      private volatile long lastUpdateNanos
    • latestFriendData

      private volatile com.mojang.authlib.yggdrasil.response.FriendData latestFriendData
    • state

      private volatile RemoteFriendListUpdateHandler.State state
    • knownFriends

      private volatile Set<com.mojang.authlib.yggdrasil.response.FriendDto> knownFriends
    • knownIncoming

      private volatile Set<com.mojang.authlib.yggdrasil.response.FriendDto> knownIncoming
    • knownOutgoing

      private volatile Set<com.mojang.authlib.yggdrasil.response.FriendDto> knownOutgoing
    • scheduledTick

      private @Nullable ScheduledFuture<?> scheduledTick
  • Constructor Details

    • RemoteFriendListUpdateHandler

      public RemoteFriendListUpdateHandler(com.mojang.authlib.yggdrasil.FriendsService friendsService, Minecraft minecraft)
  • Method Details

    • runBackgroundTick

      private void runBackgroundTick()
    • getLatestFriendData

      public com.mojang.authlib.yggdrasil.response.FriendData getLatestFriendData()
    • getState

    • addUpdateListener

      public void addUpdateListener(Runnable listener)
    • removeUpdateListener

      public void removeUpdateListener(Runnable listener)
    • getUpdateIntervalNanos

      private long getUpdateIntervalNanos()
    • runUpdateFriendDataInternal

      void runUpdateFriendDataInternal()
    • mapResultCodeToState

      private static RemoteFriendListUpdateHandler.State mapResultCodeToState(com.mojang.authlib.yggdrasil.FriendsService.ResultCode resultCode)
    • notifyListeners

      private void notifyListeners()
    • detectChangesAndShowToast

      private boolean detectChangesAndShowToast(com.mojang.authlib.yggdrasil.response.FriendData friendData, RemoteFriendListUpdateHandler.State previousState)
    • isInGameAndToastsDisabled

      private boolean isInGameAndToastsDisabled()
    • emitToastWithSkin

      private void emitToastWithSkin(UUID playerId, String playerName, FriendToast.SkinToastEmitter emitter)
    • forceUpdate

      public CompletableFuture<Void> forceUpdate()
    • start

      public void start()
    • stop

      public void stop()
    • close

      public void close()