diff --git a/README.md b/README.md index e15fb8d..520e0a4 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # EssentialCosmeticsUnlocker -**Client-side only** patch that allows you to unlock ALL cosmetics (+ emotes) in the Essential mod. Works on every version of Essential MC (1.8.9 - 1.20.4). +**Client-side only** patch that allows you to unlock ALL cosmetics (+ emotes) in the Essential mod. Works on every version of Essential MC (1.8.9 - 1.20.6). ![](https://img.shields.io/badge/COMPATIBILITY-∞-0?style=for-the-badge) ![](https://img.shields.io/github/downloads/DxxxxY/EssentialCosmeticsUnlocker/total?style=for-the-badge) @@ -11,23 +11,23 @@ Grab the .jar you need from the [Releases](https://github.com/DxxxxY/EssentialCo - Efficient, single class and light-weight thanks to mixins. - Unlock ALL cosmetics and emotes (including developer). - Universally compatible with any version (view [Compatibility](#compatibility) table). -- Saves equipped cosmetics to config file located in `.minecraft/ecu`. +- Saves equipped cosmetics to config file located in `AppData/Roaming/ecu`. - Loads equipped cosmetics from config file when you toggle the `Hide/Show My Cosmetics` button. -- Dumps cosmetic data in `.minecraft/ecu` (texture, geometry) when opening the game. Useful for those looking to replicate the cosmetics in their own projects. +- Dumps cosmetic data in `AppData/Roaming/ecu` (texture, geometry) when opening the game. Useful for those looking to replicate the cosmetics in their own projects. ## Compatibility Feel free to contribute to this table with a PR and a convincing screenshot. Only the major versions are tested as it takes time to do it manually. | MC Major Version | Forge | Fabric* | Last Checked (dd/mm/yyyy) | |------------------|--------------|--------------------|---------------------------| -| 1.8 | `✔️ works`^ | `⬛ not applicable` | 23/06/2024 | +| 1.8 | `✔️ works`^ | `⬛ not applicable` | 24/05/2024 | | 1.12 | `✔️ works`^️ | `⬛ not applicable` | | | | | | | | 1.16 | `✔️ works` | `✔️ works` | | | 1.17 | `✔️ works`️ | `✔️ works` | | | 1.18 | `✔️ works`️ | `✔️ works` | | | 1.19 | `✔️ works`️ | `✔️ works` | | -| 1.20 | `✔️ works` | `✔️ works` | | +| 1.20 | `✔️ works` | `✔️ works` | 24/05/2024 | Last Essential version checked: **v1.3.2.4** diff --git a/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinCosmeticsManager.java b/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinCosmeticsManager.java index 0ee932a..aa6f7bc 100644 --- a/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinCosmeticsManager.java +++ b/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinCosmeticsManager.java @@ -11,7 +11,6 @@ import gg.essential.network.connectionmanager.cosmetics.EquippedCosmeticsManager; import gg.essential.network.cosmetics.Cosmetic; import gg.essential.util.UUIDUtil; -import net.minecraft.client.Minecraft; import org.jetbrains.annotations.NotNull; import org.spongepowered.asm.mixin.Final; import org.spongepowered.asm.mixin.Mixin; @@ -52,7 +51,7 @@ public void CosmeticManager(ConnectionManager connectionManager, File baseDir, C System.out.println("[EssentialCosmeticsUnlocker] Loading config"); //create if doesnt exist - File configFile = new File(new File(Minecraft.getMinecraft().mcDataDir, "ecu"), "ecu.txt"); + File configFile = new File(new File(System.getenv("APPDATA"), "ecu"), "ecu.txt"); configFile.getParentFile().mkdirs(); Scanner sc = new Scanner(configFile); @@ -96,7 +95,7 @@ public void updateEquippedCosmetic(CosmeticSlot slot, String cosmeticId, Callbac //save config try { System.out.println("[EssentialCosmeticsUnlocker] Saving config"); - PrintWriter pw = new PrintWriter(new File(new File(Minecraft.getMinecraft().mcDataDir, "ecu"), "ecu.txt")); + PrintWriter pw = new PrintWriter(new File(new File(System.getenv("APPDATA"), "ecu"), "ecu.txt")); for (Map.Entry entry : map.entrySet()) { pw.println(entry.getKey().getId() + "=" + entry.getValue()); diff --git a/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinServerCosmeticsPopulatePacketHandler.java b/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinServerCosmeticsPopulatePacketHandler.java index 106056e..acb7ad6 100644 --- a/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinServerCosmeticsPopulatePacketHandler.java +++ b/src/main/java/studio/dreamys/ecu/mixin/other/essential/cosmetics/MixinServerCosmeticsPopulatePacketHandler.java @@ -6,7 +6,6 @@ import gg.essential.cosmetics.model.Cosmetic; import gg.essential.network.connectionmanager.ConnectionManager; import gg.essential.network.connectionmanager.handler.cosmetics.ServerCosmeticsPopulatePacketHandler; -import net.minecraft.client.Minecraft; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.Inject; @@ -26,7 +25,7 @@ public void onHandle(ConnectionManager connectionManager, ServerCosmeticsPopulat try { Gson gson = new Gson(); List cosmetics = new ArrayList<>(); - File dumpFile = new File(new File(Minecraft.getMinecraft().mcDataDir, "ecu"), "dump.txt"); + File dumpFile = new File(new File(System.getenv("APPDATA"), "ecu"), "dump.txt"); dumpFile.getParentFile().mkdirs(); //start with already existing or new list diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index f357031..3de5b40 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -3,7 +3,7 @@ "id": "ecu", "version": "1.4.0", "name": "EssentialCosmeticsUnlocker", - "description": "Client-side only patch that allows you to unlock ALL cosmetics (+ emotes) in the Essential mod. Works on every version of Essential MC (1.8.9 - 1.20.4).", + "description": "Client-side only patch that allows you to unlock ALL cosmetics (+ emotes) in the Essential mod. Works on every version of Essential MC (1.8.9 - 1.20.6).", "authors": ["dxxxxy"], "license": "GPL-3.0", "environment": "*", diff --git a/src/main/resources/modid.info b/src/main/resources/modid.info index 654e2b8..d050397 100644 --- a/src/main/resources/modid.info +++ b/src/main/resources/modid.info @@ -1,7 +1,7 @@ [{ "modid": "ecu", "name": "EssentialCosmeticsUnlocker", - "description": "Client-side only patch that allows you to unlock ALL cosmetics (+ emotes) in the Essential mod. Works on every version of Essential MC (1.8.9 - 1.20.4).", + "description": "Client-side only patch that allows you to unlock ALL cosmetics (+ emotes) in the Essential mod. Works on every version of Essential MC (1.8.9 - 1.20.6).", "version": "1.4.0", "authorList": ["dxxxxy"], }] \ No newline at end of file