Class RemoteFriendListUpdateHandler
java.lang.Object
net.minecraft.client.gui.screens.social.RemoteFriendListUpdateHandler
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final longprivate final AtomicBooleanprivate static final longprivate final com.mojang.authlib.yggdrasil.FriendsServiceprivate Set<com.mojang.authlib.yggdrasil.response.FriendDto> private Set<com.mojang.authlib.yggdrasil.response.FriendDto> private Set<com.mojang.authlib.yggdrasil.response.FriendDto> private longprivate com.mojang.authlib.yggdrasil.response.FriendDataprivate static final org.slf4j.Loggerprivate final Minecraftprivate static final longprivate @Nullable ScheduledFuture<?> private final ScheduledExecutorServiceprivate final AtomicBoolean -
Constructor Summary
ConstructorsConstructorDescriptionRemoteFriendListUpdateHandler(com.mojang.authlib.yggdrasil.FriendsService friendsService, Minecraft minecraft) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUpdateListener(Runnable listener) voidclose()private booleandetectChangesAndShowToast(com.mojang.authlib.yggdrasil.response.FriendData friendData, RemoteFriendListUpdateHandler.State previousState) private voidemitToastWithSkin(UUID playerId, String playerName, FriendToast.SkinToastEmitter emitter) com.mojang.authlib.yggdrasil.response.FriendDatagetState()private longprivate booleanprivate static RemoteFriendListUpdateHandler.StatemapResultCodeToState(com.mojang.authlib.yggdrasil.FriendsService.ResultCode resultCode) private voidvoidremoveUpdateListener(Runnable listener) private void(package private) voidvoidstart()voidstop()
-
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
-
scheduler
-
updateInProgress
-
enabled
-
updateListeners
-
lastUpdateNanos
private volatile long lastUpdateNanos -
latestFriendData
private volatile com.mojang.authlib.yggdrasil.response.FriendData latestFriendData -
state
-
knownFriends
-
knownIncoming
-
knownOutgoing
-
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
-
removeUpdateListener
-
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
-
start
public void start() -
stop
public void stop() -
close
public void close()
-