diff --git a/build.gradle b/build.gradle index 6146965..0ff748a 100644 --- a/build.gradle +++ b/build.gradle @@ -13,17 +13,12 @@ apply plugin: 'net.minecraftforge.gradle' apply plugin: 'eclipse' apply plugin: 'maven-publish' -version = '1.1.1-L-1.14.4' +version = '1.1.2-1.14.4' group = 'szum123321.textile_backup' archivesBaseName = 'textile_backup[FORGE]' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. -configurations { - shade - compile.extendsFrom shade -} - minecraft { mappings channel: 'snapshot', version: '20190719-1.14.3' @@ -84,17 +79,16 @@ repositories { mavenCentral() } +configurations { + shade + compile.extendsFrom shade +} + dependencies { minecraft 'net.minecraftforge:forge:1.14.4-28.2.0' compile "blue.endless:jankson:1.2.0" shade "blue.endless:jankson:1.2.0" - - compile "org.apache.commons:commons-compress:1.9" - shade "org.apache.commons:commons-compress:1.9" - - compile "org.apache.commons:commons-io:1.3.2" - shade "org.apache.commons:commons-io:1.3.2" } // Example for how to get properties into the manifest for reading by the runtime.. diff --git a/src/main/java/szum123321/textile_backup/core/ZipCompressor.java b/src/main/java/szum123321/textile_backup/core/ZipCompressor.java index 36d91f0..ec0a675 100644 --- a/src/main/java/szum123321/textile_backup/core/ZipCompressor.java +++ b/src/main/java/szum123321/textile_backup/core/ZipCompressor.java @@ -20,7 +20,6 @@ package szum123321.textile_backup.core; import net.minecraft.command.CommandSource; import szum123321.textile_backup.TextileBackup; -import org.apache.commons.compress.utils.IOUtils; import java.io.File; import java.io.FileInputStream; @@ -49,7 +48,16 @@ public class ZipCompressor { ZipEntry entry = new ZipEntry(file.getAbsolutePath().substring(rootPathLength)); arc.putNextEntry(entry); entry.setSize(file.length()); - IOUtils.copy(new FileInputStream(file), arc); + //I HATE FORGE! + //IOUtils.copy(new FileInputStream(file), arc); + FileInputStream fis = new FileInputStream(file); + byte[] bytes = new byte[1024]; + int length; + while((length = fis.read(bytes)) >= 0) { + arc.write(bytes, 0, length); + } + fis.close(); + arc.closeEntry(); }catch (IOException e){ TextileBackup.logger.error(e.getMessage()); diff --git a/update.json b/update.json index 09f592a..c6f5546 100644 --- a/update.json +++ b/update.json @@ -2,9 +2,10 @@ "homepage": "https://www.curseforge.com/minecraft/mc-mods/textile-backup", "promos": { "1.14.4-latest": "1.1.1-1.14.4", - "1.14.4-recommended": "1.1.1-1.14.4" + "1.14.4-recommended": "1.1.2-1.14.4" }, "1.14.4": { - "1.1.1": "Initial release for forge" + "1.1.1-1.14.4": "Initial release for forge", + "1.1.2-1.14.4": "Fixed missing library." } } \ No newline at end of file