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

I am trying to display a message to the player, my mods name and version number when the world loads.

 

I created a worldevent.load method but I noticed it fires off three times. I placed the Event_bus register in the Init method. Can someone help me out here?

 

Here i my event class

 

import java.util.logging.Level;

import lcspm.lib.LogHelper;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.world.WorldEvent;

public class WorldLoadListener {

@ForgeSubscribe
public void onWorldLoad(WorldEvent.Load event)
{

	String world = null;
	world = event.world.getWorldInfo().getWorldName();


	if (event.world.isRemote) {			
		LogHelper.log(Level.INFO, world + " is remote");
	}
	else {
		LogHelper.log(Level.INFO, world + " is not remote");
	}

}
}

 

The output is as follows (notice the 3 bold areas):

2013-09-09 11:09:56 [iNFO] [LCSPM] New World1 is not remote

2013-09-09 11:09:56 [iNFO] [LCSPM] New World1 is not remote

2013-09-09 11:09:56 [iNFO] [Minecraft-Server] Preparing start region for level 0

2013-09-09 11:09:57 [iNFO] [Minecraft-Server] Preparing spawn area: 82%

2013-09-09 11:09:58 [iNFO] [sTDOUT] loading single player

2013-09-09 11:09:58 [iNFO] [Minecraft-Server] Player64[/127.0.0.1:0] logged in with entity id 208 at (80.90360859928775, 64.0, 280.1289411981967)

2013-09-09 11:09:58 [iNFO] [Minecraft-Server] Player64 joined the game

2013-09-09 11:09:58 [iNFO] [LCSPM] MpServer is remote

 

I also looked into creating a TickHandler using the WorldLoad but it never seems to fire.

 

Any help would be greatly appreciated.

There are multiple dimensions, each being a world. (and there is the server too)

 

Use world.provider to identify them.

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.