diff --git a/.gitignore b/.gitignore index cec4fab5..6bb4c399 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ run/ *.launch /.apt_generated/ .factorypath +logs/ \ No newline at end of file diff --git a/build.gradle b/build.gradle index 92829156..16d73a0f 100644 --- a/build.gradle +++ b/build.gradle @@ -100,6 +100,11 @@ task srgJar(type: Jar) { classifier "mc$minecraft.version-srg" baseName "mod-${project.name.toLowerCase()}" } +task skinZip(type: Zip) { + from fileTree('skins') + baseName 'Pony Skin Resources' + version 'v1' +} reobf { srgJar { diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/applebloom.png b/skins/assets/minelittlepony/textures/skins/applebloom.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/applebloom.png rename to skins/assets/minelittlepony/textures/skins/applebloom.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/applejack.png b/skins/assets/minelittlepony/textures/skins/applejack.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/applejack.png rename to skins/assets/minelittlepony/textures/skins/applejack.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/babsseed.png b/skins/assets/minelittlepony/textures/skins/babsseed.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/babsseed.png rename to skins/assets/minelittlepony/textures/skins/babsseed.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/berrypunch.png b/skins/assets/minelittlepony/textures/skins/berrypunch.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/berrypunch.png rename to skins/assets/minelittlepony/textures/skins/berrypunch.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/bigmac.png b/skins/assets/minelittlepony/textures/skins/bigmac.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/bigmac.png rename to skins/assets/minelittlepony/textures/skins/bigmac.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/blockwork.png b/skins/assets/minelittlepony/textures/skins/blockwork.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/blockwork.png rename to skins/assets/minelittlepony/textures/skins/blockwork.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/bonbon.png b/skins/assets/minelittlepony/textures/skins/bonbon.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/bonbon.png rename to skins/assets/minelittlepony/textures/skins/bonbon.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/braeburn.png b/skins/assets/minelittlepony/textures/skins/braeburn.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/braeburn.png rename to skins/assets/minelittlepony/textures/skins/braeburn.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/cadence.png b/skins/assets/minelittlepony/textures/skins/cadence.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/cadence.png rename to skins/assets/minelittlepony/textures/skins/cadence.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/caramel.png b/skins/assets/minelittlepony/textures/skins/caramel.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/caramel.png rename to skins/assets/minelittlepony/textures/skins/caramel.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/carrottop.png b/skins/assets/minelittlepony/textures/skins/carrottop.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/carrottop.png rename to skins/assets/minelittlepony/textures/skins/carrottop.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/celestia.png b/skins/assets/minelittlepony/textures/skins/celestia.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/celestia.png rename to skins/assets/minelittlepony/textures/skins/celestia.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/changeling.png b/skins/assets/minelittlepony/textures/skins/changeling.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/changeling.png rename to skins/assets/minelittlepony/textures/skins/changeling.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/cheerilee.png b/skins/assets/minelittlepony/textures/skins/cheerilee.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/cheerilee.png rename to skins/assets/minelittlepony/textures/skins/cheerilee.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/chrysalis.png b/skins/assets/minelittlepony/textures/skins/chrysalis.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/chrysalis.png rename to skins/assets/minelittlepony/textures/skins/chrysalis.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/colgate.png b/skins/assets/minelittlepony/textures/skins/colgate.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/colgate.png rename to skins/assets/minelittlepony/textures/skins/colgate.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/cranky.png b/skins/assets/minelittlepony/textures/skins/cranky.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/cranky.png rename to skins/assets/minelittlepony/textures/skins/cranky.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/daringdo.png b/skins/assets/minelittlepony/textures/skins/daringdo.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/daringdo.png rename to skins/assets/minelittlepony/textures/skins/daringdo.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/derpy.png b/skins/assets/minelittlepony/textures/skins/derpy.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/derpy.png rename to skins/assets/minelittlepony/textures/skins/derpy.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/diamondtiara.png b/skins/assets/minelittlepony/textures/skins/diamondtiara.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/diamondtiara.png rename to skins/assets/minelittlepony/textures/skins/diamondtiara.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/fleetfoot.png b/skins/assets/minelittlepony/textures/skins/fleetfoot.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/fleetfoot.png rename to skins/assets/minelittlepony/textures/skins/fleetfoot.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/fluttershy.png b/skins/assets/minelittlepony/textures/skins/fluttershy.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/fluttershy.png rename to skins/assets/minelittlepony/textures/skins/fluttershy.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/grannysmith.png b/skins/assets/minelittlepony/textures/skins/grannysmith.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/grannysmith.png rename to skins/assets/minelittlepony/textures/skins/grannysmith.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/lemonhearts.png b/skins/assets/minelittlepony/textures/skins/lemonhearts.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/lemonhearts.png rename to skins/assets/minelittlepony/textures/skins/lemonhearts.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/luna.png b/skins/assets/minelittlepony/textures/skins/luna.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/luna.png rename to skins/assets/minelittlepony/textures/skins/luna.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/lyra.png b/skins/assets/minelittlepony/textures/skins/lyra.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/lyra.png rename to skins/assets/minelittlepony/textures/skins/lyra.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/mayormare.png b/skins/assets/minelittlepony/textures/skins/mayormare.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/mayormare.png rename to skins/assets/minelittlepony/textures/skins/mayormare.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/mrcake.png b/skins/assets/minelittlepony/textures/skins/mrcake.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/mrcake.png rename to skins/assets/minelittlepony/textures/skins/mrcake.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/mrscake.png b/skins/assets/minelittlepony/textures/skins/mrscake.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/mrscake.png rename to skins/assets/minelittlepony/textures/skins/mrscake.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/octavia.png b/skins/assets/minelittlepony/textures/skins/octavia.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/octavia.png rename to skins/assets/minelittlepony/textures/skins/octavia.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/pinkiepie.png b/skins/assets/minelittlepony/textures/skins/pinkiepie.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/pinkiepie.png rename to skins/assets/minelittlepony/textures/skins/pinkiepie.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/rainbowdash.png b/skins/assets/minelittlepony/textures/skins/rainbowdash.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/rainbowdash.png rename to skins/assets/minelittlepony/textures/skins/rainbowdash.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/rarity.png b/skins/assets/minelittlepony/textures/skins/rarity.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/rarity.png rename to skins/assets/minelittlepony/textures/skins/rarity.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/royalguard.png b/skins/assets/minelittlepony/textures/skins/royalguard.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/royalguard.png rename to skins/assets/minelittlepony/textures/skins/royalguard.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/scootaloo.png b/skins/assets/minelittlepony/textures/skins/scootaloo.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/scootaloo.png rename to skins/assets/minelittlepony/textures/skins/scootaloo.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/shiningarmor.png b/skins/assets/minelittlepony/textures/skins/shiningarmor.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/shiningarmor.png rename to skins/assets/minelittlepony/textures/skins/shiningarmor.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/silverspoon.png b/skins/assets/minelittlepony/textures/skins/silverspoon.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/silverspoon.png rename to skins/assets/minelittlepony/textures/skins/silverspoon.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/skins.json b/skins/assets/minelittlepony/textures/skins/skins.json similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/skins.json rename to skins/assets/minelittlepony/textures/skins/skins.json diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/soarin.png b/skins/assets/minelittlepony/textures/skins/soarin.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/soarin.png rename to skins/assets/minelittlepony/textures/skins/soarin.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/soarinoriginal.png b/skins/assets/minelittlepony/textures/skins/soarinoriginal.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/soarinoriginal.png rename to skins/assets/minelittlepony/textures/skins/soarinoriginal.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/spitfire.png b/skins/assets/minelittlepony/textures/skins/spitfire.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/spitfire.png rename to skins/assets/minelittlepony/textures/skins/spitfire.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/sweetiebelle.png b/skins/assets/minelittlepony/textures/skins/sweetiebelle.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/sweetiebelle.png rename to skins/assets/minelittlepony/textures/skins/sweetiebelle.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/trixie.png b/skins/assets/minelittlepony/textures/skins/trixie.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/trixie.png rename to skins/assets/minelittlepony/textures/skins/trixie.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/twilight.png b/skins/assets/minelittlepony/textures/skins/twilight.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/twilight.png rename to skins/assets/minelittlepony/textures/skins/twilight.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/twilightsparkleoriginal.png b/skins/assets/minelittlepony/textures/skins/twilightsparkleoriginal.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/twilightsparkleoriginal.png rename to skins/assets/minelittlepony/textures/skins/twilightsparkleoriginal.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/twist.png b/skins/assets/minelittlepony/textures/skins/twist.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/twist.png rename to skins/assets/minelittlepony/textures/skins/twist.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/vinylscratch.png b/skins/assets/minelittlepony/textures/skins/vinylscratch.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/vinylscratch.png rename to skins/assets/minelittlepony/textures/skins/vinylscratch.png diff --git a/src/rsrcpk/resources/assets/hdskins/textures/skins/wonderbolt.png b/skins/assets/minelittlepony/textures/skins/wonderbolt.png similarity index 100% rename from src/rsrcpk/resources/assets/hdskins/textures/skins/wonderbolt.png rename to skins/assets/minelittlepony/textures/skins/wonderbolt.png diff --git a/skins/pack.mcmeta b/skins/pack.mcmeta new file mode 100644 index 00000000..096c78db --- /dev/null +++ b/skins/pack.mcmeta @@ -0,0 +1,6 @@ +{ + "pack": { + "pack_format": 2, + "description": "Custom Pony NPC Skins" + } +} \ No newline at end of file diff --git a/skins/pack.png b/skins/pack.png new file mode 100644 index 00000000..d4a0c838 Binary files /dev/null and b/skins/pack.png differ diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/resource/SkinResourceManager.java b/src/hdskins/java/com/voxelmodpack/hdskins/resource/SkinResourceManager.java index 0272c2d7..82793b65 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/resource/SkinResourceManager.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/resource/SkinResourceManager.java @@ -5,7 +5,6 @@ import java.io.InputStream; import java.io.InputStreamReader; import java.util.Map; import java.util.UUID; -import java.util.concurrent.ExecutionException; import java.util.concurrent.Executors; import java.util.concurrent.Future; @@ -23,7 +22,6 @@ import com.google.gson.JsonParseException; import com.mojang.authlib.GameProfile; import com.mojang.authlib.minecraft.MinecraftProfileTexture.Type; import com.mumfrey.liteloader.util.log.LiteLoaderLogger; -import com.voxelmodpack.hdskins.HDSkinManager; import net.minecraft.client.Minecraft; import net.minecraft.client.resources.IResource; @@ -42,34 +40,36 @@ public class SkinResourceManager implements IResourceManagerReloadListener { @Override public void onResourceManagerReload(IResourceManager resourceManager) { - try { - uuidSkins.clear(); - namedSkins.clear(); - for (Future loc : inProgress.values()) { - loc.cancel(true); - } - inProgress.clear(); - for (ResourceLocation res : converted.values()) { - Minecraft.getMinecraft().getTextureManager().deleteTexture(res); - } - converted.clear(); - for (IResource res : resourceManager.getAllResources(new ResourceLocation("hdskins", "textures/skins/skins.json"))) { - try { - SkinData data = getSkinData(res.getInputStream()); - for (Skin s : data.skins) { - if (s.uuid != null) { - uuidSkins.put(s.uuid, s); - } - if (s.name != null) { - namedSkins.put(s.name, s); + uuidSkins.clear(); + namedSkins.clear(); + for (Future loc : inProgress.values()) { + loc.cancel(true); + } + inProgress.clear(); + for (ResourceLocation res : converted.values()) { + Minecraft.getMinecraft().getTextureManager().deleteTexture(res); + } + converted.clear(); + for (String domain : resourceManager.getResourceDomains()) { + try { + for (IResource res : resourceManager.getAllResources(new ResourceLocation(domain, "textures/skins/skins.json"))) { + try { + SkinData data = getSkinData(res.getInputStream()); + for (Skin s : data.skins) { + if (s.uuid != null) { + uuidSkins.put(s.uuid, s); + } + if (s.name != null) { + namedSkins.put(s.name, s); + } } + } catch (JsonParseException je) { + LiteLoaderLogger.warning(je, "Invalid skins.json in %s", res.getResourcePackName()); } - } catch (JsonParseException je) { - LiteLoaderLogger.warning(je, "Invalid skins.json in %s", res.getResourcePackName()); } + } catch (IOException e) { + // ignore } - } catch (IOException e) { - // ignore } } diff --git a/src/rsrcpk/resources/pack.mcmeta b/src/rsrcpk/resources/pack.mcmeta deleted file mode 100644 index 62683e52..00000000 --- a/src/rsrcpk/resources/pack.mcmeta +++ /dev/null @@ -1,6 +0,0 @@ -{ - "pack": { - "pack_format": 2, - "description": "Custom Pony NCP Skins" - } -} \ No newline at end of file