Commit e814dba19ef0b0b689f5c5d286da337bcb85c714
1 parent
4d46c503
warnings cleanup, remove unused imports and replace deprecated Guava methods
Showing
3 changed files
with
3 additions
and
14 deletions
java/client/com/mumfrey/liteloader/util/ModUtilities.java
@@ -13,7 +13,6 @@ import net.minecraft.client.renderer.entity.Render; | @@ -13,7 +13,6 @@ import net.minecraft.client.renderer.entity.Render; | ||
13 | import net.minecraft.client.renderer.entity.RenderManager; | 13 | import net.minecraft.client.renderer.entity.RenderManager; |
14 | import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; | 14 | import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; |
15 | import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; | 15 | import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; |
16 | -import net.minecraft.client.settings.KeyBinding; | ||
17 | import net.minecraft.entity.Entity; | 16 | import net.minecraft.entity.Entity; |
18 | import net.minecraft.init.Blocks; | 17 | import net.minecraft.init.Blocks; |
19 | import net.minecraft.init.Items; | 18 | import net.minecraft.init.Items; |
@@ -27,7 +26,6 @@ import net.minecraft.util.RegistrySimple; | @@ -27,7 +26,6 @@ import net.minecraft.util.RegistrySimple; | ||
27 | import net.minecraft.util.ResourceLocation; | 26 | import net.minecraft.util.ResourceLocation; |
28 | 27 | ||
29 | import com.mumfrey.liteloader.client.util.PrivateFields; | 28 | import com.mumfrey.liteloader.client.util.PrivateFields; |
30 | -import com.mumfrey.liteloader.core.LiteLoader; | ||
31 | import com.mumfrey.liteloader.core.runtime.Obf; | 29 | import com.mumfrey.liteloader.core.runtime.Obf; |
32 | import com.mumfrey.liteloader.util.log.LiteLoaderLogger; | 30 | import com.mumfrey.liteloader.util.log.LiteLoaderLogger; |
33 | 31 |
java/common/com/mumfrey/liteloader/core/LiteLoader.java
@@ -16,8 +16,6 @@ import net.minecraft.network.play.server.S01PacketJoinGame; | @@ -16,8 +16,6 @@ import net.minecraft.network.play.server.S01PacketJoinGame; | ||
16 | import net.minecraft.profiler.Profiler; | 16 | import net.minecraft.profiler.Profiler; |
17 | import net.minecraft.world.World; | 17 | import net.minecraft.world.World; |
18 | 18 | ||
19 | -import org.apache.logging.log4j.Logger; | ||
20 | - | ||
21 | import com.mumfrey.liteloader.LiteMod; | 19 | import com.mumfrey.liteloader.LiteMod; |
22 | import com.mumfrey.liteloader.api.CoreProvider; | 20 | import com.mumfrey.liteloader.api.CoreProvider; |
23 | import com.mumfrey.liteloader.api.CustomisationProvider; | 21 | import com.mumfrey.liteloader.api.CustomisationProvider; |
@@ -68,11 +66,6 @@ public final class LiteLoader | @@ -68,11 +66,6 @@ public final class LiteLoader | ||
68 | private static LiteLoader instance; | 66 | private static LiteLoader instance; |
69 | 67 | ||
70 | /** | 68 | /** |
71 | - * Logger for LiteLoader events | ||
72 | - */ | ||
73 | - private static final Logger logger = LiteLoaderLogger.getLogger(); | ||
74 | - | ||
75 | - /** | ||
76 | * Tweak system class loader | 69 | * Tweak system class loader |
77 | */ | 70 | */ |
78 | private static LaunchClassLoader classLoader; | 71 | private static LaunchClassLoader classLoader; |
java/common/com/mumfrey/liteloader/core/LiteLoaderUpdateSite.java
1 | package com.mumfrey.liteloader.core; | 1 | package com.mumfrey.liteloader.core; |
2 | 2 | ||
3 | import java.io.File; | 3 | import java.io.File; |
4 | -import java.io.FileOutputStream; | ||
5 | import java.io.IOException; | 4 | import java.io.IOException; |
6 | import java.io.InputStream; | 5 | import java.io.InputStream; |
7 | 6 | ||
8 | import net.minecraft.util.Util; | 7 | import net.minecraft.util.Util; |
9 | import net.minecraft.util.Util.EnumOS; | 8 | import net.minecraft.util.Util.EnumOS; |
10 | 9 | ||
11 | -import com.google.common.io.ByteStreams; | 10 | +import com.google.common.io.ByteSink; |
12 | import com.google.common.io.Files; | 11 | import com.google.common.io.Files; |
13 | -import com.google.common.io.OutputSupplier; | ||
14 | import com.mumfrey.liteloader.launch.ClassPathUtilities; | 12 | import com.mumfrey.liteloader.launch.ClassPathUtilities; |
15 | import com.mumfrey.liteloader.launch.LoaderProperties; | 13 | import com.mumfrey.liteloader.launch.LoaderProperties; |
16 | import com.mumfrey.liteloader.update.UpdateSite; | 14 | import com.mumfrey.liteloader.update.UpdateSite; |
@@ -151,8 +149,8 @@ public class LiteLoaderUpdateSite extends UpdateSite | @@ -151,8 +149,8 @@ public class LiteLoaderUpdateSite extends UpdateSite | ||
151 | try | 149 | try |
152 | { | 150 | { |
153 | final InputStream inputStream = LiteLoaderUpdateSite.class.getResourceAsStream(resourceName); | 151 | final InputStream inputStream = LiteLoaderUpdateSite.class.getResourceAsStream(resourceName); |
154 | - final OutputSupplier<FileOutputStream> outputSupplier = Files.newOutputStreamSupplier(outputFile); | ||
155 | - ByteStreams.copy(inputStream, outputSupplier); | 152 | + final ByteSink outputSupplier = Files.asByteSink(outputFile); |
153 | + outputSupplier.writeFrom(inputStream); | ||
156 | } | 154 | } |
157 | catch (NullPointerException ex) | 155 | catch (NullPointerException ex) |
158 | { | 156 | { |