pjlasl Posted September 9, 2013 Posted September 9, 2013 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. Quote
GotoLink Posted September 9, 2013 Posted September 9, 2013 There are multiple dimensions, each being a world. (and there is the server too) Use world.provider to identify them. Quote
Recommended Posts
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.