From 7d8f8dc0d19e082b72947dddf13162e0565f89ca Mon Sep 17 00:00:00 2001 From: Waffles3438 <96705793+Waffles3438@users.noreply.github.com> Date: Sun, 25 Jan 2026 12:55:10 -0500 Subject: [PATCH 1/6] Big fix --- .../command/BedwarsStatsCommand.java | 8 +++-- .../additional/command/DuelsStatsCommand.java | 7 ++-- .../additional/util/HypixelAPIUtils.java | 35 ++++++++++--------- 3 files changed, 30 insertions(+), 20 deletions(-) diff --git a/src/main/java/me/waffles/additional/command/BedwarsStatsCommand.java b/src/main/java/me/waffles/additional/command/BedwarsStatsCommand.java index ef9da46..30a0176 100644 --- a/src/main/java/me/waffles/additional/command/BedwarsStatsCommand.java +++ b/src/main/java/me/waffles/additional/command/BedwarsStatsCommand.java @@ -48,10 +48,11 @@ private void fetchAndPrintStats(String Username, String uuid) { // fetch stats here if(!Additional.bedwarsStatsList.containsKey(Username.toLowerCase())) { try { - Additional.bedwarsStatsList.put(Username.toLowerCase(), fetchPlayerBedwarsStats(uuid)); Additional.playerProfileList.put(Username.toLowerCase(), fetchPlayerProfileData(uuid)); + Additional.bedwarsStatsList.put(Username.toLowerCase(), fetchPlayerBedwarsStats(uuid)); } catch (IOException e) { UChat.chat("Something broke while fetching stats!"); + e.printStackTrace(); throw new RuntimeException(e); } } @@ -63,7 +64,10 @@ private void fetchAndPrintStats(String Username, String uuid) { private void printStats(String Username) { PlayerProfile profile = Additional.playerProfileList.get(Username.toLowerCase()); - if(profile.getDisplayName() == null) { + if(profile == null) { + UChat.chat("Invalid player"); + return; + } else if(profile.getDisplayName() == null) { UChat.chat(Username + " has no Hypixel stats."); return; } diff --git a/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java b/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java index d08e78b..3d0cc44 100644 --- a/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java +++ b/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java @@ -49,8 +49,8 @@ private void fetchAndPrintStats(String Username, String uuid) { // fetch stats here if(!Additional.duelsStatsList.containsKey(Username.toLowerCase())) { try { - Additional.duelsStatsList.put(Username.toLowerCase(), fetchPlayerDuelsStats(uuid)); Additional.playerProfileList.put(Username.toLowerCase(), fetchPlayerProfileData(uuid)); + Additional.duelsStatsList.put(Username.toLowerCase(), fetchPlayerDuelsStats(uuid)); } catch (Exception e) { UChat.chat("Something broke while fetching stats!"); e.printStackTrace(); @@ -64,7 +64,10 @@ private void fetchAndPrintStats(String Username, String uuid) { private void printStats(String Username) { PlayerProfile profile = Additional.playerProfileList.get(Username.toLowerCase()); - if(profile.getDisplayName() == null) { + if(profile == null) { + UChat.chat("Invalid player"); + return; + } else if(profile.getDisplayName() == null) { UChat.chat(Username + " has no Hypixel stats."); return; } diff --git a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java index 16ea77c..f5cdada 100644 --- a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java +++ b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java @@ -1,15 +1,11 @@ package me.waffles.additional.util; import cc.polyfrost.oneconfig.libs.universal.UChat; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; import com.google.gson.JsonObject; import com.google.gson.JsonParser; import me.waffles.additional.command.DuelsStatsCommand; import java.io.BufferedReader; -import java.io.FileWriter; -import java.io.IOException; import java.io.InputStreamReader; import java.net.HttpURLConnection; import java.net.URL; @@ -53,6 +49,9 @@ public static String fetchPlayerData(String urlString, String userAgent) { public static PlayerProfile parsePlayerProfilePlayerData(String json, String guild) { JsonObject rootObject = new JsonParser().parse(json).getAsJsonObject(); + +// saveJsonObject(rootObject, "blank"); // debugging stuff + JsonObject guildObject = new JsonParser().parse(guild).getAsJsonObject(); JsonObject profile; @@ -209,7 +208,6 @@ else if (newPackageRank != null && newPackageRank.equals("MVP_PLUS") && rankPlus public static Duels parseDuelsPlayerData(String json) { JsonObject rootObject = new JsonParser().parse(json).getAsJsonObject(); -// saveRootObjectAsJson(rootObject); debugging stuff JsonObject duelsStats = null, profile = null; @@ -281,17 +279,22 @@ public static Duels parseDuelsPlayerData(String json) { ); } - public static void saveJsonObject(JsonObject rootObject, String filename) { - Gson gson = new GsonBuilder() - .setPrettyPrinting() - .create(); - - try (FileWriter writer = new FileWriter(filename)) { - gson.toJson(rootObject, writer); - } catch (IOException e) { - e.printStackTrace(); - } - } +// public static void saveJsonObject(JsonObject jsonObject, String filePath) +// throws IOException { +// +// Gson gson = new GsonBuilder() +// .setPrettyPrinting() +// .create(); +// +// String formattedJson = gson.toJson(jsonObject); +// +// Path path = Paths.get(filePath); +// if (path.getParent() != null) { +// Files.createDirectories(path.getParent()); +// } +// +// Files.write(path, formattedJson.getBytes(StandardCharsets.UTF_8)); +// } private static final double BASE = 10_000; private static final double GROWTH = 2_500; From c992bbbb2e004adec53e535186cc9c12ebfb3858 Mon Sep 17 00:00:00 2001 From: Waffles3438 <96705793+Waffles3438@users.noreply.github.com> Date: Sun, 1 Feb 2026 17:09:40 -0500 Subject: [PATCH 2/6] fixed rare bug --- .../additional/command/DuelsStatsCommand.java | 7 +-- .../additional/util/HypixelAPIUtils.java | 43 ++++++++++++++++--- 2 files changed, 40 insertions(+), 10 deletions(-) diff --git a/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java b/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java index 3d0cc44..fd054c3 100644 --- a/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java +++ b/src/main/java/me/waffles/additional/command/DuelsStatsCommand.java @@ -11,10 +11,12 @@ import me.waffles.additional.util.PlayerProfile; import net.minecraft.client.Minecraft; -import java.io.IOException; import java.util.NavigableMap; import java.util.TreeMap; +// debugging +//import java.io.IOException; + @Command(value = "d") public class DuelsStatsCommand { @@ -118,8 +120,7 @@ public String fetchPlayerGuildData(String uuid) { ); } - public PlayerProfile fetchPlayerProfileData(String uuid) - throws IOException { + public PlayerProfile fetchPlayerProfileData(String uuid) { String stjson = fetchPlayerData(uuid); String guild = fetchPlayerGuildData(uuid); if (stjson == null || stjson.isEmpty() || guild == null || guild.isEmpty()) { diff --git a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java index f5cdada..2fa3ea6 100644 --- a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java +++ b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java @@ -1,6 +1,7 @@ package me.waffles.additional.util; import cc.polyfrost.oneconfig.libs.universal.UChat; + import com.google.gson.JsonObject; import com.google.gson.JsonParser; import me.waffles.additional.command.DuelsStatsCommand; @@ -10,6 +11,15 @@ import java.net.HttpURLConnection; import java.net.URL; +// debugging imports +//import java.nio.charset.StandardCharsets; +//import java.nio.file.Files; +//import java.nio.file.Path; +//import java.nio.file.Paths; +//import com.google.gson.Gson; +//import com.google.gson.GsonBuilder; +//import java.io.IOException; + public class HypixelAPIUtils { public static String fetchPlayerData(String urlString, String userAgent) { HttpURLConnection connection = null; @@ -49,15 +59,14 @@ public static String fetchPlayerData(String urlString, String userAgent) { public static PlayerProfile parsePlayerProfilePlayerData(String json, String guild) { JsonObject rootObject = new JsonParser().parse(json).getAsJsonObject(); - -// saveJsonObject(rootObject, "blank"); // debugging stuff - JsonObject guildObject = new JsonParser().parse(guild).getAsJsonObject(); +// saveJsonObject(guildObject, "blank"); // debugging stuff + JsonObject profile; try { - if(rootObject.has("player")) { + if(!rootObject.get("player").isJsonNull()) { profile = rootObject .getAsJsonObject("player"); } else { @@ -142,6 +151,7 @@ public static String formatGuildTag(String tag, String tagColor) { } public static String formatRank(String displayName, String newPackageRank, String rankPlusColor, String monthlyPackageRank, String monthlyRankColor, String rank, String prefix) { + if (displayName == null) return null; if(displayName.equals("Technoblade")) return "§d[PIG§b+++§d]"; else if (displayName.equals("TommyInnit")) return "§d[INNIT]"; else if (prefix != null && prefix.equals("§6[MOJANG]")) return "§6[MOJANG]"; @@ -208,11 +218,10 @@ else if (newPackageRank != null && newPackageRank.equals("MVP_PLUS") && rankPlus public static Duels parseDuelsPlayerData(String json) { JsonObject rootObject = new JsonParser().parse(json).getAsJsonObject(); - JsonObject duelsStats = null, profile = null; try { - if(rootObject.has("player") + if(!rootObject.get("player").isJsonNull() && rootObject.get("player").getAsJsonObject().has("stats") && rootObject.get("player").getAsJsonObject().getAsJsonObject("stats").has("Duels")) { profile = rootObject.get("player").getAsJsonObject(); @@ -232,6 +241,16 @@ public static Duels parseDuelsPlayerData(String json) { } catch (Exception e) { UChat.chat("Something broke in parseDuelsPlayerData!"); e.printStackTrace(); + return new Duels( + -1, + -1, + -1, + -1, + -1, + -1, + -1, + null + ); } assert duelsStats != null; @@ -334,7 +353,7 @@ public static Bedwars parseBedwarsPlayerData(String json) { JsonObject bedwarsStats = null; try { - if(rootObject.has("player") + if(!rootObject.get("player").isJsonNull() && rootObject.getAsJsonObject("player").has("achievements") && rootObject.getAsJsonObject("player").has("stats") && rootObject.getAsJsonObject("player").getAsJsonObject("stats").has("Bedwars")) { @@ -358,6 +377,16 @@ public static Bedwars parseBedwarsPlayerData(String json) { } catch (Exception e) { UChat.chat("Something broke in parseBedwarsPlayerData!"); e.printStackTrace(); + return new Bedwars( + -1, + -1, + -1, + -1, + -1, + -1, + -1, + -1 + ); } assert achievements != null; From c5dc3d94d7dc1bfc933dc2444f048d7ae5aa1d7f Mon Sep 17 00:00:00 2001 From: Waffles3438 <96705793+Waffles3438@users.noreply.github.com> Date: Sat, 7 Feb 2026 14:18:15 -0500 Subject: [PATCH 3/6] Update HypixelAPIUtils.java --- .../java/me/waffles/additional/util/HypixelAPIUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java index 2fa3ea6..ec478b8 100644 --- a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java +++ b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java @@ -218,7 +218,7 @@ else if (newPackageRank != null && newPackageRank.equals("MVP_PLUS") && rankPlus public static Duels parseDuelsPlayerData(String json) { JsonObject rootObject = new JsonParser().parse(json).getAsJsonObject(); - JsonObject duelsStats = null, profile = null; + JsonObject duelsStats, profile; try { if(!rootObject.get("player").isJsonNull() @@ -349,8 +349,8 @@ public static Bedwars parseBedwarsPlayerData(String json) { JsonObject rootObject = new JsonParser().parse(json).getAsJsonObject(); // saveJsonObject(rootObject, "player-data.json"); debugging stuff - JsonObject achievements = null; - JsonObject bedwarsStats = null; + JsonObject achievements; + JsonObject bedwarsStats; try { if(!rootObject.get("player").isJsonNull() From e0f4bdf39df48852abc508e56c91c864a2596dc7 Mon Sep 17 00:00:00 2001 From: awruff Date: Sat, 7 Feb 2026 18:37:32 -0500 Subject: [PATCH 4/6] remove preprocessor and use dgt --- build.gradle.kts | 197 ++---------------- gradle.properties | 15 +- gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 2 +- root.gradle.kts | 11 - settings.gradle.kts | 38 ++-- .../me/waffles/additional/Additional.java | 7 +- src/main/resources/mcmod.info | 17 +- src/main/resources/mixins.additional.json | 2 +- versions/mainProject | 1 - 10 files changed, 54 insertions(+), 238 deletions(-) delete mode 100644 root.gradle.kts delete mode 100644 versions/mainProject diff --git a/build.gradle.kts b/build.gradle.kts index 0b5413d..d914df1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,192 +1,35 @@ -@file:Suppress("UnstableApiUsage", "PropertyName") +import dev.deftu.gradle.utils.GameSide -import org.polyfrost.gradle.util.noServerRunConfigs -import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar - -// Adds support for kotlin, and adds the Polyfrost Gradle Toolkit -// which we use to prepare the environment. plugins { - kotlin("jvm") - id("org.polyfrost.multi-version") - id("org.polyfrost.defaults.repo") - id("org.polyfrost.defaults.java") - id("org.polyfrost.defaults.loom") - id("com.github.johnrengelman.shadow") - id("net.kyori.blossom") version "1.3.2" - id("signing") - java -} - -// Gets the mod name, version and id from the `gradle.properties` file. -val mod_name: String by project -val mod_version: String by project -val mod_id: String by project -val mod_archives_name: String by project - -// Replaces the variables in `ExampleMod.java` to the ones specified in `gradle.properties`. -blossom { - replaceToken("@VER@", mod_version) - replaceToken("@NAME@", mod_name) - replaceToken("@ID@", mod_id) -} - -// Sets the mod version to the one specified in `gradle.properties`. Make sure to change this following semver! -version = mod_version -// Sets the group, make sure to change this to your own. It can be a website you own backwards or your GitHub username. -// e.g. com.github. or com. -group = "org.polyfrost" - -// Sets the name of the output jar (the one you put in your mods folder and send to other people) -// It outputs all versions of the mod into the `versions/{mcVersion}/build` directory. -base { - archivesName.set("$mod_archives_name-$platform") -} - -// Configures Polyfrost Loom, our plugin fork to easily set up the programming environment. -loom { - // Removes the server configs from IntelliJ IDEA, leaving only client runs. - noServerRunConfigs() - - // Adds the tweak class if we are building legacy version of forge as per the documentation (https://docs.polyfrost.org) - if (project.platform.isLegacyForge) { - runConfigs { - "client" { - programArgs("--tweakClass", "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker") - property("mixin.debug.export", "true") // Outputs all mixin changes to `versions/{mcVersion}/run/.mixin.out/class` - } - } - } - // Configures the mixins if we are building for forge - if (project.platform.isForge) { - forge { - mixinConfig("mixins.${mod_id}.json") - } - } - // Configures the name of the mixin "refmap" - mixin.defaultRefmapName.set("mixins.${mod_id}.refmap.json") + id("java") + id("dev.deftu.gradle.tools") version("2.69.+") + id("dev.deftu.gradle.tools.resources") version("2.69.+") + id("dev.deftu.gradle.tools.bloom") version("2.69.+") + id("dev.deftu.gradle.tools.shadow") version("2.69.+") + id("dev.deftu.gradle.tools.minecraft.loom") version("2.69.+") } -// Creates the shade/shadow configuration, so we can include libraries inside our mod, rather than having to add them separately. -val shade: Configuration by configurations.creating { - configurations.implementation.get().extendsFrom(this) -} -val modShade: Configuration by configurations.creating { - configurations.modImplementation.get().extendsFrom(this) -} - -// Configures the output directory for when building from the `src/resources` directory. -sourceSets { - main { - output.setResourcesDir(java.classesDirectory) - } -} - -// Adds the Polyfrost maven repository so that we can get the libraries necessary to develop the mod. repositories { maven("https://repo.polyfrost.org/releases") + maven("https://repo.polyfrost.org/snapshots") } -// Configures the libraries/dependencies for your mod. dependencies { - // Adds the OneConfig library, so we can develop with it. - modCompileOnly("cc.polyfrost:oneconfig-$platform:0.2.2-alpha+") + compileOnly("cc.polyfrost:oneconfig-1.8.9-forge:0.2.2-alpha+") - // Adds DevAuth, which we can use to log in to Minecraft in development. - modRuntimeOnly("me.djtheredstoner:DevAuth-${if (platform.isFabric) "fabric" else if (platform.isLegacyForge) "forge-legacy" else "forge-latest"}:1.2.0") + shade("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") + implementation("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta+") - // If we are building for legacy forge, includes the launch wrapper with `shade` as we configured earlier, as well as mixin 0.7.11 - if (platform.isLegacyForge) { - compileOnly("org.spongepowered:mixin:0.7.11-SNAPSHOT") - shade("cc.polyfrost:oneconfig-wrapper-launchwrapper:1.0.0-beta17") - } + compileOnly("org.spongepowered:mixin:0.7.11-SNAPSHOT") } -tasks { - // Processes the `src/resources/mcmod.info`, `fabric.mod.json`, or `mixins.${mod_id}.json` and replaces - // the mod id, name and version with the ones in `gradle.properties` - processResources { - inputs.property("id", mod_id) - inputs.property("name", mod_name) - val java = if (project.platform.mcMinor >= 18) { - 17 // If we are playing on version 1.18, set the java version to 17 - } else { - // Else if we are playing on version 1.17, use java 16. - if (project.platform.mcMinor == 17) - 16 - else - 8 // For all previous versions, we **need** java 8 (for Forge support). - } - val compatLevel = "JAVA_${java}" - inputs.property("java", java) - inputs.property("java_level", compatLevel) - inputs.property("version", mod_version) - inputs.property("mcVersionStr", project.platform.mcVersionStr) - filesMatching(listOf("mcmod.info", "mixins.${mod_id}.json", "mods.toml")) { - expand( - mapOf( - "id" to mod_id, - "name" to mod_name, - "java" to java, - "java_level" to compatLevel, - "version" to mod_version, - "mcVersionStr" to project.platform.mcVersionStr - ) - ) - } - filesMatching("fabric.mod.json") { - expand( - mapOf( - "id" to mod_id, - "name" to mod_name, - "java" to java, - "java_level" to compatLevel, - "version" to mod_version, - "mcVersionStr" to project.platform.mcVersionStr.substringBeforeLast(".") + ".x" - ) - ) - } - } - - // Configures the resources to include if we are building for forge or fabric. - withType(Jar::class.java) { - if (project.platform.isFabric) { - exclude("mcmod.info", "mods.toml") - } else { - exclude("fabric.mod.json") - if (project.platform.isLegacyForge) { - exclude("mods.toml") - } else { - exclude("mcmod.info") - } - } - } +toolkitLoomHelper { + useMixinRefMap(modData.id) + useForgeMixin(modData.id) - // Configures our shadow/shade configuration, so we can - // include some dependencies within our mod jar file. - named("shadowJar") { - archiveClassifier.set("dev") - configurations = listOf(shade, modShade) - duplicatesStrategy = DuplicatesStrategy.EXCLUDE - } + useTweaker("cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker") - remapJar { - inputFile.set(shadowJar.get().archiveFile) - archiveClassifier.set("") - } - - jar { - // Sets the jar manifest attributes. - if (platform.isLegacyForge) { - manifest.attributes += mapOf( - "ModSide" to "CLIENT", // We aren't developing a server-side mod - "ForceLoadAsMod" to true, // We want to load this jar as a mod, so we force Forge to do so. - "TweakOrder" to "0", // Makes sure that the OneConfig launch wrapper is loaded as soon as possible. - "MixinConfigs" to "mixins.${mod_id}.json", // We want to use our mixin configuration, so we specify it here. - "TweakClass" to "cc.polyfrost.oneconfig.loader.stage0.LaunchWrapperTweaker" // Loads the OneConfig launch wrapper. - ) - } - dependsOn(shadowJar) - archiveClassifier.set("") - enabled = false - } -} + useDevAuth("+") + useProperty("mixin.debug.export", "true", GameSide.CLIENT) + disableRunConfigs(GameSide.SERVER) +} \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 31e262f..af58c39 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,13 +1,10 @@ -# gradle.properties file -- CHANGE THE VALUES STARTING WITH `mod_*` AND REMOVE THIS COMMENT. +mod.name=Additional +mod.id=additional +mod.version=3.0.2 -# Sets the name of your mod. -mod_name=Additional -# Sets the id of your mod that mod loaders use to recognize it. -mod_id=additional -# Sets the version of your mod. Make sure to update this when you make changes according to semver. -mod_version=3.0.2 -# Sets the name of the jar file that you put in your 'mods' folder. -mod_archives_name=Additional +minecraft.version=1.8.9 +loom.platform=forge +java.version=8 # Gradle Configuration -- DO NOT TOUCH THESE VALUES. polyfrost.defaults.loom=3 diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a441313..aaaabb3 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.4-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1aa94a4..b740cf1 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. diff --git a/root.gradle.kts b/root.gradle.kts deleted file mode 100644 index acd0973..0000000 --- a/root.gradle.kts +++ /dev/null @@ -1,11 +0,0 @@ -plugins { - kotlin("jvm") version "1.9.10" apply false - id("org.polyfrost.multi-version.root") - id("com.github.johnrengelman.shadow") version "8.1.1" apply false -} - -preprocess { - //"1.12.2-forge"(11202, "srg") { - "1.8.9-forge"(10809, "srg") - //} -} \ No newline at end of file diff --git a/settings.gradle.kts b/settings.gradle.kts index 9e578e6..b628b1e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -1,31 +1,25 @@ @file:Suppress("PropertyName") +import groovy.lang.MissingPropertyException + pluginManagement { repositories { + maven("https://maven.deftu.dev/releases") + maven("https://maven.fabricmc.net") + maven("https://maven.architectury.dev/") + maven("https://maven.minecraftforge.net") + maven("https://repo.essential.gg/repository/maven-public") + maven("https://server.bbkr.space/artifactory/libs-release/") + maven("https://jitpack.io/") + + maven("https://maven.deftu.dev/snapshots") + mavenLocal() + gradlePluginPortal() mavenCentral() - maven("https://repo.polyfrost.org/releases") // Adds the Polyfrost maven repository to get Polyfrost Gradle Toolkit - } - plugins { - val pgtVersion = "0.6.5" // Sets the default versions for Polyfrost Gradle Toolkit - id("org.polyfrost.multi-version.root") version pgtVersion } } -val mod_name: String by settings - -// Configures the root project Gradle name based on the value in `gradle.properties` -rootProject.name = mod_name -rootProject.buildFileName = "root.gradle.kts" - -// Adds all of our build target versions to the classpath if we need to add version-specific code. -listOf( - "1.8.9-forge", // Update this if you want to remove/add a version, along with `build.gradle.kts` and `root.gradle.kts`. - //"1.12.2-forge" // uncomment if you want 1.12.2 support in your mod -).forEach { version -> - include(":$version") - project(":$version").apply { - projectDir = file("versions/$version") - buildFileName = "../../build.gradle.kts" - } -} +val projectName: String = extra["mod.name"]?.toString() ?: throw MissingPropertyException("mod.name has not been set.") +rootProject.name = projectName +rootProject.buildFileName = "build.gradle.kts" \ No newline at end of file diff --git a/src/main/java/me/waffles/additional/Additional.java b/src/main/java/me/waffles/additional/Additional.java index ef8d4db..77a5607 100644 --- a/src/main/java/me/waffles/additional/Additional.java +++ b/src/main/java/me/waffles/additional/Additional.java @@ -19,9 +19,10 @@ @Mod(modid = Additional.MODID, name = Additional.NAME, version = Additional.VERSION) public class Additional { - public static final String MODID = "@ID@"; - public static final String NAME = "@NAME@"; - public static final String VERSION = "@VER@"; + public static final String MODID = "@MOD_ID@"; + public static final String NAME = "@MOD_NAME@"; + public static final String VERSION = "@MOD_VERSION@"; + public static ModConfig config; public static EldestRemovalMap duelsStatsList; public static EldestRemovalMap bedwarsStatsList; diff --git a/src/main/resources/mcmod.info b/src/main/resources/mcmod.info index c379eaa..d3c8586 100644 --- a/src/main/resources/mcmod.info +++ b/src/main/resources/mcmod.info @@ -1,18 +1,11 @@ [ { - "modid": "${id}", - "name": "${name}", - "description": "", - "version": "${version}", - "mcversion": "${mcVersionStr}", - "url": "", - "updateUrl": "", + "modid": "${mod_id}", + "name": "${mod_name}", + "version": "${mod_version}", + "mcversion": "${mc_version}", "authorList": [ "iAT3" - ], - "credits": "", - "logoFile": "", - "screenshots": [], - "dependencies": [] + ] } ] \ No newline at end of file diff --git a/src/main/resources/mixins.additional.json b/src/main/resources/mixins.additional.json index ab9c0b1..ce73b9f 100644 --- a/src/main/resources/mixins.additional.json +++ b/src/main/resources/mixins.additional.json @@ -2,7 +2,7 @@ "compatibilityLevel": "JAVA_8", "minVersion": "0.7", "package": "me.waffles.additional.mixin", - "refmap": "mixins.${id}.refmap.json", + "refmap": "mixins.${mod_id}.refmap.json", "injectors": { "maxShiftBy": 5 }, diff --git a/versions/mainProject b/versions/mainProject deleted file mode 100644 index dd1433e..0000000 --- a/versions/mainProject +++ /dev/null @@ -1 +0,0 @@ -1.8.9-forge \ No newline at end of file From 12e2d6a0d478a5d18aac0eb4e2624248e0ea8f2b Mon Sep 17 00:00:00 2001 From: Waffles Date: Thu, 12 Feb 2026 11:54:25 -0500 Subject: [PATCH 5/6] fixed formatting i think --- .../me/waffles/additional/util/HypixelAPIUtils.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java index ec478b8..fb4f688 100644 --- a/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java +++ b/src/main/java/me/waffles/additional/util/HypixelAPIUtils.java @@ -90,6 +90,17 @@ public static PlayerProfile parsePlayerProfilePlayerData(String json, String gui ? guildObject.get("tag").getAsString() : null; + if(tag != null) { + if(tag.contains("✧")) tag = tag.replaceAll("✧", "✧"); + if(tag.contains("Î")) tag = tag.replaceAll("Î", "Θ"); + if(tag.contains("✌")) tag = tag.replaceAll("✌", "✌"); + if(tag.contains("â?¤")) tag = tag.replaceAll("â?¤", "❤"); + if(tag.contains("✿")) tag = tag.replaceAll("✿", "✿"); + if(tag.contains("✪")) tag = tag.replaceAll("✪", "✪"); + if(tag.contains("➊")) tag = tag.replaceAll("➊", "➊"); + if(tag.contains("✖")) tag = tag.replaceAll("✖", "✖"); + } + String tagColor = guildObject.has("tagColor") ? guildObject.get("tagColor").getAsString() : null; From e3df55ab040bc26d715e8d29fe1e0e312cf6ef1c Mon Sep 17 00:00:00 2001 From: Waffles Date: Thu, 12 Feb 2026 12:00:38 -0500 Subject: [PATCH 6/6] Update to 3.0.3 fixed guild tags --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index af58c39..ba0cadb 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,6 @@ mod.name=Additional mod.id=additional -mod.version=3.0.2 +mod.version=3.0.3 minecraft.version=1.8.9 loom.platform=forge