From bb001f67162effba19e94a1324e9197e013e81cb Mon Sep 17 00:00:00 2001
From: C10udburst <18114966+C10udburst@users.noreply.github.com>
Date: Mon, 30 Aug 2021 11:27:46 +0200
Subject: [PATCH] smol changes

---
 schema.json  | 10 +++++++++-
 updater.json | 21 +++++++++++++++++++--
 updater.py   | 12 ++++++++++--
 3 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/schema.json b/schema.json
index f88a55c..e7f8782 100644
--- a/schema.json
+++ b/schema.json
@@ -1,5 +1,5 @@
 {
-    "$schema": "http://json-schema.org/draft-04/schema#",
+    "$schema": "http://json-schema.org/draft-06/schema#",
     "type": "object",
     "properties": {
         "version": {
@@ -13,6 +13,14 @@
             "type": "string",
             "description": "Path to .minecraft/mods"
         },
+        "loader": {
+            "type": "string",
+            "description": "What mod loader are you using.",
+            "examples": [
+                "fabric",
+                "forge"
+            ]
+        },
         "direct": {
             "type": "array",
             "items": {
diff --git a/updater.json b/updater.json
index d71972c..eb056cf 100644
--- a/updater.json
+++ b/updater.json
@@ -1,6 +1,7 @@
 {
     "$schema": "https://raw.githubusercontent.com/AntiCope/mod-updater/master/schema.json",
     "version": ["1.17.1", "1.17"],
+	"loader": "fabric",
     "path": ".",
     "direct": [
         {
@@ -43,21 +44,37 @@
         },
         {
             "name": "resourcepack-opts.jar",
-            "id": "TiF5QWZY"
+            "id": "disabled:TiF5QWZY"
         },
         {
             "name": "slyde.jar",
             "id": "diCZrsch"
         },
+        {
+            "name": "seed-mapper.jar",
+            "id": "C4GbEnuY"
+        },
         {
             "name": "fabric-api.jar",
             "id": "P7dR8mSH"
-        }
+        },
+		{
+			"name": "smoothboot.jar",
+			"id": "FWumhS4T"
+		},
+		{
+			"name": "wthit.jar",
+			"id": "6AQIaxuO"
+		}
     ],
     "github_releases": [
         {
             "name": "clientcommands.jar",
             "repo": "Earthcomputer/clientcommands"
+        },
+		{
+            "name": "multiconnect.jar",
+            "repo": "disabled:Earthcomputer/multiconnect"
         }
     ],
     "curseforge": [
diff --git a/updater.py b/updater.py
index 8f61aee..1281188 100644
--- a/updater.py
+++ b/updater.py
@@ -38,12 +38,20 @@ def load_data():
     
     for key in CATEGORY_KEYS+['version']:
         if key not in data.keys():
-            print(f"\033[93mWarn: {key} doesn't exist\033[0m")
+            print(f"\033[93mWarn: \"{key}\" doesn't exist\033[0m")
             data[key] = []
     
     if isinstance(data['version'], str):
         data['version'] = [data['version']]
         
+    if "loader" not in data.keys():
+        print(f"\033[93mWarn: \"loader\" doesn't exist\033[0m")
+        data['loader'] = 'fabric'
+        
+    if "path" not in data.keys():
+        print(f"\033[93mWarn: \"path\" doesn't exist\033[0m")
+        data['path'] = '.'
+        
     data['count'] = 0
     for key in CATEGORY_KEYS:
         data['count'] += len(data[key])
@@ -107,7 +115,7 @@ def download_modrinth(mod):
     r = sort_entries(r, 'date_published')
     version = {}
     for ver in r:
-        if set_intersect(data['version'], ver['game_versions']):
+        if set_intersect(data['version'], ver['game_versions']) and data['loader'] in ver['loaders']:
             version = ver
             break
     if not version: