Skip to content

Commit

Permalink
Use GeyserApi for packs path
Browse files Browse the repository at this point in the history
  • Loading branch information
rtm516 committed Mar 2, 2024
1 parent b59bd3a commit cbba60d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import com.mojang.logging.LogUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.geysermc.event.subscribe.Subscribe;
import org.geysermc.geyser.GeyserImpl;
import org.geysermc.geyser.api.GeyserApi;
import org.geysermc.geyser.api.event.lifecycle.GeyserLoadResourcePacksEvent;
import org.geysermc.hydraulic.HydraulicImpl;
import org.geysermc.hydraulic.platform.mod.ModInfo;
Expand Down Expand Up @@ -38,8 +38,7 @@ public PackListener(HydraulicImpl hydraulic, PackManager manager) {

@Subscribe
public void onLoadResourcePacks(GeyserLoadResourcePacksEvent event) {
// TODO: Add this to Geyser API
Path packsPath = GeyserImpl.getInstance().getBootstrap().getConfigFolder().resolve("packs");
Path packsPath = GeyserApi.api().packDirectory();

Map<String, Pair<ModInfo, Path>> packsToLoad = new HashMap<>();
for (ModInfo mod : this.hydraulic.mods()) {
Expand Down

0 comments on commit cbba60d

Please sign in to comment.