From 2a191a45be6fda203fa02f88b580f3006f3efa16 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 3 Mar 2020 12:11:47 -0500 Subject: [PATCH] Cleanup --- core/src/mindustry/game/GlobalData.java | 2 +- core/src/mindustry/mod/Mods.java | 3 +-- core/src/mindustry/ui/dialogs/ModsDialog.java | 2 +- gradle.properties | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/mindustry/game/GlobalData.java b/core/src/mindustry/game/GlobalData.java index 0e72ef7245..f91c8dc679 100644 --- a/core/src/mindustry/game/GlobalData.java +++ b/core/src/mindustry/game/GlobalData.java @@ -49,7 +49,7 @@ public class GlobalData{ for(Fi add : files){ if(add.isDirectory()) continue; zos.putNextEntry(new ZipEntry(add.path().substring(base.length()))); - Streams.copyStream(add.read(), zos); + Streams.copy(add.read(), zos); zos.closeEntry(); } diff --git a/core/src/mindustry/mod/Mods.java b/core/src/mindustry/mod/Mods.java index 752a261b77..6c3151b6c7 100644 --- a/core/src/mindustry/mod/Mods.java +++ b/core/src/mindustry/mod/Mods.java @@ -21,7 +21,6 @@ import mindustry.game.EventType.*; import mindustry.gen.*; import mindustry.graphics.*; import mindustry.graphics.MultiPacker.*; -import mindustry.plugin.*; import mindustry.type.*; import mindustry.ui.*; @@ -118,7 +117,7 @@ public class Mods implements Loadable{ private void packSprites(Array sprites, LoadedMod mod, boolean prefix){ for(Fi file : sprites){ try(InputStream stream = file.read()){ - byte[] bytes = Streams.copyStreamToByteArray(stream, Math.max((int)file.length(), 512)); + byte[] bytes = Streams.copyBytes(stream, Math.max((int)file.length(), 512)); Pixmap pixmap = new Pixmap(bytes, 0, bytes.length); packer.add(getPage(file), (prefix ? mod.name + "-" : "") + file.nameWithoutExtension(), new PixmapRegion(pixmap)); pixmap.dispose(); diff --git a/core/src/mindustry/ui/dialogs/ModsDialog.java b/core/src/mindustry/ui/dialogs/ModsDialog.java index ca89f3a6a6..00d6e2351f 100644 --- a/core/src/mindustry/ui/dialogs/ModsDialog.java +++ b/core/src/mindustry/ui/dialogs/ModsDialog.java @@ -40,7 +40,7 @@ public class ModsDialog extends FloatingDialog{ }else{ try{ Fi file = tmpDirectory.child(text.replace("/", "") + ".zip"); - Streams.copyStream(result.getResultAsStream(), file.write(false)); + Streams.copy(result.getResultAsStream(), file.write(false)); mods.importMod(file); file.delete(); Core.app.post(() -> { diff --git a/gradle.properties b/gradle.properties index 6a5b0bc804..878d926439 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ org.gradle.daemon=true org.gradle.jvmargs=-Xms256m -Xmx1024m -archash=8f106aca9385924404e9f2125006d2b16457af4b +archash=23a7b4c41d1723835af9b79aab1093384cfcc621