Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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 by FuzeIII

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.