Jump to content

Jaffaaaa

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by Jaffaaaa

  1. Nah, happens randomly from 20 minutes to a few hours. It wouldn't be that much of a problem if part of the mod wasn't AFK'ing haha
  2. I've got a mod which some of my users tell me they get disconnected from multiplayer servers randomly when by this error message: The only thing I can think that is doing this is that my mod contacts my web server to update the user's statistics so they can check on the website. It makes a simple GET request via HttpUrlConnection as shown below, in a different thread, so it doesn't freeze the game: public static JsonObject sendGETRequest(String urlString) throws SocketTimeoutException { try { System.out.println("Sending request to: " + urlString); URL url = new URL(urlString); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); connection.setRequestMethod("GET"); connection.setRequestProperty("Accept", "application/json"); connection.setDoOutput(true); connection.setDoInput(true); connection.setConnectTimeout(3000); BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), StandardCharsets.UTF_8)); StringBuilder sb = new StringBuilder(); int cp; while ((cp = reader.read()) != -1) { sb.append((char) cp); } String output = sb.toString(); JsonObject json = new JsonParser().parse(output).getAsJsonObject(); connection.getInputStream().close(); return json; } catch (SocketTimeoutException e){ throw e; } catch (IOException e){ e.printStackTrace(); } return null; } The IO exception shows this in the console: [22:36:48] [Netty Client IO #0/ERROR]: NetworkDispatcher exception java.io.IOException: An existing connection was forcibly closed by the remote host at sun.nio.ch.SocketDispatcher.read0(Native Method) ~[?:1.8.0_51] at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43) ~[?:1.8.0_51] at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223) ~[?:1.8.0_51] at sun.nio.ch.IOUtil.read(IOUtil.java:192) ~[?:1.8.0_51] at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380) ~[?:1.8.0_51] at io.netty.buffer.UnpooledUnsafeDirectByteBuf.setBytes(UnpooledUnsafeDirectByteBuf.java:446) ~[UnpooledUnsafeDirectByteBuf.class:4.0.23.Final] at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:881) ~[AbstractByteBuf.class:4.0.23.Final] at io.netty.channel.socket.nio.NioSocketChannel.doReadBytes(NioSocketChannel.java:225) ~[NioSocketChannel.class:4.0.23.Final] at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:119) [AbstractNioByteChannel$NioByteUnsafe.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:511) [NioEventLoop.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:468) [NioEventLoop.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:382) [NioEventLoop.class:4.0.23.Final] at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:354) [NioEventLoop.class:4.0.23.Final] at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:116) [SingleThreadEventExecutor$2.class:4.0.23.Final] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_51] Which isn't very helpful from what I can see. Any help would be greatly appreciated. Also I'm not saying that the connection is the problem but that's all I can suspect. I've now printed stuff before it makes the connection to find out if it was that but I'd have to push the update to users to find out and I don't want to have them download a new update just to see if it could be this bug.
  3. I'm trying to get a blurred background effect, similar to this mod. I've looked through the mods source code and its quite a small mod but it goes about it by changing all gui backgrounds in the client and uses transformers which I'm not too experienced in, whereas I just want it for my mod menu. I know in GuiScreen it has a drawDefaultBackground (or similar) method and maybe I could do something with that to apply blur? Any help would mean a lot.
  4. When I try to do / playsound morediscs:music/chillen (the name of my mod and track) than the error comes up as: "Unable to play unknown soundEvent: morediscs:music/chillen" I posted one for 1.7.10 but it wasn't supported so I updated it for 1.9. Main: Folder: Json:
  5. When I try to do /playsound morediscs:music/chillen (the name of my mod and track) than the error comes up as: "Unable to play unknown soundEvent: morediscs:music/chillen" Json: Folder: Main:
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.