Skip to content

Commit

Permalink
Move update file to the pfm folder
Browse files Browse the repository at this point in the history
  • Loading branch information
UnlikePaladin committed Nov 9, 2023
1 parent 37c2ce3 commit a2fb735
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.google.gson.JsonParser;
import com.google.gson.JsonSyntaxException;
import com.unlikepaladin.pfm.config.PaladinFurnitureModConfig;
import com.unlikepaladin.pfm.runtime.PFMRuntimeResources;
import com.unlikepaladin.pfm.utilities.Version;
import dev.architectury.injectables.annotations.ExpectPlatform;
import net.fabricmc.api.EnvType;
Expand All @@ -31,6 +32,7 @@
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Date;
import java.util.Locale;
import java.util.Map;
Expand All @@ -46,10 +48,9 @@ public class PaladinFurnitureModUpdateChecker {
public PaladinFurnitureModUpdateChecker() {
}

@ExpectPlatform
public static File getUpdateFile() {
PaladinFurnitureMod.GENERAL_LOGGER.error("[Paladin's Furniture Update Check] Unable to get local update file!");
return null;
Path path = PFMRuntimeResources.getPFMDirectory().resolve("pfmUpdateInfo.json");
return path.toFile();
}

@ExpectPlatform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.unlikepaladin.pfm.fabric;

import com.unlikepaladin.pfm.runtime.PFMRuntimeResources;
import net.fabricmc.loader.api.FabricLoader;

import java.io.File;
Expand All @@ -9,10 +10,6 @@
import java.nio.file.Path;

public class PaladinFurnitureModUpdateCheckerImpl {
public static File getUpdateFile() {
Path path = FabricLoader.getInstance().getGameDir().resolve("pfmUpdateInfo.json");
return path.toFile();
}

public static URL getUpdateURL() throws MalformedURLException {
return new URL("https://github.com/UnlikePaladin/Paladins-Furniture-Update-Index/releases/latest/download/updateIndexFabric.json");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
import java.nio.file.Path;

public class PaladinFurnitureModUpdateCheckerImpl {
public static File getUpdateFile() {
Path path = FMLPaths.GAMEDIR.get().resolve("pfmUpdateInfo.json");
return path.toFile();
}

public static URL getUpdateURL() throws MalformedURLException{
return new URL("https://github.com/UnlikePaladin/Paladins-Furniture-Update-Index/releases/latest/download/updateIndexForge.json");
}
Expand Down

0 comments on commit a2fb735

Please sign in to comment.