Posted February 16, 20178 yr Hi, So I've created 2 mods, one is server side only and retreive some information from a database, and the other is an usual client/server side mod. On the server side mod I have an HashMap containing information I want to display to the player. I've created this method : public static Account getAccount(UUID uuid) { if (!accounts.containsKey(uuid)) return null; return accounts.get(uuid); } I then try to call my getAccount() method from the server side of my main mod (I try to load the informations in the constructor of a container) and I send the information to the client using packets. The problem is that when I open the GUI, the game freezes and leaves no crash report. Have you got any idea on how to resolve this problem ? PS: In order to test my setup I've included the server side mod into the build path of the main mod Thanks, -Fuze Edited February 16, 20178 yr by FuzeIII
February 17, 20178 yr Open the GUI? What do you mean? Freezing can mean a couple of things. One is that you ran in the debugger and hit a breakpoint. Try kicking your IDE to take you to its debugger panel. The other is that your code sank into an infinite loop. If you wait long enough, the stack will exhaust available memory and crash out with a memory error. The call trace will then show you the recursive calling loop (again and again and again). Another (that you should never do) is that a modder wants to delay some action, so he calls some system level wait method that hangs the JRE. In-game delays need to be implemented with tick handlers so that the rest of the game can continue to run. The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.