From 8115922b37e375285c2a72dbdbb5d83fd942e27c Mon Sep 17 00:00:00 2001 From: kr45732 <52721908+kr45732@users.noreply.github.com> Date: Thu, 8 Jun 2023 10:00:04 -0400 Subject: PV Overhaul (#708) Co-authored-by: Lulonaut --- .../moulberry/notenoughupdates/util/ProfileApiSyncer.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java b/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java index b90e8087..67ed7c7b 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/util/ProfileApiSyncer.java @@ -20,7 +20,7 @@ package io.github.moulberry.notenoughupdates.util; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; -import io.github.moulberry.notenoughupdates.profileviewer.ProfileViewer; +import io.github.moulberry.notenoughupdates.profileviewer.SkyblockProfiles; import net.minecraft.client.Minecraft; import java.util.HashMap; @@ -31,7 +31,7 @@ public class ProfileApiSyncer { private final HashMap resyncTimes = new HashMap<>(); private final HashMap syncingCallbacks = new HashMap<>(); - private final HashMap> finishSyncCallbacks = new HashMap<>(); + private final HashMap> finishSyncCallbacks = new HashMap<>(); private long lastResync; public static ProfileApiSyncer getInstance() { @@ -50,7 +50,7 @@ public class ProfileApiSyncer { String id, long timeBetween, Runnable syncingCallback, - Consumer finishSyncCallback + Consumer finishSyncCallback ) { resyncTimes.put(id, timeBetween); syncingCallbacks.put(id, syncingCallback); @@ -89,8 +89,8 @@ public class ProfileApiSyncer { if (Minecraft.getMinecraft().thePlayer == null) return; String uuid = Minecraft.getMinecraft().thePlayer.getUniqueID().toString().replace("-", ""); - NotEnoughUpdates.profileViewer.getProfileReset(uuid, (profile) -> { - for (Consumer c : finishSyncCallbacks.values()) c.accept(profile); + NotEnoughUpdates.profileViewer.getOrLoadSkyblockProfiles(uuid, (profile) -> { + for (Consumer c : finishSyncCallbacks.values()) c.accept(profile); finishSyncCallbacks.clear(); }); } -- cgit