diff --git a/example/turiipipip.png b/example/turiipipip.png index a77cd12..ecf1821 100644 Binary files a/example/turiipipip.png and b/example/turiipipip.png differ diff --git a/example/turiipipip.png.mcmeta b/example/turiipipip.png.mcmeta new file mode 100644 index 0000000..a55db9c --- /dev/null +++ b/example/turiipipip.png.mcmeta @@ -0,0 +1,5 @@ +{ + "animation": { + "frametime": 10 + } +} \ No newline at end of file diff --git a/src/main/java/site/hellishmods/moderncustomdiscs/init/ResourcePackInit.java b/src/main/java/site/hellishmods/moderncustomdiscs/init/ResourcePackInit.java index f452d34..1633f16 100644 --- a/src/main/java/site/hellishmods/moderncustomdiscs/init/ResourcePackInit.java +++ b/src/main/java/site/hellishmods/moderncustomdiscs/init/ResourcePackInit.java @@ -66,7 +66,10 @@ public void loadPacks(Consumer consumer, IFactory factory) { File discmodel = new File(models.toFile(), disc.ID); FileWriter modelwriter = new FileWriter(discmodel+".json"); if (disc.TEXTURE.exists()) { - FileUtils.copyFile(disc.TEXTURE, textures.resolve(disc.NAME+".png").toFile()); + File mcmeta = disc.TEXTURE.toPath().getParent().resolve(disc.NAME+".png.mcmeta").toFile(); + FileUtils.copyFile(disc.TEXTURE, textures.resolve(disc.NAME+".png").toFile()); // Copy texture + if (mcmeta.exists()) FileUtils.copyFile(mcmeta, textures.resolve(disc.NAME+".png.mcmeta").toFile()); // Copy mcmeta file (if exists) + modelwriter.write(String.format("{\"parent\": \"minecraft:item/generated\", \"textures\": {\"layer0\": \"%s:item/custom/%s\"}}", moderncustomdiscs.MOD_ID, disc.NAME)); } else modelwriter.write(String.format("{\"parent\": \"%s:item/disc\"}", moderncustomdiscs.MOD_ID));