diff options
Diffstat (limited to 'src/main/java/makamys/neodymium/util/virtualjar/protocol')
-rw-r--r-- | src/main/java/makamys/neodymium/util/virtualjar/protocol/neodymiumvirtualjar/Handler.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/makamys/neodymium/util/virtualjar/protocol/neodymiumvirtualjar/Handler.java b/src/main/java/makamys/neodymium/util/virtualjar/protocol/neodymiumvirtualjar/Handler.java new file mode 100644 index 0000000..9f0fe66 --- /dev/null +++ b/src/main/java/makamys/neodymium/util/virtualjar/protocol/neodymiumvirtualjar/Handler.java @@ -0,0 +1,24 @@ +package makamys.neodymium.util.virtualjar.protocol.neodymiumvirtualjar; + +import static makamys.neodymium.Constants.MODID; +import static makamys.neodymium.Constants.PROTOCOL; + +import java.net.URL; +import java.net.URLConnection; +import java.net.URLStreamHandler; + +import net.minecraft.launchwrapper.Launch; + +public class Handler extends URLStreamHandler { + + private static final IURLStreamHandlerImpl impl = (IURLStreamHandlerImpl)Launch.blackboard.get(MODID + "." + PROTOCOL + ".impl"); + + @Override + protected URLConnection openConnection(URL url) { + return impl.openConnection(url); + } + + public interface IURLStreamHandlerImpl { + URLConnection openConnection(URL url); + } +} |